Unverified Commit dcb4bf86 authored by boklm's avatar boklm
Browse files

Bug 27137: Fix the user-timing-worker test

parent 83c24c2a
......@@ -404,6 +404,7 @@ our @tests = (
# uncomment this:
#prefs => {
# 'dom.enable_user_timing' => 'true',
# 'privacy.resistFingerprinting' => 'false',
#},
},
{
......
......@@ -13,8 +13,16 @@
</body>
<script>
var myWorkerMeasure = new Worker('data:text/javascript,onmessage = function(e) { var pass = false; try { performance.measure("measure1"); } catch (e) { pass = true; } postMessage(pass);}');
var myWorkerMark = new Worker('data:text/javascript,onmessage = function(e) { var pass = false; try { performance.mark("startTask1"); } catch (e) { pass = true; } postMessage(pass);}');
var myWorkerMeasure = new Worker(`data:text/javascript,onmessage = function(e) {
performance.mark("mark1");
performance.mark("mark2");
performance.measure("measure1", "mark1", "mark2");
postMessage(performance.getEntriesByType("measure").length == 0);
}`);
var myWorkerMark = new Worker(`data:text/javascript,onmessage = function(e) {
performance.mark("startTask1");
postMessage(performance.getEntriesByName("startTask1", "mark").length == 0);
}`);
var measure_result = false;
var mark_result = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment