implement window.open, create auxiliary browsing context

This commit is contained in:
Gregory Terzian 2018-04-22 12:58:30 +08:00
parent 3e96a322ae
commit f408b798c4
93 changed files with 476 additions and 324 deletions

View file

@ -1,5 +1,6 @@
[embedded-credentials.tentative.sub.html]
type: testharness
expected: TIMEOUT
[Embedded credentials are treated as network errors.]
expected: FAIL
@ -7,14 +8,14 @@
expected: FAIL
[Embedded credentials are treated as network errors in new windows.]
expected: FAIL
expected: TIMEOUT
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
expected: FAIL
expected: TIMEOUT
[Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.]
expected: FAIL
expected: TIMEOUT
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
expected: FAIL
expected: TIMEOUT

View file

@ -1,8 +1,9 @@
[resume-timer-on-history-back.html]
type: testharness
expected: TIMEOUT
[history.back() handles top level page timer correctly]
expected: FAIL
expected: TIMEOUT
[history.back() handles nested iframe timer correctly]
expected: FAIL
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[window-name-after-cross-origin-aux-frame-navigation.sub.html]
type: testharness
expected: ERROR
[Test that the window name is correct]
expected: NOTRUN

View file

@ -1,6 +1,5 @@
[window-name-after-cross-origin-main-frame-navigation.sub.html]
type: testharness
expected: ERROR
[window.name should equal "" after a cross-origin main frame navigation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +0,0 @@
[window-name-after-same-origin-aux-frame-navigation.sub.html]
type: testharness
expected: ERROR
[Test that the window name is correct]
expected: NOTRUN

View file

@ -1,3 +0,0 @@
[005.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[006.html]
type: testharness
expected: TIMEOUT

View file

@ -1,3 +1,5 @@
[008.html]
type: testharness
expected: TIMEOUT
[Link with onclick form submit to javascript url and href navigation ]
expected: FAIL

View file

@ -1,3 +1,5 @@
[009.html]
type: testharness
expected: TIMEOUT
[Link with onclick form submit to javascript url with document.write and href navigation ]
expected: FAIL

View file

@ -1,4 +0,0 @@
[010.html]
type: testharness
[Link with onclick form submit to javascript url with delayed document.write and href navigation ]
expected: FAIL

View file

@ -1,3 +0,0 @@
[011.html]
type: testharness
expected: TIMEOUT

View file

@ -1,6 +0,0 @@
[child_navigates_parent_submit.html]
type: testharness
expected: TIMEOUT
[Child document navigating parent via submit ]
expected: TIMEOUT

View file

@ -1,4 +0,0 @@
[javascript-url-abort-return-value-string.tentative.html]
[Aborting fetch for javascript:string navigation]
expected: FAIL

View file

@ -1,5 +0,0 @@
[pageload-image-in-popup.html]
expected: ERROR
[The document for a standalone media file should have one child in the body.]
expected: NOTRUN

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,24 +1,5 @@
[001.html]
type: testharness
expected: ERROR
[Session history length on initial load]
expected: NOTRUN
[Session history length on adding new iframe]
expected: NOTRUN
[Navigating second iframe]
expected: NOTRUN
[Traversing history back (1)]
expected: NOTRUN
[Navigating first iframe]
expected: NOTRUN
[Traversing history back (2)]
expected: NOTRUN
expected: TIMEOUT
[Traversing history forward]
expected: NOTRUN

View file

@ -1,12 +1,5 @@
[002.html]
type: testharness
expected: ERROR
[Session history length on initial load]
expected: NOTRUN
[Session history length on adding new iframe]
expected: NOTRUN
expected: TIMEOUT
[Navigating second iframe]
expected: NOTRUN
expected: TIMEOUT

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +0,0 @@
[reload_document_write.html]
type: testharness
[Reload document with document.written content]
expected: FAIL

View file

@ -1,6 +1,5 @@
[scripted_click_assign_during_load.html]
type: testharness
expected: ERROR
[Assignment to location with click during load]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +0,0 @@
[scripted_click_location_assign_during_load.html]
type: testharness
expected: ERROR
[location.assign with click during load]
expected: NOTRUN

View file

@ -1,6 +1,5 @@
[scripted_form_submit_assign_during_load.html]
type: testharness
expected: ERROR
[Assignment to location with form submit during load]
expected: NOTRUN
expected: FAIL

View file

@ -1,5 +1,4 @@
[navigation-in-onload.tentative.html]
expected: ERROR
[Navigation in onload handler]
expected: NOTRUN
expected: FAIL

View file

@ -1,5 +1,3 @@
[cross-origin-objects-on-new-window.html]
type: testharness
[Cross-origin behavior of Window and Location on new Window]
expected: FAIL
expected: TIMEOUT

View file

@ -1,8 +0,0 @@
[window_length.html]
type: testharness
[Opened window]
expected: FAIL
[Iframe in opened window]
expected: FAIL

View file

@ -1,6 +0,0 @@
[close_beforeunload.html]
type: testharness
expected: ERROR
[Running beforeunload handler in window.close()]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[close_unload.html]
type: testharness
expected: ERROR
[Running unload handler in window.close()]
expected: NOTRUN

View file

@ -3,12 +3,3 @@
[first argument: absolute url]
expected: FAIL
[first argument: empty url]
expected: FAIL
[second argument: passing a non-empty name]
expected: FAIL
[second argument: setting name after opening]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-negative-innerwidth-innerheight.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-negative-screenx-screeny.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: negative values for legacy `screenx`, `screeny`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-negative-top-left.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: negative values for `top`, `left`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-negative-width-height.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: negative values for `width`, `height`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-height.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for feature `height`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-innerheight.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for legacy feature `innerheight`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-innerwidth.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for legacy feature `innerwidth`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-left.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for feature `left`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-screenx.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for legacy feature `screenx`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-screeny.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for legacy feature `screeny`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-top.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for feature `top`]
expected: FAIL

View file

@ -1,3 +1,5 @@
[open-features-non-integer-width.html]
type: testharness
expected: ERROR
[HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL

View file

@ -1,23 +1,7 @@
[open-features-tokenization-noopener.html]
type: testharness
[tokenization should skip window features separators before `name`]
expected: FAIL
[feature `name` should be converted to ASCII lowercase]
expected: FAIL
[after `name`, tokenization should skip window features separators that are not "=" or ","]
expected: FAIL
[Tokenizing should ignore window feature separators except "," after initial "=" and before value]
expected: FAIL
[Tokenizing should read characters until first window feature separator as `value`]
expected: FAIL
["noopener" should be based on name (key), not value]
expected: FAIL
[invalid feature names should not tokenize as "noopener"]
expected: FAIL

View file

@ -1,6 +1,5 @@
[discard_iframe_history_1.html]
type: testharness
expected: ERROR
[Removing iframe from document removes it from history]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +1,5 @@
[discard_iframe_history_2.html]
type: testharness
expected: ERROR
[Removing iframe from document via innerHTML removes it from history]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +0,0 @@
[discard_iframe_history_3.html]
type: testharness
expected: ERROR
[Removing iframe from document removes it from history]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[discard_iframe_history_4.html]
type: testharness
expected: ERROR
[Removing iframe from document removes it from history]
expected: NOTRUN

View file

@ -335,9 +335,6 @@
[A SecurityError exception must be thrown when window.stop is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.opener is accessed from a different origin.]
expected: FAIL
[A SecurityError exception should not be thrown when window.blur is accessed from a different origin.]
expected: FAIL

View file

@ -1,6 +1,5 @@
[window-open-noopener.html]
type: testharness
expected: ERROR
[window.open() with 'noopener' should not reuse existing target]
expected: FAIL
@ -27,15 +26,13 @@
[window-open-noopener.html?_parent]
expected: ERROR
[noopener window.open targeting _parent]
expected: NOTRUN
expected: FAIL
[window-open-noopener.html?_top]
expected: ERROR
[noopener window.open targeting _top]
expected: NOTRUN
expected: FAIL
[window-open-noopener.html?indexed]
@ -63,7 +60,12 @@
[window-open-noopener.html?_self]
expected: ERROR
[noopener window.open targeting _self]
expected: FAIL
[noopener window.open targeting _parent]
expected: NOTRUN
[noopener window.open targeting _top]
expected: NOTRUN

View file

@ -5,9 +5,6 @@
[Window method: blur]
expected: FAIL
[Window method: open]
expected: FAIL
[Window method: confirm]
expected: FAIL
@ -23,9 +20,6 @@
[Window readonly attribute: applicationCache]
expected: FAIL
[Window attribute: opener]
expected: FAIL
[Window attribute: onmousewheel]
expected: FAIL

View file

@ -1,3 +1,5 @@
[opener-closed.html]
type: testharness
expected: TIMEOUT
[An auxiliary browsing context should report `null` for `window.opener` when that browsing context is discarded]
expected: TIMEOUT

View file

@ -1,3 +1,5 @@
[opener-multiple.html]
type: testharness
expected: TIMEOUT
[An auxiliary browsing context should be able to open another auxiliary browsing context]
expected: TIMEOUT

View file

@ -1,5 +1,6 @@
[opener-noreferrer.html]
type: testharness
expected: TIMEOUT
[Auxiliary browsing context created with `rel="noreferrer"` should report `window.opener` `null`]
expected: FAIL
expected: TIMEOUT

View file

@ -1,3 +1,7 @@
[opener.html]
type: testharness
expected: TIMEOUT
[Newly-created auxiliary browsing context should report `window.opener`]
expected: TIMEOUT
[Browsing context created with `window.open` should report `window.opener`]
expected: FAIL

View file

@ -1,5 +1,6 @@
[choose-_blank-002.html]
type: testharness
expected: TIMEOUT
[Context for opened noreferrer link targeted to "_blank" should not have opener reference]
expected: FAIL
expected: TIMEOUT

View file

@ -0,0 +1,6 @@
[choose-_blank-003.html]
type: testharness
expected: TIMEOUT
[Context created by link targeting "_blank" should retain opener reference]
expected: TIMEOUT

View file

@ -2,7 +2,3 @@
type: testharness
[A embedded browsing context has empty-string default name]
expected: FAIL
[A browsing context which is opened by window.open() method with '_blank' parameter has empty-string default name]
expected: FAIL

View file

@ -1,6 +0,0 @@
[choose-existing-001.html]
type: testharness
expected: TIMEOUT
[An existing browsing context must be chosen if the given name is the same as its name]
expected: TIMEOUT

View file

@ -1,5 +1,6 @@
[noreferrer-null-opener.html]
type: testharness
expected: TIMEOUT
[rel=noreferrer nullifies window.opener]
expected: FAIL
expected: TIMEOUT

View file

@ -1,6 +1,13 @@
[noreferrer-window-name.html]
type: testharness
expected: TIMEOUT
[rel=noreferrer and reuse of names]
[Following a noreferrer link with a named target should not cause creation of a window that can be targeted by another noreferrer link with the same named target]
expected: TIMEOUT
[Targeting a rel=noreferrer link at an existing named subframe should work]
expected: FAIL
[Targeting a rel=noreferrer link at an existing named window should work]
expected: FAIL

View file

@ -1,3 +1,5 @@
[targeting-cross-origin-nested-browsing-contexts.html]
type: testharness
expected: TIMEOUT
[Targeting nested browsing contexts]
expected: FAIL

View file

@ -1,7 +1,4 @@
[usvstring-reflection.html]
[window.open : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[anchor : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
@ -17,12 +14,6 @@
[source : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[Document URLs: unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[location.href : unpaired surrogate codepoint should be replaced with U+FFFD]
expected: FAIL
[sendBeacon URL: unpaired surrogate codepoint should not make any exceptions.]
expected: FAIL

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_escaping-1.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_escaping-2.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_nonescaping-1.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN
expected: FAIL

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_nonescaping-2.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN
expected: FAIL

View file

@ -1,3 +1,11 @@
[submission-checks.window.html]
type: testharness
expected: TIMEOUT
[<form> not connected to a document cannot navigate]
expected: FAIL
[<form> not connected to a document after submit event cannot navigate]
expected: FAIL
[<form> in a navigated document cannot navigate]
expected: FAIL

View file

@ -2,5 +2,14 @@
type: testharness
expected: ERROR
[Check that rel=noopener with target=_self does a normal load]
expected: FAIL
[Check that targeting of rel=noopener with a given name ignores an existing window with that name]
expected: NOTRUN
[Check that rel=noopener with target=_parent does a normal load]
expected: FAIL
[Check that rel=noopener with target=_top does a normal load]
expected: FAIL

View file

@ -2,7 +2,7 @@
type: testharness
expected: TIMEOUT
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT
expected: FAIL
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT

View file

@ -1,6 +1,5 @@
[003.html]
type: testharness
expected: TIMEOUT
[WebSockets: navigating nested browsing context]
expected: TIMEOUT
expected: FAIL

View file

@ -1,5 +1,5 @@
[004.html]
type: testharness
[WebSockets: navigating nested browsing context with closed websocket]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +0,0 @@
[storage_local_window_open.html]
type: testharness
bug: https://github.com/servo/servo/issues/13241
[A new window to make sure there is a copy of the previous window's localStorage, and that they do not diverge after a change]
expected: FAIL

View file

@ -1,6 +1,6 @@
[open-url-multi-window-6.htm]
type: testharness
expected: ERROR
expected: TIMEOUT
[XMLHttpRequest: open() in document that is not fully active (but may be active) should throw]
expected: NOTRUN
expected: TIMEOUT