Files
firefox/devtools/client/webide/test/test_basic.html
T
Brian Grinstead 36c26fa2b9 Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
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
2019-04-15 20:56:58 +00:00

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>