mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
This is an autogenerated commit to handle scripts loading mochitest harness files, in the simple case where the script src is on the same line as the tag. This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170 using the `--part 1` argument. Differential Revision: https://phabricator.services.mozilla.com/D26812
57 lines
1.8 KiB
HTML
57 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf8">
|
|
<title></title>
|
|
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script src="chrome://mochikit/content/chrome-harness.js"></script>
|
|
<script type="application/javascript" src="head.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script type="application/javascript">
|
|
window.onload = function() {
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
(async function() {
|
|
const win = await openWebIDE();
|
|
|
|
const {gDevToolsBrowser} = require("devtools/client/framework/devtools-browser");
|
|
await gDevToolsBrowser.isWebIDEInitialized.promise;
|
|
ok(true, "WebIDE was initialized");
|
|
|
|
ok(win, "Found a window");
|
|
ok(win.AppManager, "App Manager accessible");
|
|
const appmgr = win.AppManager;
|
|
ok(appmgr.connection, "App Manager connection ready");
|
|
ok(appmgr.runtimeList, "Runtime list ready");
|
|
|
|
// test error reporting
|
|
const nbox = win.UI.notificationBox;
|
|
let notification = nbox.getNotificationWithValue("webide:errornotification");
|
|
ok(!notification, "No notification yet");
|
|
const deferred = new Promise((resolve, reject) => {
|
|
nextTick().then(() => {
|
|
reject("BOOM!");
|
|
});
|
|
});
|
|
try {
|
|
await win.UI.busyUntil(deferred, "xx");
|
|
} catch (e) { /* This *will* fail */ }
|
|
notification = nbox.getNotificationWithValue("webide:errornotification");
|
|
ok(notification, "Error has been reported");
|
|
|
|
await closeWebIDE(win);
|
|
|
|
SimpleTest.finish();
|
|
})();
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|