0

Remove setCanOpenWindows from WebTest TestRunner

Since setCanOpenWindows is just an alias for setPopupBlockingEnabled(false),
this commit replaced the code and removed the binding.

Bug: 1170931
Change-Id: I64ddabca7c7e96ba9e140b8bbe95458343209984
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2821426
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#874327}
This commit is contained in:
Kang Minchul
2021-04-20 17:45:06 +00:00
committed by Chromium LUCI CQ
parent bf49a7d83f
commit bcb1b4012d
230 changed files with 193 additions and 289 deletions
content/web_test/renderer
headless/test/data/protocol
third_party/blink/web_tests
fast
css
dom
events
files
forms
frames
history
loader
parser
serviceworker
xmlhttprequest
fullscreen
gamepad
html
document_metadata
http
tests
appcache
cache
devtools
tracing
history
inspector-protocol
media
misc
navigation
notifications
preload
security
aboutBlank
contentSecurityPolicy
cookies
cross-frame-access-call.html
dataURL
frameNavigation
inactive-document-with-empty-security-origin.html
isolatedWorld
javascriptURL
location-href-clears-username-password.html
mixedContent
about-blank-iframe-in-main-frame.htmldata-url-iframe-in-main-frame.htmlinsecure-audio-video-in-main-frame.htmlinsecure-css-image-with-reload.htmlinsecure-css-in-main-frame.htmlinsecure-css-resources.htmlinsecure-empty-srcset-in-main-frame-blocked.htmlinsecure-eventsource-in-main-frame.htmlinsecure-font-in-main-frame.htmlinsecure-formSubmission-in-invisible-DOM.htmlinsecure-formSubmission-in-main-frame-allowed.htmlinsecure-formSubmission-in-main-frame-blocked.htmlinsecure-formSubmission-in-main-frame-javascript-allowed.htmlinsecure-formSubmission-in-main-frame.htmlinsecure-frame-in-data-iframe-in-main-frame-blocked.htmlinsecure-iframe-in-main-frame-allowed.htmlinsecure-iframe-in-main-frame-blocked.htmlinsecure-iframe-in-main-frame.htmlinsecure-image-in-main-frame-allowed.htmlinsecure-image-in-main-frame-blocked.htmlinsecure-image-in-main-frame.htmlinsecure-script-in-data-iframe-in-main-frame-blocked.htmlinsecure-script-in-main-frame-allowed.htmlinsecure-script-in-main-frame-blocked.htmlinsecure-script-through-redirection.htmlinsecure-srcset-in-main-frame-blocked.htmlinsecure-sync-post-xhr-allowed.htmlinsecure-sync-post-xhr-blocked.htmlinsecure-texttrack-in-main-frame-blocked.htmlpreload-insecure-image-in-main-frame-blocked.htmlredirect-http-to-https-iframe-in-main-frame.htmlredirect-https-to-http-iframe-in-main-frame.html
websocket
no-popup-from-sandbox-top.htmlno-popup-from-sandbox.html
originHeader
popup-allowed-by-sandbox-can-navigate.htmlpopup-allowed-by-sandbox-is-sandboxed-control.htmlpopup-allowed-by-sandbox-is-sandboxed.htmlpopup-allowed-by-sandbox-when-allowed.htmlreferrer-policy-redirect-link.htmlreferrer-policy-window-open.html
rel-noopener
sandbox-inherit-to-blank-document-unsandboxed-navigate.phpsandbox-inherit-to-blank-document.phpsandboxed-opener-can-close-window.html
upgrade-insecure-requests
window-events-clear-domain.htmlwindow-events-clear-port.htmlwindow-events-pass.htmlwindow-named-valueOf.html
sendbeacon
serviceworker
workers
xmlhttprequest
images
plugins
printing
resources
scrollbars
storage
domstorage
localstorage
sessionstorage
tables
vibration
virtual
threaded-prefer-compositing
fast
webaudio

@ -310,7 +310,6 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetBluetoothFakeAdapter(const std::string& adapter_name,
v8::Local<v8::Function> callback);
void SetBluetoothManualChooser(bool enable);
void SetCanOpenWindows();
void SetCaretBrowsingEnabled();
void SetColorProfile(const std::string& name,
v8::Local<v8::Function> callback);
@ -700,7 +699,6 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("setBluetoothManualChooser",
&TestRunnerBindings::SetBluetoothManualChooser)
.SetMethod("setCallCloseOnWebViews", &TestRunnerBindings::NotImplemented)
.SetMethod("setCanOpenWindows", &TestRunnerBindings::SetCanOpenWindows)
.SetMethod("setCaretBrowsingEnabled",
&TestRunnerBindings::SetCaretBrowsingEnabled)
.SetMethod("setColorProfile", &TestRunnerBindings::SetColorProfile)
@ -1490,13 +1488,6 @@ void TestRunnerBindings::DumpTitleChanges() {
runner_->DumpTitleChanges();
}
void TestRunnerBindings::SetCanOpenWindows() {
if (invalid_)
return;
// TODO(https://crbug.com/1170931): Remove the alias from the tests.
runner_->GetWebTestControlHostRemote()->SetPopupBlockingEnabled(false);
}
void TestRunnerBindings::SetCaretBrowsingEnabled() {
if (invalid_)
return;

@ -10,7 +10,7 @@ var output = [];
var testRunner = {};
testRunner.dumpAsText = () => {};
testRunner.waitUntilDone = () => {};
testRunner.setCanOpenWindows = () => {};
testRunner.setPopupBlockingEnabled = () => {};
testRunner.notifyDone = () => {
sendProtocolMessage(JSON.stringify({id: 0, method: 'DONE', params: {}, result: output.join('\n')}));
};

@ -3,7 +3,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -3,7 +3,7 @@
<script>
function test() {
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.dumpAsText();
testRunner.waitUntilDone();
}

@ -4,7 +4,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();
}

@ -10,7 +10,7 @@ description("Updating window.location after the window has been closed, without
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -2,7 +2,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -2,7 +2,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -1,7 +1,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -12,7 +12,7 @@ description('Test that web settings are applied early enough when creating a new
if (window.testRunner) {
testRunner.setAllowFileAccessFromFileURLs(false);
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
}
window.addEventListener('message', function (e) {

@ -6,7 +6,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
var originatingWindow = self;

@ -11,7 +11,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}

@ -7,7 +7,7 @@ function runTest()
{
description("Tests that calling window.open on the contentWindow of a detached frame does not crash or open a new window. You may need to disable popup blocking for this test case.");
if (window.testRunner)
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
var ifr = document.createElement("iframe");
ifr.onload = function ()
{

@ -7,7 +7,7 @@
description("Checks that passing invalid strings to window.open() is properly handled.");
if (window.testRunner)
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
var nonConvertibleToString = { toString: function() { throw "Exception in toString()"; } };
var newWindow = null;

@ -6,7 +6,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
var a = window.open("about:blank","moonshine")

@ -2,7 +2,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
function handler() {

@ -18,7 +18,7 @@ function runTest()
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
i = 0;

@ -10,7 +10,7 @@ window.jsTestIsAsync = true;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
var w;
function processMessage(event) {

@ -3,7 +3,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -5,7 +5,7 @@
<script src="../../../resources/testharnessreport.js"></script>
<script>
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.dumpAsText();
}
test(function () {

@ -1,2 +1,2 @@
CONSOLE ERROR: line 17: Not allowed to navigate top frame to data URL: data:text/html;charset=utf-8,<html><body>The test passes if this page opens in the same window</body></html>
CONSOLE ERROR: line 16: Not allowed to navigate top frame to data URL: data:text/html;charset=utf-8,<html><body>The test passes if this page opens in the same window</body></html>
PASS: Popup opened in the same window

@ -4,7 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();

@ -4,7 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();

@ -4,7 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
testRunner.waitUntilDone();

@ -1,7 +1,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -6,7 +6,7 @@
var jsTestIsAsync = true;
description('Test that window.open sets the correct opener when the calling context != window');
if (window.testRunner)
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
function passed() {
testPassed('passed called on "this" argument of window.open');
finishJSTest();

@ -12,11 +12,6 @@
<script>
window.jsTestIsAsync = true;
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
var testSelf = true;
var consumeInFrame = false; // where to consume user gesture: self or frame
var needClickDiv = false;

@ -7,7 +7,7 @@ jsTestIsAsync = true;
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
description("Tests that Unicode characters that changes the string length when lower cased still works.");

@ -9,7 +9,7 @@ description("Tests that manipulating location properties in a just-created windo
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
var testWindow = open("data:text/plain,a");

@ -4,7 +4,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -21,7 +21,7 @@ function load()
if (window.testRunner)
{
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}
win = window.open();

@ -17,11 +17,6 @@
window.jsTestIsAsync = true;
description("Test that drop event generates user gesture");
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
function drop() {
// Consume user gesture.
shouldBeDefined("window.open('about:blank')");

@ -23,7 +23,7 @@ function window2Loaded() {
function startTest() {
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
window2 = window.open('resources/move-event-handler-between-framehosts-popup.html');
window2.addEventListener("load", window2Loaded, false);

@ -5,10 +5,8 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.dumpChildFrames();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function test()

@ -49,7 +49,7 @@ function onVisibilityChange() {
function startTest() {
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
debug("Window 1 Loaded");

@ -65,9 +65,6 @@
}
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
nextTest();
}
</script>

@ -9,8 +9,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
var button = document.getElementById("button");

@ -29,8 +29,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
windowCount = testRunner.windowCount();

@ -28,8 +28,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
windowCount = testRunner.windowCount();

@ -24,8 +24,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
gc();

@ -47,8 +47,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
var button = document.querySelector("#test");
test_driver.click(button);

@ -12,9 +12,8 @@
win = window.open("about:blank", "blank");
assert_equals(win, null);
}
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}

@ -14,7 +14,6 @@
}
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}

@ -34,8 +34,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
var button = document.getElementById("test");

@ -4,8 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
// Record current window count.
window.windowCount = testRunner.windowCount();

@ -4,8 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
// Record current window count.
window.windowCount = testRunner.windowCount();

@ -4,8 +4,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
// Record current window count.
window.windowCount = testRunner.windowCount();

@ -3,8 +3,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
// Record current window count.
window.windowCount = testRunner.windowCount();

@ -14,7 +14,6 @@
}
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}

@ -3,8 +3,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
// Record current window count.
window.windowCount = testRunner.windowCount();

@ -11,11 +11,6 @@
window.jsTestIsAsync = true;
description("Tests that the plugin container doesn't generate user gestures");
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
if (window.eventSender) {
var link = document.querySelector("#link");
eventSender.mouseMoveTo(link.offsetLeft + 10, link.offsetTop + link.offsetHeight / 2);

@ -3,8 +3,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
}

@ -4,10 +4,8 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.dumpChildFrames();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function closeWindow(windowToClose)

@ -8,9 +8,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -8,9 +8,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -10,9 +10,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -8,9 +8,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -8,9 +8,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -6,9 +6,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.waitUntilDone();
testRunner.setPopupBlockingEnabled(true);
}
function clickHandler() {

@ -28,8 +28,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
windowCount = testRunner.windowCount();

@ -29,8 +29,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
var button = document.getElementById("button");

@ -3,8 +3,6 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
testRunner.waitUntilDone();
}

@ -4,7 +4,7 @@
description('Test tracking event handlers with a reused DOMWindow.');
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -45,8 +45,6 @@ function callback() {
}
if (window.chrome && chrome.gpuBenchmarking && window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
var pointerActions =
[
{source: "touch",

@ -39,11 +39,9 @@ function testPopupOnEventDuring(eventType, expectPopup, operation) {
}
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
var rect = target.getBoundingClientRect();
var targetX = rect.left + rect.width / 2;
var targetY = rect.top + rect.height / 2;

@ -18,7 +18,7 @@ function load()
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -22,7 +22,7 @@ function processMessage(event) {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
w = window.open('../../resources/window-postmessage-open-close.html');
window.addEventListener("message", processMessage, false);

@ -4,7 +4,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -19,7 +19,7 @@
<script type="text/javascript">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}
var numberTimesToClick = 2;

@ -12,7 +12,7 @@ window.jsTestIsAsync = true;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
(function() {

@ -4,7 +4,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
</script>
</head>

@ -4,7 +4,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
</script>
</head>

@ -5,7 +5,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
}
var testStatus = "FAIL: not completed";

@ -4,7 +4,7 @@
var i = 0;
function test() {
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.dumpAsText();
testRunner.waitUntilDone();
var button = document.getElementById("button");

@ -14,7 +14,7 @@ var testWindow;
onload = function()
{
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.dumpAsText();
testRunner.waitUntilDone();
}

@ -17,7 +17,7 @@
testRunner.dumpAsText();
testRunner.keepWebHistory();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
document.getElementById("result").innerText = "FAIL: Test did not complete";
var button = document.getElementById("button");
eventSender.mouseMoveTo(button.offsetParent.offsetLeft + button.offsetLeft + button.offsetWidth / 2, button.offsetParent.offsetTop + button.offsetTop + button.offsetHeight / 2);

@ -2,7 +2,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
window.open("http://127.0.0.1:22").document.write('');

@ -3,10 +3,6 @@
<a href='about:blank'></a>
<script>
description('Check that a javascript generated mouse click is not enough to open a new tab.');
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
document.querySelector('a').dispatchEvent(new MouseEvent('click', {ctrlKey: true, metaKey: true}));

@ -4,7 +4,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpNavigationPolicy();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -13,8 +13,6 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
function popup() {

@ -5,7 +5,7 @@ Reproducible crash in appcache code when closing pgatour.com</p>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
function done()

@ -3,7 +3,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
}
function done () {

@ -3,7 +3,7 @@
<script>
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.clearBackForwardList();
testRunner.dumpAsText();
testRunner.waitUntilDone();

@ -1,7 +1,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -2,7 +2,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
}
// The navigation should be blocked before a new window is opened.
a.click();

@ -3,10 +3,6 @@
<a href='about:blank' target='_blank'></a>
<script>
description('Check that a javascript generated mouse click is not enough to open a new tab.');
if (window.testRunner) {
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(true);
}
document.querySelector('a').dispatchEvent(new MouseEvent('click', {ctrlKey: true, metaKey: true}));

@ -4,7 +4,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
var newWindow = window.open("resources/document-reload-with-failed-deferred-scripts.html");

@ -4,7 +4,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}
window.open("resources/document-write-then-close.html");

@ -4,7 +4,7 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}

@ -6,7 +6,7 @@
var test = async_test("This test checks if accessing navigator.serviceWorker doesn't crash with invalid frame");
if (window.testRunner)
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
function callback() {
// At this time window.navigator may be replaced with a new iframe's one,

@ -23,7 +23,7 @@ function processMessage(event) {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
w = window.open('../../resources/window-postmessage-open-close.html');
window.addEventListener("message", processMessage, false);

@ -3,7 +3,7 @@
<span></span>
<script>
if (window.testRunner) {
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
}
var callback;
var fullscreenChanged = function(event)

@ -19,7 +19,7 @@ function processMessage(event) {
if (window.gamepadController) {
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.waitUntilDone();
}
w = window.open('../resources/window-postmessage-open-close.html');

@ -5,11 +5,9 @@
<script>
if (window.testRunner) {
// FIXME: setCanOpenWindows needs the test to be async or the Apple port crashes.
// https://bugs.webkit.org/show_bug.cgi?id=99465
window.jsTestIsAsync = true;
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
function endsWith(string, substring)

@ -13,7 +13,7 @@ function openWindow()
if (window.testRunner) {
testRunner.dumpAsText()
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
} else {
document.write('<div id="manual-instructions">Click <a href="javascript:openWindow()">this link</a> twice. A window should open and close twice without crashing.</div>')
}

@ -18,7 +18,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
// Values to check.

@ -13,7 +13,7 @@
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
}
// Values to check.

@ -13,7 +13,7 @@
await TestRunner.evaluateInPagePromise(`
function display() {
return new Promise(resolve => {
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
var popup = window.open("resources/hello.html");
popup.onload = () => requestAnimationFrame(
() => testRunner.updateAllLifecyclePhasesAndCompositeThen(resolve));

@ -1,7 +1,7 @@
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setCanOpenWindows();
testRunner.setPopupBlockingEnabled(false);
testRunner.dumpAsText();
testRunner.dumpBackForwardList();
if (window.opener)

@ -537,7 +537,7 @@ DevToolsAPI._fetch = function(url) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setCanOpenWindows(true);
testRunner.setPopupBlockingEnabled(false);
window.addEventListener('load', () => {
var params = new URLSearchParams(window.location.search);

Some files were not shown because too many files have changed in this diff Show More