Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic.html

Issue 111743007: Add the SharedWorker.workerStart property for high resolution timers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code style compliance Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8" /> 4 <meta charset="utf-8" />
5 <title>window.performance.now in dedicated workers</title> 5 <title>window.performance.now in dedicated workers</title>
6 <link rel="author" title="Google" href="http://www.google.com/" /> 6 <link rel="author" title="Google" href="http://www.google.com/" />
7 <link rel="help" href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighRes olutionTime2/Overview.html"/> 7 <link rel="help" href="https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighRes olutionTime2/Overview.html"/>
8 <script src="/w3c/resources/testharness.js"></script> 8 <script src="/w3c/resources/testharness.js"></script>
9 <script src="/w3c/resources/testharnessreport.js"></script> 9 <script src="/w3c/resources/testharnessreport.js"></script>
10 <script src="/w3c/webperf/resources/webperftestharness.js"></script> 10 <script src="/w3c/webperf/resources/webperftestharness.js"></script>
(...skipping 14 matching lines...) Expand all
25 var results = event.data; 25 var results = event.data;
26 assert_true(results.length == 3); 26 assert_true(results.length == 3);
27 test_true(results[0], "self.performance is defined"); 27 test_true(results[0], "self.performance is defined");
28 test_true(results[1], "self.performance.now is defined"); 28 test_true(results[1], "self.performance.now is defined");
29 test_greater_than(results[2], startTime, "Time in the worker should be after the startTime in the main document"); 29 test_greater_than(results[2], startTime, "Time in the worker should be after the startTime in the main document");
30 test_greater_than(window.performance.now(), results[2], "Time in the worker should be before the current time in the main document"); 30 test_greater_than(window.performance.now(), results[2], "Time in the worker should be before the current time in the main document");
31 done(); 31 done();
32 } 32 }
33 33
34 function start() { 34 function start() {
35 test_true(!("workerStart" in worker), "workerStart not defined on the Worker object");
35 worker.postMessage(tests); 36 worker.postMessage(tests);
36 } 37 }
37 38
38 window.addEventListener("load", start); 39 window.addEventListener("load", start);
39 </script> 40 </script>
40 </head> 41 </head>
41 <body> 42 <body>
42 <h1>Description</h1> 43 <h1>Description</h1>
43 <p>This test validates that performance.now() exists in dedicated workers and re ports reasonable times.</p> 44 <p>This test validates that performance.now() exists in dedicated workers and re ports reasonable times.</p>
44 45
45 <div id="log"></div> 46 <div id="log"></div>
46 47
47 </body> 48 </body>
48 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Google/HighResolutionTime/worker-dedicated-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698