tenfourfox/dom/workers/test/sharedworker_performance_user_timing.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

31 lines
844 B
JavaScript

var port;
function ok(a, msg) {
dump("OK: " + !!a + " => " + a + " " + msg + "\n");
port.postMessage({type: 'status', status: !!a, msg: a + ": " + msg });
}
function is(a, b, msg) {
dump("IS: " + (a===b) + " => " + a + " | " + b + " " + msg + "\n");
port.postMessage({type: 'status', status: a === b, msg: a + " === " + b + ": " + msg });
}
function isnot(a, b, msg) {
dump("ISNOT: " + (a===b) + " => " + a + " | " + b + " " + msg + "\n");
port.postMessage({type: 'status', status: a != b, msg: a + " != " + b + ": " + msg });
}
importScripts('../../../dom/base/test/test_performance_user_timing.js');
onconnect = function(evt) {
port = evt.ports[0];
for (var i = 0; i < steps.length; ++i) {
performance.clearMarks();
performance.clearMeasures();
steps[i]();
}
port.postMessage({type: 'finish'});
}