Commit a5b8b76d authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

Match the spec regarding browsing context selection with noopener

Bug: 961816
Change-Id: Ie17882325e9acb124843e8a1f70e5a570738e2a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601653
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659158}
parent a0c6d1b5
......@@ -91,6 +91,11 @@ blink::WebScreenInfo WebViewTestProxy::GetScreenInfo() {
}
void WebViewTestProxy::Reset() {
// TODO(https://crbug.com/961499): There is a race condition where Reset()
// can be called after GetWidget() has been nulled, but before this is
// destructed.
if (!GetWidget())
return;
accessibility_controller_.Reset();
// text_input_controller_ doesn't have any state to reset.
view_test_runner_.Reset();
......
......@@ -255,13 +255,6 @@ Frame* FrameTree::FindFrameForNavigationInternal(
if (EqualIgnoringASCIICase(name, "_blank"))
return nullptr;
// TODO(japhet): window-open-noopener.html?indexed asserts that the noopener
// feature prevents named-window reuse, but the spec doesn't mention this.
// There is ongoing discussion at https://github.com/whatwg/html/issues/1826,
// and this will probably need to be updated once that discussion is resolved.
if (request.IsWindowOpen() && request.GetWindowFeatures().noopener)
return nullptr;
const KURL& url = request.GetResourceRequest().Url();
// Search subtree starting with this frame first.
for (Frame* frame = this_frame_; frame;
......
This is a testharness.js-based test.
FAIL window.open() with 'noopener' should reuse existing target assert_equals: Should still have opener expected true but got false
FAIL noopener=1 means the same as noopener assert_equals: Should still have opener expected true but got false
PASS noopener=0 means lack of noopener
FAIL noopener separated only by spaces should work assert_equals: Should still have opener expected true but got false
FAIL Trailing noopener should work assert_equals: Should still have opener expected true but got false
FAIL Leading noopener should work assert_equals: Should still have opener expected true but got false
FAIL Interior noopener should work assert_equals: Should still have opener expected true but got false
FAIL noreferrer should also suppress opener when reusing existing target assert_equals: Should still have opener expected true but got false
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment