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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/performance/longtasktiming.html

Issue 2593853002: Remove unnecessary wrapper on DomHighResTimestamp, and clamp resolution to 1 millisecond (Closed)
Patch Set: address format nit Created 4 years 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 | third_party/WebKit/Source/core/timing/PerformanceBase.h » ('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 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 5
6 async_test(function (t) { 6 async_test(function (t) {
7 var observer = new PerformanceObserver( 7 var observer = new PerformanceObserver(
8 t.step_func(function (entryList) { 8 t.step_func(function (entryList) {
9 var entries = entryList.getEntries(); 9 var entries = entryList.getEntries();
10 /* TODO(panicker): Update after fixing http://crbug.com/651461 */ 10 /* TODO(panicker): Update after fixing http://crbug.com/651461 */
11 for (var i = 0; i < entries.length; i++) { 11 for (var i = 0; i < entries.length; i++) {
12 assert_equals(entries[i].entryType, "longtask", 12 assert_equals(entries[i].entryType, "longtask",
13 "entryType expected to be: longtask"); 13 "entryType expected to be: longtask");
14 assert_equals(entries[i].name, "same-origin-self", 14 assert_equals(entries[i].name, "same-origin-self",
15 "name expected to be: same-origin-self"); 15 "name expected to be: same-origin-self");
16 assert_greater_than(entries[i].duration, 50000, 16 assert_greater_than(entries[i].duration, 50,
17 "duration expected to be greater than 50ms threshold"); 17 "duration expected to be greater than 50ms threshold");
18 assert_equals(entries[i].startTime, Math.floor(entries[i].startT ime),
19 "startTime expected to have 1 miilisecond granularity");
18 } 20 }
19 observer.disconnect(); 21 observer.disconnect();
20 t.done(); 22 t.done();
21 }) 23 })
22 ); 24 );
23 observer.observe({entryTypes: ["longtask"]}); 25 observer.observe({entryTypes: ["longtask"]});
24 26
25 /* Generate a slow task */ 27 /* Generate a slow task */
26 var begin = window.performance.now(); 28 var begin = window.performance.now();
27 while (window.performance.now() < begin + 51); 29 while (window.performance.now() < begin + 51);
28 30
29 }, "Performance longtask entries are observable"); 31 }, "Performance longtask entries are observable");
30 32
31 </script> 33 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/timing/PerformanceBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698