blob: 50e9300aa6bdf1352311784f95b822500e66fe68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Basic tests for the Migration Wizard component</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script src="chrome://browser/content/migration/migration-wizard.mjs" type="module"></script>
<link rel="stylesheet" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<script>
"use strict";
/**
* Tests that the MigrationWizard:Init event is fired when the <migration-wizard>
* is added to the DOM.
*/
add_task(async function test_init_event() {
let wiz = document.createElement("migration-wizard");
let content = document.getElementById("content");
let promise = new Promise(resolve => {
content.addEventListener("MigrationWizard:Init", resolve, { once: true });
})
content.appendChild(wiz);
await promise;
ok(true, "Saw MigrationWizard:Init event.");
});
</script>
</head>
<body>
<p id="display"></p>
<div id="content"></div>
<pre id="test"></pre>
</body>
</html>
|