Bug 1313420 - Implement Performance.timeOrigin - part 4 - tests, r=me
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 17 Nov 2016 12:50:10 +0100
changeset 323048 49305a317143402c791b71d667c0b1ca9c512e0b
parent 323047 68b33d652efc4e502fc2f270026434cee7dc86a9
child 323049 75b417fb952fb20d3dec91949e653d015600015e
push id30967
push userphilringnalda@gmail.com
push dateFri, 18 Nov 2016 03:21:38 +0000
treeherdermozilla-central@8e476f8bd52d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1313420
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1313420 - Implement Performance.timeOrigin - part 4 - tests, r=me
dom/performance/tests/test_timeOrigin.html
--- a/dom/performance/tests/test_timeOrigin.html
+++ b/dom/performance/tests/test_timeOrigin.html
@@ -27,29 +27,29 @@ function testBasic() {
 
 function testWorker() {
   var now = performance.now();
 
   var blob = new Blob([ document.getElementById("worker-src").textContent ],
                       { type: "text/javascript" });
   var w = new Worker(URL.createObjectURL(blob));
   w.onmessage = function(e) {
-    ok (e.now + e.timeOrigin > now + performance.timeOrigin, "Comparing worker.now and window.now");
+    ok (e.data.now + e.data.timeOrigin > now + performance.timeOrigin, "Comparing worker.now and window.now");
     next();
   }
 }
 
 function testSharedWorker() {
   var now = performance.now();
 
   var blob = new Blob([ document.getElementById("shared-worker-src").textContent ],
                       { type: "text/javascript" });
   var w = new SharedWorker(URL.createObjectURL(blob));
   w.port.onmessage = function(e) {
-    ok (e.now + e.timeOrigin > now + performance.timeOrigin, "Comparing worker.now and window.now");
+    ok (e.data.now + e.data.timeOrigin > now + performance.timeOrigin, "Comparing worker.now and window.now");
     next();
   }
 }
 
 var tests = [ testBasic, testWorker, testSharedWorker ];
 function next() {
   if (!tests.length) {
     SimpleTest.finish();