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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html

Issue 2681733003: Remove duplicate layout tests for nav timing 2 (Closed)
Patch Set: Created 3 years, 10 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/http/tests/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html b/third_party/WebKit/LayoutTests/http/tests/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html
deleted file mode 100644
index 6b1407d113341e90382cd99dd2716d1274c99ace..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>Navigation Timing 2 WPT</title>
- <link rel="author" title="Google" href="http://www.google.com/" />
- <link rel="help" href="http://www.w3.org/TR/navigation-timing-2/#sec-PerformanceNavigationTiming"/>
- <script src="/resources/testharness.js"></script>
- <script src="/resources/testharnessreport.js"></script>
- </head>
- <body>
- <h1>Description</h1>
- <p>This test validates that the values of nav timing 2 instance's timing-related attributes are in certain order and the others are of expected values.</p>
-
- <script>
- var navTiming2EventOrder1 = [
- 'startTime',
- 'redirectStart',
- //'unloadEventStart',
- 'redirectEnd',
- //'unloadEventEnd',
- 'fetchStart',
- 'domainLookupStart',
- 'domainLookupEnd',
- 'connectStart',
- //'secureConnectionStart',
- 'connectEnd',
- 'requestStart',
- 'responseStart',
- 'responseEnd',
- 'domInteractive',
- 'domContentLoadedEventStart',
- 'domContentLoadedEventEnd',
- 'domComplete',
- 'loadEventStart',
- 'loadEventEnd'
- ];
-
- var navTiming2EventOrder2 = [
- 'redirectStart',
- 'unloadEventStart',
- 'redirectEnd',
- 'unloadEventEnd',
- 'fetchStart'
- ];
-
- var navTiming2EventOrder3 = [
- 'connectStart',
- 'secureConnectionStart',
- 'connectEnd'
- ];
-
- function verifyTimingEventOrder(eventOrder, timingEntry) {
- for (var i = 0; i < eventOrder.length - 1; i++) {
- assert_true(timingEntry[eventOrder[i]] <= timingEntry[eventOrder[i + 1]],
- "Expected " + eventOrder[i] + " to be no greater than " + eventOrder[i + 1] + ".");
- }
- }
-
- async_test(function (t) {
- var observer = new PerformanceObserver(
- t.step_func(function (entryList) {
- var entries = entryList.getEntries();
- assert_equals(entries[0].entryType, "navigation",
- "Expected entryType to be: navigation.");
- assert_equals(entries[0].name, "http://127.0.0.1:8000/w3c/webperf/approved/navigation-timing/html/nav2_test_attributes_values.html");
- assert_equals(entries[0].startTime, 0,
- "Expected startTime to be: 0.");
- assert_equals(entries[0].duration, entries[0].loadEventEnd,
- "Expected duration to be equal to loadEventEnd.");
- assert_equals(entries[0].initiatorType, "navigation",
- "Expected initiatorType to be equal to navigation.");
- // This test may fail when response is from cach. Disable or clean cach before
- // running this test.
- assert_true(entries[0].transferSize > entries[0].encodedBodySize,
- "Expected transferSize to be greater than encodedBodySize in uncached navigation.");
- assert_equals(entries[0].encodedBodySize, 4180);
- assert_equals(entries[0].decodedBodySize, 4180);
- verifyTimingEventOrder(entries[0], navTiming2EventOrder1);
- // When unloadEvent happens
- if (entries[0]["unloadEventStart"] != 0) {
- verifyTimingEventOrder(entries[0], navTiming2EventOrder2);
- }
- // When a secure transport is used
- if (entries[0]["secureConnectionStart"] != 0) {
- verifyTimingEventOrder(entries[0], navTiming2EventOrder3);
- }
- observer.disconnect();
- t.done();
- })
- );
- observer.observe({entryTypes: ["navigation"]});
-
- }, "Performance navigation timing instance's value is reasonable.");
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698