summaryrefslogtreecommitdiffstats
path: root/dom/performance/tests/worker_performance_user_timing.js
blob: fa2f1afab0bca5a849d8956e3f9b38da289fa384 (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
function ok(a, msg) {
  dump("OK: " + !!a + "  =>  " + a + " " + msg + "\n");
  postMessage({type: 'status', status: !!a, msg: a + ": " + msg });
}

function is(a, b, msg) {
  dump("IS: " + (a===b) + "  =>  " + a + " | " + b + " " + msg + "\n");
  postMessage({type: 'status', status: a === b, msg: a + " === " + b + ": " + msg });
}

function isnot(a, b, msg) {
  dump("ISNOT: " + (a===b) + "  =>  " + a + " | " + b + " " + msg + "\n");
  postMessage({type: 'status', status: a != b, msg: a + " != " + b + ": " + msg });
}

importScripts(['test_performance_user_timing.js']);

for (var i = 0; i < steps.length; ++i) {
  performance.clearMarks();
  performance.clearMeasures();
  steps[i]();
}

postMessage({type: 'finish'});