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

Unified Diff: extensions/browser/guest_view/web_view/web_view_apitest.cc

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: nasko comments, fix most tests 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: extensions/browser/guest_view/web_view/web_view_apitest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_apitest.cc b/extensions/browser/guest_view/web_view/web_view_apitest.cc
index fe742323629f736b579110c7d4204ea8ed21c9f2..3f39a3dc98810a7a48bc1faf4b63ae3205f9bcc5 100644
--- a/extensions/browser/guest_view/web_view/web_view_apitest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_apitest.cc
@@ -640,6 +640,18 @@ IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindow) {
StopTestServer();
}
+IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestRedirectToDataUrlBlocked) {
+ std::string app_location = "web_view/apitest";
+ StartTestServer(app_location);
+ RunTest("testRedirectToDataUrlBlocked", app_location);
+ StopTestServer();
+}
+
+IN_PROC_BROWSER_TEST_F(WebViewAPITest,
+ TestRedirectToDataUrlFromDataUrlAllowed) {
+ RunTest("testRedirectToDataUrlFromDataUrlAllowed", "web_view/apitest");
+}
+
IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindowNoPreventDefault) {
std::string app_location = "web_view/apitest";
StartTestServer(app_location);

Powered by Google App Engine
This is Rietveld 408576698