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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/common/performance-timeline-utils.js

Issue 2799093004: Enable ServerTiming support
Patch Set: server-timing Created 3 years, 8 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
OLDNEW
(Empty)
1 var performanceNamespace = window.performance;
2 var namespace_check = false;
3 function wp_test(func, msg, properties)
4 {
5 // only run the namespace check once
6 if (!namespace_check)
7 {
8 namespace_check = true;
9
10 if (performanceNamespace === undefined || performanceNamespace == null)
11 {
12 // show a single error that window.performance is undefined
13 test(function() { assert_true(performanceNamespace !== undefined && perfor manceNamespace != null, "window.performance is defined and not null"); }, "windo w.performance is defined and not null.", {author:"W3C http://www.w3.org/",help:" http://www.w3.org/TR/navigation-timing/#sec-window.performance-attribute",assert :"The window.performance attribute provides a hosting area for performance relat ed attributes. "});
14 }
15 }
16
17 test(func, msg, properties);
18 }
19
20 function test_true(value, msg, properties)
21 {
22 wp_test(function () { assert_true(value, msg); }, msg, properties);
23 }
24
25 function test_equals(value, equals, msg, properties)
26 {
27 wp_test(function () { assert_equals(value, equals, msg); }, msg, properties);
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698