mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Auto merge of #20329 - gterzian:before_unload, r=cbrewster
Implement beforeunload event and infrastructure <!-- Please describe your changes on the following line: --> Implementation of: 1. https://html.spec.whatwg.org/multipage/#prompt-to-unload-a-document, and 2. https://html.spec.whatwg.org/multipage/#unload-a-document --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #10787 and fix #20485 and fix #20588 and fix #20496 (github issue number if applicable). <!-- Either: --> - [ ] 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/20329) <!-- Reviewable:end -->
This commit is contained in:
commit
1d8283e010
37 changed files with 341 additions and 113 deletions
|
@ -1,10 +1,7 @@
|
|||
[url-in-tags-revoke.window.html]
|
||||
expected: TIMEOUT
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe.]
|
||||
expected: FAIL
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in <script> tags.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe navigation.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[pageshow event from traversal]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
[window-name-after-cross-origin-main-frame-navigation.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: ERROR
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[window-name-after-cross-origin-sub-frame-navigation.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Test that the window name is correct]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
[window-name-after-same-origin-main-frame-navigation.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: ERROR
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[window-name-after-same-origin-sub-frame-navigation.sub.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Test that the window name is correct]
|
||||
expected: NOTRUN
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
[007.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Link with onclick javascript url and href navigation ]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[child_navigates_parent_location.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Child document navigating parent via location ]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[001.html]
|
||||
type: testharness
|
||||
[document.open in unload]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[002.html]
|
||||
type: testharness
|
||||
[document.open in unload]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
[document.open in beforeunload with link]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[004.html]
|
||||
type: testharness
|
||||
[document.open in beforeunload with button]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[005.html]
|
||||
type: testharness
|
||||
[document.open in pagehide in iframe]
|
||||
expected: FAIL
|
|
@ -1 +0,0 @@
|
|||
disabled: for now
|
|
@ -0,0 +1,4 @@
|
|||
[beforeunload-on-history-back.html]
|
||||
type: testharness
|
||||
[beforeunload event fires on history navigation back]
|
||||
expected: FAIL
|
|
@ -0,0 +1,6 @@
|
|||
[beforeunload-on-navigation-of-parent.html]
|
||||
type: testharness
|
||||
[Triggering navigation from within beforeunload event]
|
||||
expected: FAIL
|
||||
[beforeunload in iframe on navigation of parent]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[navigation-within-beforeunload.html]
|
||||
type: testharness
|
||||
[Triggering navigation from within beforeunload event]
|
||||
expected: FAIL
|
|
@ -0,0 +1,4 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
[unload event properties]
|
||||
expected: FAIL
|
|
@ -0,0 +1,5 @@
|
|||
[006.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[salvagable state of document after setting pagehide listener]
|
||||
expected: TIMEOUT
|
|
@ -1,6 +1,4 @@
|
|||
[assign_after_load.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Assignment to location after document is completely loaded]
|
||||
expected: TIMEOUT
|
||||
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[assign_before_load.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Assignment to location before document is completely loaded]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -17,19 +17,3 @@
|
|||
|
||||
[Set data URL frame location.protocol to http+x]
|
||||
expected: FAIL
|
||||
|
||||
[Set HTTP URL frame location.protocol to x]
|
||||
expected: FAIL
|
||||
|
||||
[Set HTTP URL frame location.protocol to data]
|
||||
expected: FAIL
|
||||
|
||||
[Set HTTP URL frame location.protocol to ftp]
|
||||
expected: FAIL
|
||||
|
||||
[Set HTTP URL frame location.protocol to gopher]
|
||||
expected: FAIL
|
||||
|
||||
[Set HTTP URL frame location.protocol to http+x]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
[Window attribute: onmousewheel]
|
||||
expected: FAIL
|
||||
|
||||
[Window unforgeable attribute: location]
|
||||
expected: FAIL
|
||||
|
||||
[Window replaceable attribute: locationbar]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -44,9 +44,6 @@
|
|||
[Document interface: attribute onsecuritypolicyviolation]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: iframe.contentDocument must have own property "location"]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: iframe.contentDocument must inherit property "dir" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -113,9 +110,6 @@
|
|||
[Document interface: iframe.contentDocument must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must have own property "location"]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: new Document() must inherit property "dir" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -179,9 +173,6 @@
|
|||
[Document interface: new Document() must inherit property "onsecuritypolicyviolation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must have own property "location"]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "dir" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4991,9 +4982,6 @@
|
|||
[Window interface: window must inherit property "self" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: window must have own property "location"]
|
||||
expected: FAIL
|
||||
|
||||
[Window interface: window must inherit property "locationbar" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[079.html]
|
||||
type: testharness
|
||||
[ setting location to javascript URL from event handler ]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue