Skip to content

Commit dc7f6a3

Browse files
theIDinsidemoz-wptsync-bot
authored andcommitted
Remove now invalid WPT assertions from the history interface
The language "remove any tasks queued by the history traversal task source" seems to have existed in the spec at one point; the same language was found in Gecko but is removed by 2067178. Differential Revision: https://phabricator.services.mozilla.com/D329584 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2076142 gecko-commit: c27032a57e6fee053ef953bd443ed9fa023c6747 gecko-commit-git: e2b3074ae22d0415f4a84c234e3a272575af9c96 gecko-reviewers: dom-core-reviewers, smaug
1 parent 989c64c commit dc7f6a3

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

  • html/browsers/history/the-history-interface

‎html/browsers/history/the-history-interface/001.html‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,26 +129,23 @@
129129
iframe.contentWindow.history.pushState('','','#test3');
130130
assert_equals( iframe.contentWindow.location.hash.replace(/^#/,''), 'test3' );
131131
}, 'pushState must be able to set location.hash');
132-
//begin setup for "remove any tasks queued by the history traversal task source"
133132
iframe.contentWindow.location.hash = '#test4';
134-
iframe.contentWindow.history.go(-1); //must be queued
133+
iframe.contentWindow.history.go(-1);
135134
try {
136-
//must remove the queued navigation in the same browsing context
135+
// Queued a go to test3, the pushState is inserted after test3
137136
iframe.contentWindow.history.pushState('','');
138137
} catch(unsuperr) {}
139-
//allow the browser to mistakenly run the .go if it is going to
140-
//do not put two .go commands in the same thread, in case the browser mistakenly calculates the history position when
141-
//calling .go instead of when executing the traversal task - that could give a false PASS in the next test otherwise
142138
setTimeout(tests7,50);
143139
}
144140
function tests7() {
145-
iframe.contentWindow.history.go(-1); //must be queued, but should not be removed this time
141+
// Standing at test3, go(-1) should take us to 'test'
142+
iframe.contentWindow.history.go(-1);
146143
iframe.contentWindow.addEventListener("popstate", tests8, {once: true});
147144
}
148145
function tests8() {
149146
test(function () {
150-
assert_equals( iframe.contentWindow.location.hash.replace(/^#/,''), 'test4' );
151-
}, 'pushState must remove any tasks queued by the history traversal task source');
147+
assert_equals( iframe.contentWindow.location.hash.replace(/^#/,''), 'test' );
148+
}, 'pushState must not remove tasks queued by the history traversal task source');
152149
//end "remove any tasks queued by the history traversal task source"
153150
window.addEventListener('hashchange',function () { hashchng = true; },false);
154151
try {

0 commit comments

Comments
 (0)