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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <queue> 5 #include <queue>
6 #include <set> 6 #include <set>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 3274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 TestHelper("testBlobURL", "web_view/shim", NEEDS_TEST_SERVER); 3285 TestHelper("testBlobURL", "web_view/shim", NEEDS_TEST_SERVER);
3286 } 3286 }
3287 3287
3288 // Tests that a WebView accessible resource can actually be loaded from a 3288 // Tests that a WebView accessible resource can actually be loaded from a
3289 // webpage in a WebView. 3289 // webpage in a WebView.
3290 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewAccessibleResource) { 3290 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewAccessibleResource) {
3291 TestHelper("testLoadWebviewAccessibleResource", 3291 TestHelper("testLoadWebviewAccessibleResource",
3292 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER); 3292 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
3293 } 3293 }
3294 3294
3295 // Tests that a WebView can reload a WebView accessible resource. See
3296 // https://crbug.com/691941.
3297 IN_PROC_BROWSER_TEST_P(WebViewTest, ReloadWebviewAccessibleResource) {
3298 TestHelper("testReloadWebviewAccessibleResource",
3299 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
3300
3301 content::WebContents* embedder_contents = GetEmbedderWebContents();
3302 content::WebContents* web_view_contents =
3303 GetGuestViewManager()->GetLastGuestCreated();
3304 ASSERT_TRUE(embedder_contents);
3305 ASSERT_TRUE(web_view_contents);
3306
3307 GURL embedder_url(embedder_contents->GetLastCommittedURL());
3308 GURL webview_url(embedder_url.GetOrigin().spec() + "assets/foo.html");
3309
3310 EXPECT_EQ(webview_url, web_view_contents->GetLastCommittedURL());
3311 }
3312
3295 // Tests that a webview inside an iframe can load and that it is destroyed when 3313 // Tests that a webview inside an iframe can load and that it is destroyed when
3296 // the iframe is detached. 3314 // the iframe is detached.
3297 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewInsideIframe) { 3315 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewInsideIframe) {
3298 TestHelper("testLoadWebviewInsideIframe", 3316 TestHelper("testLoadWebviewInsideIframe",
3299 "web_view/load_webview_inside_iframe", NEEDS_TEST_SERVER); 3317 "web_view/load_webview_inside_iframe", NEEDS_TEST_SERVER);
3300 3318
3301 // WebContents is leaked when using BrowserPlugin. 3319 // WebContents is leaked when using BrowserPlugin.
3302 if (!base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) 3320 if (!base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames))
3303 return; 3321 return;
3304 3322
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 ClosingChromeSignInShouldNotCrash) { 3980 ClosingChromeSignInShouldNotCrash) {
3963 GURL signin_url{"chrome://chrome-signin"}; 3981 GURL signin_url{"chrome://chrome-signin"};
3964 3982
3965 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED); 3983 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED);
3966 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED); 3984 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED);
3967 WaitForWebViewInDom(); 3985 WaitForWebViewInDom();
3968 3986
3969 chrome::CloseTab(browser()); 3987 chrome::CloseTab(browser());
3970 } 3988 }
3971 #endif 3989 #endif
OLDNEW
« 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