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

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2766313002: Allow webview guests to skip WAR checks in ShouldAllowOpenURL. (Closed)
Patch Set: Devlin's comments 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
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/apps/guest_view/web_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 05b19b2c14332aa4b587185774adbcf73111ea1d..4da0e41e562d989258bdca10f7719ed3abdfad84 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -3292,6 +3292,24 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewAccessibleResource) {
"web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
}
+// Tests that a WebView can reload a WebView accessible resource. See
+// https://crbug.com/691941.
+IN_PROC_BROWSER_TEST_P(WebViewTest, ReloadWebviewAccessibleResource) {
+ TestHelper("testReloadWebviewAccessibleResource",
+ "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
+
+ content::WebContents* embedder_contents = GetEmbedderWebContents();
+ content::WebContents* web_view_contents =
+ GetGuestViewManager()->GetLastGuestCreated();
+ ASSERT_TRUE(embedder_contents);
+ ASSERT_TRUE(web_view_contents);
+
+ GURL embedder_url(embedder_contents->GetLastCommittedURL());
+ GURL webview_url(embedder_url.GetOrigin().spec() + "assets/foo.html");
+
+ EXPECT_EQ(webview_url, web_view_contents->GetLastCommittedURL());
+}
+
// Tests that a webview inside an iframe can load and that it is destroyed when
// the iframe is detached.
IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewInsideIframe) {
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698