summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/test/js_worker-test.js
blob: 7b9538b0b97ade97ce4f8872a114f321512f326e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* eslint-disable no-unused-vars, no-undef */
"use strict";
startWorkerFromWorker();

var w;
function startWorkerFromWorker() {
  w = new Worker("js_worker-test2.js");
}

importScriptsFromWorker();

function importScriptsFromWorker() {
  try {
    importScripts("missing1.js", "missing2.js");
  } catch (e) {}
}

createJSONRequest();

function createJSONRequest() {
  const request = new XMLHttpRequest();
  request.open("GET", "missing.json", true);
  request.send(null);
}

fetchThing();

function fetchThing() {
  fetch("missing.txt");
}