Auto merge of #21882 - dguenther:update-document-open, r=nox

Update document.open to latest spec

<!-- Please describe your changes on the following line: -->

This is one of my first contributions, so I might need some direction cleaning it up -- I ran web-platform-tests locally, but the suite has several intermittent passes/failures for me. Thanks!

Few notes:

* I may have been wrong to eliminate all of the resets listed in what was formerly Step 18 (starts with `self.implementation.set(None);`). It's not clear to me that they're still needed or if so, what step they would fall under, but I didn't notice any web platform tests break as a result.
* <s>If I'm reading the spec right, there's a discrepancy in the error returned by the three-parameter overload of Document.open between the spec and web-platform-tests/implementations in other browsers. As written, I favored the spec, but it causes one web-platform-test to fail.</s> This has been resolved in https://github.com/whatwg/html/pull/4066
* I'm not 100% certain that tests pass as expected, I had several intermittent failures that disappeared when re-run.

---
<!-- 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
- [x] These changes fix #21445

<!-- Either: -->
- [x] There are tests for these changes (existing web-platform-tests)

<!-- 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/21882)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-10-16 04:50:43 -04:00 committed by GitHub
commit 4625160f0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 163 deletions

View file

@ -1,4 +0,0 @@
[001.html]
[Replacement of window object after document.open]
expected: FAIL

View file

@ -1,4 +0,0 @@
[005.html]
[Cancelling timeout after document.open]
expected: FAIL

View file

@ -1,4 +0,0 @@
[008.html]
[Replacement of document prototype object after document.open]
expected: FAIL

View file

@ -1,17 +0,0 @@
[009.https.html]
expected: ERROR
[document.open replacing singleton window]
expected: NOTRUN
[document.open replacing singleton location]
expected: NOTRUN
[document.open replacing singleton history]
expected: NOTRUN
[document.open replacing singleton navigator]
expected: NOTRUN
[document.open replacing singleton applicationCache]
expected: NOTRUN

View file

@ -1,7 +0,0 @@
[document.open-02.html]
[document.open should redirect to window.open when called with three arguments]
expected: FAIL
[document.open should throw when it has no window and is called with three arguments]
expected: FAIL

View file

@ -1,4 +0,0 @@
[document.open-03.html]
[document.open and singleton replacement]
expected: FAIL

View file

@ -5,9 +5,6 @@
[Event listeners are to be removed from shadow trees as well]
expected: FAIL
[Custom event listeners are to be removed from Window]
expected: FAIL
[Standard event listeners are to be removed from Window]
expected: FAIL
@ -17,9 +14,6 @@
[Custom event listeners are to be removed from Window for an active but not fully active document]
expected: FAIL
[Custom event listeners are to be removed from Window for a non-active document that is the associated Document of a Window (frame is removed)]
expected: FAIL
[Standard event listeners are to be removed from Window for an active but not fully active document]
expected: FAIL

View file

@ -1,13 +1,6 @@
[quirks.window.html]
[document.open() sets document to no-quirks mode (write new doctype)]
expected: FAIL
expected: CRASH
bug: https://github.com/servo/servo/issues/20218
[document.open() sets document to no-quirks mode, not limited-quirks mode]
expected: FAIL
[document.open() sets document to no-quirks mode (write no doctype)]
expected: FAIL
[document.open() sets document to no-quirks mode (write old doctype)]
expected: FAIL

View file

@ -1,4 +0,0 @@
[readiness.window.html]
[document.open() and readiness]
expected: FAIL

View file

@ -1,4 +0,0 @@
[url-fragment.window.html]
[document.open() and document's URL containing a fragment (entry is not relevant)]
expected: FAIL