Bug 1451904 [wpt PR 10339] - Fix the |name| of PerformanceNavigationTiming, a=testonly
authorNicolas Pena <npm@chromium.org>
Mon, 09 Apr 2018 22:28:19 +0000
changeset 467320 f1e731ebb6bb0614bb31f287112ef2c320925a25
parent 467319 21f189e1f5c9894fda096f7ad04b180c39ae47fa
child 467321 04639022a761c8731ff1eef60b124935df809765
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1451904, 10339, 797465, 996579, 548773
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1451904 [wpt PR 10339] - Fix the |name| of PerformanceNavigationTiming, a=testonly Automatic update from web-platform-testsFix the |name| of PerformanceNavigationTiming Previously, the |name| of a PerformanceNavigationTiming entry was the initial URL (the request URL). After this CL, it is the response URL, so for example a url of the form 'redirect?location=newLoc' will have 'newLoc' as the |name|. Bug: 797465 Change-Id: Icab53ad8027d066422562c82bcf0354c264fea40 Reviewed-on: https://chromium-review.googlesource.com/996579 Reviewed-by: Yoav Weiss <yoav@yoav.ws> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#548773} wpt-commits: a0091fbff26091db1fd4b6ca07d9512edf7e6a95 wpt-pr: 10339 wpt-commits: a0091fbff26091db1fd4b6ca07d9512edf7e6a95 wpt-pr: 10339
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/navigation-timing/nav2_test_redirect_server.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -578063,17 +578063,17 @@
    "7ae8a4419a61778c6c781330a0eb19a4a8b2791c",
    "testharness"
   ],
   "navigation-timing/nav2_test_redirect_none.html": [
    "f2590b4842c0630f2e8337cf9546f431067dd850",
    "testharness"
   ],
   "navigation-timing/nav2_test_redirect_server.html": [
-   "fab304c2f896c156d3374073c8f870219f3e0246",
+   "788929e77d0f3979aeb5e05892ec069aeed6fb02",
    "testharness"
   ],
   "navigation-timing/nav2_test_redirect_xserver.html": [
    "bea5a9b9beb7f046e86d4beb605f719e09b1808c",
    "testharness"
   ],
   "navigation-timing/nav2_test_redirect_xserver_opt_in.html": [
    "7dc31b156bcd00099f9f2e69599e5bcde15b214e",
--- a/testing/web-platform/tests/navigation-timing/nav2_test_redirect_server.html
+++ b/testing/web-platform/tests/navigation-timing/nav2_test_redirect_server.html
@@ -6,29 +6,31 @@
         <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>
 
         <script>
 
             function verifyTimingEventOrder(eventOrder, timingEntry) {
-                for (var i = 0; i < eventOrder.length - 1; i++) {
+                for (let 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] + ".");
                 }
             }
 
             function onload_test()
             {
-                var frame_performance = document.getElementById("frameContext").contentWindow.performance;
-                assert_equals(frame_performance.getEntriesByType("navigation")[0].type,
+                const frame_performance = document.getElementById("frameContext").contentWindow.performance;
+                const navigation_entry = frame_performance.getEntriesByType("navigation")[0];
+                assert_equals(navigation_entry.type,
                         "navigate",
                         "Expected navigation type  to be navigate.");
-                assert_equals(frame_performance.getEntriesByType("navigation")[0].redirectCount, 1, "Expected redirectCount to be 1.");
+                assert_equals(navigation_entry.redirectCount, 1, "Expected redirectCount to be 1.");
+                assert_equals(navigation_entry.name, 'http://' + document.location.host + '/navigation-timing/resources/blank_page_green.html');
 
                 var timgingEvents = [
                     'startTime',
                     'redirectStart',
                     'redirectEnd',
                 ];
                 verifyTimingEventOrder(timgingEvents, frame_performance.getEntriesByType("navigation")[0]);
                 done();