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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-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/navigation-timing/resources/webperftestharness.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/resources/webperftestharness.js b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/resources/webperftestharness.js
index 750946dde20bfe0c6b431fcd8a39ae6b2342f2f6..f9b56d98689667cee0f69de5d6da973d6d2c08e0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/resources/webperftestharness.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/resources/webperftestharness.js
@@ -12,7 +12,6 @@ policies and contribution forms [3].
// Helper Functions for NavigationTiming W3C tests
//
-var performanceNamespace = window.performance;
var timingAttributes = [
'connectEnd',
'connectStart',
@@ -36,32 +35,6 @@ var timingAttributes = [
'unloadEventStart'
];
-var namespace_check = false;
-
-//
-// 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) {
@@ -129,16 +102,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