fune/devtools/client/webconsole/test/browser/test-console.html
Nicolas Chevobbe 8e664c49b3 Bug 1699117 - [devtools] Fix failure and leak on browser_console.js . r=ladybenko.
This patch dose a few things:
- close the tab we open in the test
- move the setTimeout we were doing in a content task from the test
  to the function we are calling directly (this test is the only consumer
  of this function)
- cleanup the created content worker at the end of the test

Differential Revision: https://phabricator.services.mozilla.com/D108968
2021-03-26 15:03:05 +00:00

36 lines
687 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple webconsole test page</title>
<style>
p {
color: bled;
}
</style>
</head>
<body>
<p>Simple webconsole test page</p>
<script>
/* exported doLogs, stringLog, throwError */
"use strict";
function doLogs(num) {
num = num || 1;
for (let i = 0; i < num; i++) {
console.log(i);
}
}
function stringLog() {
console.log("stringLog");
}
function throwError(errorMessage) {
setTimeout(() => {
throw errorMessage;
}, 0);
}
</script>
</body>
</html>