Auto merge of #19031 - cbrewster:push_replace_state_early, r=asajeffrey

Implement initial part of history.state

<!-- Please describe your changes on the following line: -->
Implements maintaining the current history state. Tracking history state in the session history will be done as a followup.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19031)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-01-30 14:14:04 -06:00 committed by GitHub
commit 469dc84b6e
26 changed files with 130 additions and 105 deletions

View file

@ -1,5 +1,7 @@
[scroll-restoration-fragment-scrolling-samedoc.html]
type: testharness
expected: TIMEOUT
bug: https://github.com/servo/servo/issues/14970
[Manual scroll restoration should take precedent over scrolling to fragment in cross doc navigation]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +1,7 @@
[scroll-restoration-navigation-samedoc.html]
type: testharness
expected: TIMEOUT
bug: https://github.com/servo/servo/issues/14970
[history.{push,replace}State retain scroll restoration mode and navigation in the same document respects it]
expected: FAIL
expected: TIMEOUT

View file

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

View file

@ -1,8 +1,5 @@
[005.html]
type: testharness
[history.pushState support is needed for this testcase]
expected: FAIL
[<body onpopstate="..."> should register a listener for the popstate event]
expected: FAIL

View file

@ -1,14 +0,0 @@
[006.html]
type: testharness
[history.state should initially be null]
expected: FAIL
[history.state should still be null onload]
expected: FAIL
[history.state should still be null after onload]
expected: FAIL
[writing to history.state should be silently ignored and not throw an error]
expected: FAIL

View file

@ -1,14 +1,5 @@
[007.html]
type: testharness
[history.state should initially be null]
expected: FAIL
[history.pushState support is needed for this testcase]
expected: FAIL
[history.state should reflect pushed state]
expected: FAIL
[popstate event should fire before onload fires]
expected: FAIL

View file

@ -1,8 +1,5 @@
[011.html]
type: testharness
[pushState should be able to set the location state]
expected: FAIL
[pushed location should be reflected immediately]
expected: FAIL

View file

@ -1,8 +1,5 @@
[012.html]
type: testharness
[replaceState should be able to set the location state]
expected: FAIL
[replaced location should be reflected immediately]
expected: FAIL

View file

@ -1,5 +0,0 @@
[combination_history_001.html]
type: testharness
[Combine pushState and replaceSate methods]
expected: FAIL

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +0,0 @@
[history_pushstate.html]
type: testharness
[history pushState]
expected: FAIL

View file

@ -1,5 +0,0 @@
[history_pushstate_nooptionalparam.html]
type: testharness
[history pushState NoOptionalParam]
expected: FAIL

View file

@ -1,5 +0,0 @@
[history_replacestate.html]
type: testharness
[history replaceState]
expected: FAIL

View file

@ -1,5 +0,0 @@
[history_replacestate_nooptionalparam.html]
type: testharness
[history replaceStateNoOptionalParam]
expected: FAIL

View file

@ -1,5 +0,0 @@
[history_state.html]
type: testharness
[history state]
expected: FAIL

View file

@ -4455,9 +4455,6 @@
[BarProp interface: attribute visible]
expected: FAIL
[History interface: attribute state]
expected: FAIL
[History interface: operation pushState(any,DOMString,DOMString)]
expected: FAIL
@ -13644,30 +13641,9 @@
[Window interface: calling createImageBitmap(ImageBitmapSource, long, long, long, long, ImageBitmapOptions) on window with too few arguments must throw TypeError]
expected: FAIL
[History interface: operation pushState(any, DOMString, USVString)]
expected: FAIL
[History interface: operation replaceState(any, DOMString, USVString)]
expected: FAIL
[History interface: window.history must inherit property "scrollRestoration" with the proper type]
expected: FAIL
[History interface: window.history must inherit property "state" with the proper type]
expected: FAIL
[History interface: window.history must inherit property "pushState(any, DOMString, USVString)" with the proper type]
expected: FAIL
[History interface: calling pushState(any, DOMString, USVString) on window.history with too few arguments must throw TypeError]
expected: FAIL
[History interface: window.history must inherit property "replaceState(any, DOMString, USVString)" with the proper type]
expected: FAIL
[History interface: calling replaceState(any, DOMString, USVString) on window.history with too few arguments must throw TypeError]
expected: FAIL
[ApplicationCache interface: window.applicationCache must inherit property "UNCACHED" with the proper type]
expected: FAIL

View file

@ -1,3 +1,8 @@
[formAction_document_address.html]
type: testharness
expected: ERROR
[Check if button.formAction is the document's new address when formaction content attribute is missing and pushState has been used]
expected: FAIL
[Check if input.formAction is the document's new address when formaction content attribute is missing and pushState has been used]
expected: FAIL