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

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

Issue 2553493003: Add more detail to same-origin attribution indicating self|ancestor|descendant (Closed)
Patch Set: update layout test 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/Performance.cpp » ('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", 14 assert_equals(entries[i].name, "same-origin-self",
15 "name expected to be: same-origin"); 15 "name expected to be: same-origin-self");
16 assert_greater_than(entries[i].duration, 50000, 16 assert_greater_than(entries[i].duration, 50000,
17 "duration expected to be greater than 50ms threshold"); 17 "duration expected to be greater than 50ms threshold");
18 } 18 }
19 observer.disconnect(); 19 observer.disconnect();
20 t.done(); 20 t.done();
21 }) 21 })
22 ); 22 );
23 observer.observe({entryTypes: ["longtask"]}); 23 observer.observe({entryTypes: ["longtask"]});
24 24
25 /* Generate a slow task */ 25 /* Generate a slow task */
26 var begin = window.performance.now(); 26 var begin = window.performance.now();
27 while (window.performance.now() < begin + 51); 27 while (window.performance.now() < begin + 51);
28 28
29 }, "Performance longtask entries are observable"); 29 }, "Performance longtask entries are observable");
30 30
31 </script> 31 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/timing/Performance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698