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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java

Issue 2797893002: Prevent Android webview tests from being broken by data URL deprecation (Closed)
Patch Set: Rebase Created 3 years, 8 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
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
index b10e50e2a59e577681d046b14e90d6a4b14ba26d..f304368aa5d09587e72410cfd0c793d67aa75af4 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java
@@ -1182,10 +1182,14 @@ public class AwSettingsTest extends AwTestBase {
return "<html><head>"
+ "<script>"
+ " function tryOpenWindow() {"
- + " var newWindow = window.open("
- + " 'data:text/html;charset=utf-8,"
- + " <html><head><title>" + POPUP_ENABLED + "</title></head></html>');"
- + " if (!newWindow) document.title = '" + POPUP_BLOCKED + "';"
+ + " var newWindow = window.open('about:blank');"
+ + " if (newWindow) {"
+ + " newWindow.document.write("
+ + " '<html><head><title>" + POPUP_ENABLED
+ + "</title></head></html>');"
+ + " } else {"
+ + " document.title = '" + POPUP_BLOCKED + "';"
+ + " }"
+ " }"
+ "</script></head>"
+ "<body onload='tryOpenWindow()'></body></html>";
« no previous file with comments | « android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698