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
61 lines
2.0 KiB
HTML
61 lines
2.0 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 = async function() {
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
try {
|
|
Services.prefs.setBoolPref("devtools.performance.new-panel-enabled", true);
|
|
|
|
DebuggerServer.init();
|
|
DebuggerServer.registerAllActors();
|
|
|
|
const win = await openWebIDE();
|
|
|
|
const perfIframe = win.document.querySelector("#deck-panel-performance");
|
|
const docRuntime = getRuntimeDocument(win);
|
|
|
|
win.AppManager.update("runtime-list");
|
|
|
|
await connectToLocalRuntime(win);
|
|
|
|
const prefs = docRuntime.querySelector("#runtime-performance");
|
|
|
|
ok(!prefs.hidden, "performance button is displayed");
|
|
ok(!prefs.hasAttribute("disabled"), "performance cmd enabled");
|
|
|
|
const deck = win.document.querySelector("#deck");
|
|
|
|
win.Cmds.showPerformancePanel();
|
|
is(deck.selectedPanel, perfIframe, "performance iframe selected");
|
|
|
|
await nextTick();
|
|
|
|
await lazyIframeIsLoaded(perfIframe);
|
|
|
|
await SimpleTest.promiseWaitForCondition(
|
|
() => perfIframe.contentDocument.querySelector(".perf"),
|
|
"Waited for the react rendering that never came."
|
|
);
|
|
ok(true, "The perf interface was correctly rendered.");
|
|
await closeWebIDE(win);
|
|
} catch (e) {
|
|
ok(false, "Exception: " + e + "\nStack: " + e.stack);
|
|
} finally {
|
|
Services.prefs.clearUserPref("devtools.performance.new-panel-enabled");
|
|
SimpleTest.finish();
|
|
}
|
|
};
|
|
</script>
|
|
</body>
|
|
</html>
|