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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js

Issue 2839683003: Server-Timing (Closed)
Patch Set: make those robots happy, attempt #4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js b/third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js
index 5759fc0d710cc3781874522e76226b2422f66425..79c218f336fb0e7a08ae145dae39aac9517892ce 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/user-timing/resources/webperftestharness.js
@@ -12,7 +12,6 @@ policies and contribution forms [3].
// Helper Functions for NavigationTiming W3C tests
//
-var performanceNamespace = self.performance;
var timingAttributes = [
"navigationStart",
"unloadEventStart",
@@ -37,8 +36,6 @@ var timingAttributes = [
"loadEventEnd"
];
-var namespace_check = false;
-
function has_required_interfaces()
{
if (window.performance.mark == undefined ||
@@ -54,30 +51,6 @@ function has_required_interfaces()
return true;
}
-//
-// All test() functions in the WebPerf test suite should use wp_test() instead.
-//
-// wp_test() validates the window.performance namespace exists prior to running tests and
-// immediately shows a single failure if it does not.
-//
-
-function wp_test(func, msg, properties)
-{
- // only run the namespace check once
- if (!namespace_check)
- {
- namespace_check = true;
-
- if (performanceNamespace === undefined || performanceNamespace == null)
- {
- // show a single error that window.performance is undefined
- test(function() { assert_true(performanceNamespace !== undefined && performanceNamespace != null, "window.performance is defined and not null"); }, "window.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 related attributes. "});
- }
- }
-
- test(func, msg, properties);
-}
-
function test_namespace(child_name, skip_root)
{
if (skip_root === undefined) {
@@ -145,16 +118,6 @@ function sleep_milliseconds(n)
// Common helper functions
//
-function test_true(value, msg, properties)
-{
- wp_test(function () { assert_true(value, msg); }, msg, properties);
-}
-
-function test_equals(value, equals, msg, properties)
-{
- wp_test(function () { assert_equals(value, equals, msg); }, msg, properties);
-}
-
function test_greater_than(value, greater_than, msg, properties)
{
wp_test(function () { assert_true(value > greater_than, msg); }, msg, properties);

Powered by Google App Engine
This is Rietveld 408576698