| Index: third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html b/third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html
|
| index 19a8ddd9906f5772b3729a746572cceaf5ed1cf1..94d0ed4c50d2707b465b45b83857a903f2c2867e 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html
|
| @@ -27,7 +27,7 @@ function nextTestStage() {
|
| }
|
| }
|
|
|
| -function dispatchEvent(obj, evt) {
|
| +function dispatchEvent(obj, evt) {
|
| return function() {
|
| return obj.dispatchEvent(evt);
|
| }
|
| @@ -37,12 +37,13 @@ function simulateClick() {
|
| var evt = document.createEvent("MouseEvents");
|
| evt.initMouseEvent("click", true, true, window,
|
| 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
| - var cb = document.getElementById("anchor");
|
| + var cb = document.getElementById("anchor");
|
| setTimeout(dispatchEvent(cb, evt), 100);
|
| }
|
|
|
| function openWindow(evt) {
|
| - window.open("data:text/html\, try to open new window", "_blank");
|
| + // Try to open a new window.
|
| + window.open("about:blank", "_blank");
|
| // If we enabled the popup blocker, the new window should be blocked.
|
| // The windowCount should still be 1.
|
| var expectedWindowCount = 1;
|
| @@ -78,6 +79,6 @@ function test() {
|
| </script>
|
| <body onload="window.setTimeout(test, 0);">
|
| <input type="button" onclick="simulateClick();" value="click me" id="btn"><br>
|
| -<a onclick="openWindow(event)" id="anchor"> open a new window </a><br>
|
| +<a onclick="openWindow(event)" id="anchor">open a new window</a><br>
|
| The JavaScript created (untrusted) event inside a user-initiated (trusted) event should not cache the UserGesture status. This test is for bug https://bugs.webkit.org/show_bug.cgi?id=50508.
|
| <div id="console">FAILED</div>
|
|
|