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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/guest_view/web_view/web_view_apitest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_apitest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 RunTest("testNavOnSrcAttributeChange", "web_view/apitest"); 633 RunTest("testNavOnSrcAttributeChange", "web_view/apitest");
634 } 634 }
635 635
636 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindow) { 636 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindow) {
637 std::string app_location = "web_view/apitest"; 637 std::string app_location = "web_view/apitest";
638 StartTestServer(app_location); 638 StartTestServer(app_location);
639 RunTest("testNewWindow", app_location); 639 RunTest("testNewWindow", app_location);
640 StopTestServer(); 640 StopTestServer();
641 } 641 }
642 642
643 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestRedirectToDataUrlBlocked) {
644 std::string app_location = "web_view/apitest";
645 StartTestServer(app_location);
646 RunTest("testRedirectToDataUrlBlocked", app_location);
647 StopTestServer();
648 }
649
650 IN_PROC_BROWSER_TEST_F(WebViewAPITest,
651 TestRedirectToDataUrlFromDataUrlAllowed) {
652 RunTest("testRedirectToDataUrlFromDataUrlAllowed", "web_view/apitest");
653 }
654
643 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindowNoPreventDefault) { 655 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindowNoPreventDefault) {
644 std::string app_location = "web_view/apitest"; 656 std::string app_location = "web_view/apitest";
645 StartTestServer(app_location); 657 StartTestServer(app_location);
646 RunTest("testNewWindowNoPreventDefault", app_location); 658 RunTest("testNewWindowNoPreventDefault", app_location);
647 StopTestServer(); 659 StopTestServer();
648 } 660 }
649 661
650 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindowNoReferrerLink) { 662 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestNewWindowNoReferrerLink) {
651 std::string app_location = "web_view/apitest"; 663 std::string app_location = "web_view/apitest";
652 StartTestServer(app_location); 664 StartTestServer(app_location);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 // This test verifies that webview.contentWindow works inside an iframe 779 // This test verifies that webview.contentWindow works inside an iframe
768 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) { 780 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestWebViewInsideFrame) {
769 LaunchApp("web_view/inside_iframe"); 781 LaunchApp("web_view/inside_iframe");
770 } 782 }
771 783
772 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestCaptureVisibleRegion) { 784 IN_PROC_BROWSER_TEST_F(WebViewAPITest, TestCaptureVisibleRegion) {
773 RunTest("testCaptureVisibleRegion", "web_view/apitest"); 785 RunTest("testCaptureVisibleRegion", "web_view/apitest");
774 } 786 }
775 787
776 } // namespace extensions 788 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698