Skip to content

Commit

Permalink
Update NT2 name to be the requested URL instead of 'document'
Browse files Browse the repository at this point in the history
There's a strong request to merge this in M57, see spec bug: w3c/navigation-timing#59

BUG=675039

Review-Url: https://codereview.chromium.org/2675973004
Cr-Commit-Position: refs/heads/master@{#448517}
  • Loading branch information
shubhie authored and jeffcarp committed Feb 7, 2017
1 parent 4c44212 commit d24a86b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions navigation-timing/nav2_test_attributes_values.html
Expand Up @@ -63,8 +63,7 @@ <h1>Description</h1>
var entries = entryList.getEntries();
assert_equals(entries[0].entryType, "navigation",
"Expected entryType to be: navigation.");
assert_equals(entries[0].name, "document",
"Expected name to be: document.");
assert_equals(entries[0].name, "http://web-platform.test:8001/navigation-timing/nav2_test_attributes_values.html");
assert_equals(entries[0].startTime, 0,
"Expected startTime to be: 0.");
assert_equals(entries[0].duration, entries[0].loadEventEnd,
Expand All @@ -75,8 +74,8 @@ <h1>Description</h1>
// 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, 4140);
assert_equals(entries[0].decodedBodySize, 4140);
assert_equals(entries[0].encodedBodySize, 4154);
assert_equals(entries[0].decodedBodySize, 4154);
verifyTimingEventOrder(entries[0], navTiming2EventOrder1);
// When unloadEvent happens
if (entries[0]["unloadEventStart"] != 0) {
Expand Down
4 changes: 2 additions & 2 deletions navigation-timing/nav2_test_instance_accessors.html
Expand Up @@ -50,10 +50,10 @@ <h1>Description</h1>
t.step_func(function (entryList) {
var instance1 = performance.getEntries()[0];
var instance2 = performance.getEntriesByType("navigation")[0];
var instance3 = performance.getEntriesByName("document")[0];
var instance3 = performance.getEntriesByName("http://web-platform.test:8001/navigation-timing/nav2_test_instance_accessors.html")[0];

assert_equals(performance.getEntriesByType("navigation").length, 1, "Expected there is only one navigation timing instance.");
assert_equals(performance.getEntriesByName("document").length, 1, "Expected there is only one navigation timing instance.");
assert_equals(performance.getEntriesByName("http://web-platform.test:8001/navigation-timing/nav2_test_instance_accessors.html").length, 1, "Expected there is only one navigation timing instance.");

for (var i = 0; i < navTiming2Attributes.length; i++) {
assert_equals(instance1[navTiming2Attributes[i]], instance2[navTiming2Attributes[i]]);
Expand Down

0 comments on commit d24a86b

Please sign in to comment.