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

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

Issue 2422433002: Add a layout test for longtask timing (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5
6 async_test(function (t) {
7 var observer = new PerformanceObserver(
8 t.step_func(function (entryList) {
9 var entries = entryList.getEntries();
10 /* TODO(panicker): Update after fixing http://crbug.com/651461 */
11 for (var i = 0; i < entries.length; i++) {
12 assert_equals(entries[i].entryType, "longtask",
13 "entryType expected to be: longtask");
14 assert_equals(entries[i].name, "same-origin",
15 "name expected to be: same-origin");
16 assert_greater_than(entries[i].duration, 50000,
17 "duration expected to be greater than 50ms threshold");
18 }
19 observer.disconnect();
20 t.done();
21 })
22 );
23 observer.observe({entryTypes: ["longtask"]});
24
25 /* Generate a slow task */
26 var begin = window.performance.now();
27 while (window.performance.now() < begin + 51);
28
29 }, "Performance longtask entries are observable");
30
31 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698