Implement history state

This commit is contained in:
Connor Brewster 2018-04-14 01:53:11 -05:00
parent e4472f7c1f
commit 17bd80a7b1
55 changed files with 316 additions and 359 deletions

View file

@ -1,7 +0,0 @@
[popstate_event.html]
type: testharness
expected: TIMEOUT
bug: https://github.com/servo/servo/issues/19905
[Queue a task to fire popstate event]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT
expected: FAIL

View file

@ -4,99 +4,3 @@
[history.length should update when setting location.hash]
expected: FAIL
[history.pushState must exist]
expected: FAIL
[history.pushState must exist within iframes]
expected: FAIL
[initial history.state should be null]
expected: FAIL
[history.length should update when pushing a state]
expected: FAIL
[history.state should update after a state is pushed]
expected: FAIL
[traversing history must traverse pushed states]
expected: FAIL
[pushState must not be allowed to create invalid URLs]
expected: FAIL
[pushState must not be allowed to create cross-origin URLs]
expected: FAIL
[pushState must not be allowed to create cross-origin URLs (about:blank)]
expected: FAIL
[pushState must not be allowed to create cross-origin URLs (data:URI)]
expected: FAIL
[pushState should not actually load the new URL]
expected: FAIL
[security errors are expected to be thrown in the context of the document that owns the history object]
expected: FAIL
[location.hash must be allowed to change (part 1)]
expected: FAIL
[location.hash must be allowed to change (part 2)]
expected: FAIL
[pushState must not alter location.hash when no URL is provided]
expected: FAIL
[pushState must remove all history after the current state]
expected: FAIL
[pushState must be able to set location.hash]
expected: FAIL
[pushState must remove any tasks queued by the history traversal task source]
expected: FAIL
[pushState must be able to set location.pathname]
expected: FAIL
[pushState must be able to set absolute URLs to the same host]
expected: FAIL
[pushState must not be able to use a function as data]
expected: FAIL
[pushState must not be able to use a DOM node as data]
expected: FAIL
[pushState must not be able to use an error object as data]
expected: FAIL
[security errors are expected to be thrown in the context of the document that owns the history object (2)]
expected: FAIL
[pushState must be able to make structured clones of complex objects]
expected: FAIL
[history.state should also reference a clone of the original object]
expected: FAIL
[popstate event should fire when navigation occurs]
expected: FAIL
[popstate event should pass the state data]
expected: FAIL
[state data should cope with circular object references]
expected: FAIL
[state data should be a clone of the original object, not a reference to it]
expected: FAIL
[history.state should also reference a clone of the original object (2)]
expected: FAIL
[history.state should be a separate clone of the object, not a reference to the object passed to the event handler]
expected: FAIL

View file

@ -4,96 +4,3 @@
[history.length should update when setting location.hash]
expected: FAIL
[history.replaceState must exist]
expected: FAIL
[history.replaceState must exist within iframes]
expected: FAIL
[initial history.state should be null]
expected: FAIL
[history.length should not update when replacing a state with no URL]
expected: FAIL
[history.state should update after a state is pushed]
expected: FAIL
[hash should not change when replaceState is called without a URL]
expected: FAIL
[history.length should not update when replacing a state with a URL]
expected: FAIL
[hash should change when replaceState is called with a URL]
expected: FAIL
[replaceState must replace the existing state without altering the forward history]
expected: FAIL
[replaceState must not be allowed to create invalid URLs]
expected: FAIL
[replaceState must not be allowed to create cross-origin URLs]
expected: FAIL
[replaceState must not be allowed to create cross-origin URLs (about:blank)]
expected: FAIL
[replaceState must not be allowed to create cross-origin URLs (data:URI)]
expected: FAIL
[security errors are expected to be thrown in the context of the document that owns the history object]
expected: FAIL
[replaceState must be able to set location.pathname]
expected: FAIL
[replaceState must be able to set absolute URLs to the same host]
expected: FAIL
[replaceState must not remove any tasks queued by the history traversal task source]
expected: FAIL
[.go must queue a task with the history traversal task source (run asynchronously)]
expected: FAIL
[replaceState must not be able to use a function as data]
expected: FAIL
[replaceState must not be able to use a DOM node as data]
expected: FAIL
[replaceState must not be able to use an error object as data]
expected: FAIL
[replaceState should not actually load the new URL]
expected: FAIL
[security errors are expected to be thrown in the context of the document that owns the history object (2)]
expected: FAIL
[replaceState must be able to make structured clones of complex objects]
expected: FAIL
[history.state should also reference a clone of the original object]
expected: FAIL
[popstate event should fire when navigation occurs]
expected: FAIL
[popstate event should pass the state data]
expected: FAIL
[state data should cope with circular object references]
expected: FAIL
[state data should be a clone of the original object, not a reference to it]
expected: FAIL
[history.state should also reference a clone of the original object (2)]
expected: FAIL
[history.state should be a separate clone of the object, not a reference to the object passed to the event handler]
expected: FAIL

View file

@ -1,5 +1,4 @@
[004.html]
type: testharness
[browser needs to support hashchange events for this testcase]
expected: FAIL

View file

@ -1,8 +0,0 @@
[005.html]
type: testharness
[<body onpopstate="..."> should register a listener for the popstate event]
expected: FAIL
[window.onpopstate should register a listener for the popstate event]
expected: FAIL

View file

@ -1,14 +0,0 @@
[007.html]
type: testharness
[popstate event should fire before onload fires]
expected: FAIL
[the correct state should be restored when navigating during initial load]
expected: FAIL
[history.state should reflect the navigated state onload]
expected: FAIL
[history.state should reflect the navigated state after onload]
expected: FAIL

View file

@ -1,5 +1,4 @@
[008.html]
type: testharness
[history.pushState URL resolving should be done relative to the document, not the script]
expected: FAIL

View file

@ -1,5 +1,4 @@
[009.html]
type: testharness
[HTTP Referer should use the pushed state]
expected: FAIL

View file

@ -1,5 +1,4 @@
[010.html]
type: testharness
[HTTP Referer should use the pushed state (before onload)]
expected: FAIL

View file

@ -1,5 +1,4 @@
[011.html]
type: testharness
[pushed location should be reflected immediately]
expected: FAIL

View file

@ -1,5 +1,4 @@
[012.html]
type: testharness
[replaced location should be reflected immediately]
expected: FAIL

View file

@ -1,5 +0,0 @@
[combination_history_002.html]
type: testharness
[After calling of pushState method, check length]
expected: FAIL

View file

@ -1,5 +0,0 @@
[combination_history_003.html]
type: testharness
[After calling of pushState and replaceState methods, check length]
expected: FAIL

View file

@ -1,6 +0,0 @@
[combination_history_004.html]
type: testharness
expected: TIMEOUT
[After calling of back method, check length]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[combination_history_005.html]
type: testharness
expected: TIMEOUT
[After calling of forward method, check length]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[combination_history_006.html]
type: testharness
expected: TIMEOUT
[After calling of go method, check length]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[combination_history_007.html]
type: testharness
expected: TIMEOUT
[After calling of back and pushState method, check length]
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[history_back.html]
type: testharness
expected: TIMEOUT
[history back]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[history_back_1.html]
type: testharness
[history.back() with session history]
expected: FAIL

View file

@ -1,6 +0,0 @@
[history_forward.html]
type: testharness
expected: TIMEOUT
[history forward]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[history_forward_1.html]
type: testharness
[history.forward() with session history]
expected: FAIL

View file

@ -1,6 +0,0 @@
[history_go_minus.html]
type: testharness
expected: TIMEOUT
[history go minus]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[history_go_no_argument.html]
type: testharness
[history.go()]
expected: FAIL

View file

@ -1,6 +0,0 @@
[history_go_plus.html]
type: testharness
expected: TIMEOUT
[history go plus]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[history_go_to_uri.html]
type: testharness
[history.go() negative tests]
expected: FAIL

View file

@ -1,5 +1,4 @@
[history_go_undefined.html]
type: testharness
[history.forward() with session history]
expected: FAIL

View file

@ -1,5 +1,4 @@
[history_go_zero.html]
type: testharness
[history.go(0)]
expected: FAIL

View file

@ -1,5 +1,4 @@
[history_properties_only_fully_active.html]
type: testharness
[history properties should throw SecurityError when not in a fully active Document]
expected: FAIL

View file

@ -1,5 +1,4 @@
[history_pushstate_err.html]
type: testharness
[history pushState SECURITY_ERR]
expected: FAIL

View file

@ -1,5 +1,4 @@
[history_replacestate_err.html]
type: testharness
[history replaceState SECURITY_ERR]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_1.html]
type: testharness
[Multiple history traversals from the same task]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_2.html]
type: testharness
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_3.html]
type: testharness
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_4.html]
type: testharness
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_5.html]
type: testharness
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_unload_1.html]
type: testharness
[Traversing the history, unload event is fired on doucment]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_write_after_load_1.html]
type: testharness
[Traverse the history after document.write after the load event]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_write_after_load_2.html]
type: testharness
[Traverse the history back and forward when a history entry is written after the load event]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_write_onload_1.html]
type: testharness
[Traverse the history when a history entry is written in the load event]
expected: FAIL

View file

@ -1,5 +1,4 @@
[traverse_the_history_write_onload_2.html]
type: testharness
[Traverse the history back and forward when a history entry is written in the load event]
expected: FAIL