4 https://bugzilla.mozilla.org/show_bug.cgi?id=1428076
8 <title>Test for Bug
1428076</title>
9 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://global/skin"/>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1428076">Mozilla Bug
1428076</a>
15 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
16 <script type=
"application/javascript" src=
"profiler_test_utils.js"></script>
17 <script type=
"application/javascript">
18 /** Test for Bug
1428076 **/
25 entries:
1000000, //
9MB
27 features: [
"js",
"stackwalk"],
28 threads: [
"GeckoMain",
"Compositor",
"Worker"], // most common combination
32 // We use a Blob for the worker content to avoid an external JS file, and data
33 // URLs seem to be blocked in a chrome environment.
34 const workerContent = new Blob(
35 [
"console.log('hello world!')" ],
36 { type:
"application/javascript" }
38 const blobURL = URL.createObjectURL(workerContent);
40 // We start a worker and then terminate it right away to trigger our bug.
41 info(
"Starting the worker, and terminate it right away.");
42 const myWorker = new Worker(blobURL);
45 URL.revokeObjectURL(blobURL);
47 // We're deferring some little time so that the worker has the time to be
48 // properly cleaned up and the profiler actually saves the worker data.
49 return new Promise(resolve =
> {
50 setTimeout(resolve,
50);
54 runTest(settings, workload);