GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove now invalid WPT assertions from the history interface · web-platform-tests/wpt@dc7f6a3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • html/browsers/history/the-history-interface
    • 001.html
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: html/browsers/history/the-history-interface/001.html
+6-9Lines 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 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.