Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<title>Test upgrade steps for custom elements.</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<script type="text/javascript">
SimpleTest.waitForExplicitFinish();
var promises = [];
function test_with_new_window(f, msg) {
promises.push(new Promise((aResolve) => {
let iframe = document.createElement('iframe');
iframe.setAttribute('type', 'content');
iframe.onload = function() {
try {
// Use window from iframe to isolate the test.
f(iframe.contentWindow, msg);
} catch (e) {
SimpleTest.ok(false, e);
}
aResolve();
};
document.body.appendChild(iframe);
}));
}
</script>
<!-- Test cases for autonomous element -->
<script type="text/javascript" src="upgrade_tests.js"></script>
<script>
Promise.all(promises).then(() => {
SimpleTest.finish();
});
</script>
</body>
</html>