Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html

Issue 2741513002: [Merge M-57] Add a warning for the deprecation of content-initiated data URL navigations (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698