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

Side by Side Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2781783002: Allow webview guests to skip WAR checks in ShouldAllowOpenURL (Merge to M58) (Closed)
Patch Set: Allow webview guests to skip WAR checks in ShouldAllowOpenURL. 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 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 TestHelper("testBlobURL", "web_view/shim", NEEDS_TEST_SERVER); 3248 TestHelper("testBlobURL", "web_view/shim", NEEDS_TEST_SERVER);
3249 } 3249 }
3250 3250
3251 // Tests that a WebView accessible resource can actually be loaded from a 3251 // Tests that a WebView accessible resource can actually be loaded from a
3252 // webpage in a WebView. 3252 // webpage in a WebView.
3253 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewAccessibleResource) { 3253 IN_PROC_BROWSER_TEST_P(WebViewTest, LoadWebviewAccessibleResource) {
3254 TestHelper("testLoadWebviewAccessibleResource", 3254 TestHelper("testLoadWebviewAccessibleResource",
3255 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER); 3255 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
3256 } 3256 }
3257 3257
3258 // Tests that a WebView can reload a WebView accessible resource. See
3259 // https://crbug.com/691941.
3260 IN_PROC_BROWSER_TEST_P(WebViewTest, ReloadWebviewAccessibleResource) {
3261 TestHelper("testReloadWebviewAccessibleResource",
3262 "web_view/load_webview_accessible_resource", NEEDS_TEST_SERVER);
3263
3264 content::WebContents* embedder_contents = GetEmbedderWebContents();
3265 content::WebContents* web_view_contents =
3266 GetGuestViewManager()->GetLastGuestCreated();
3267 ASSERT_TRUE(embedder_contents);
3268 ASSERT_TRUE(web_view_contents);
3269
3270 GURL embedder_url(embedder_contents->GetLastCommittedURL());
3271 GURL webview_url(embedder_url.GetOrigin().spec() + "assets/foo.html");
3272
3273 EXPECT_EQ(webview_url, web_view_contents->GetLastCommittedURL());
3274 }
3275
3258 IN_PROC_BROWSER_TEST_P(WebViewAccessibilityTest, LoadWebViewAccessibility) { 3276 IN_PROC_BROWSER_TEST_P(WebViewAccessibilityTest, LoadWebViewAccessibility) {
3259 LoadAppWithGuest("web_view/focus_accessibility"); 3277 LoadAppWithGuest("web_view/focus_accessibility");
3260 content::WebContents* web_contents = GetFirstAppWindowWebContents(); 3278 content::WebContents* web_contents = GetFirstAppWindowWebContents();
3261 content::EnableAccessibilityForWebContents(web_contents); 3279 content::EnableAccessibilityForWebContents(web_contents);
3262 content::WebContents* guest_web_contents = GetGuestWebContents(); 3280 content::WebContents* guest_web_contents = GetGuestWebContents();
3263 content::EnableAccessibilityForWebContents(guest_web_contents); 3281 content::EnableAccessibilityForWebContents(guest_web_contents);
3264 content::WaitForAccessibilityTreeToContainNodeWithName(web_contents, 3282 content::WaitForAccessibilityTreeToContainNodeWithName(web_contents,
3265 "Guest button"); 3283 "Guest button");
3266 } 3284 }
3267 3285
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
3904 ClosingChromeSignInShouldNotCrash) { 3922 ClosingChromeSignInShouldNotCrash) {
3905 GURL signin_url{"chrome://chrome-signin"}; 3923 GURL signin_url{"chrome://chrome-signin"};
3906 3924
3907 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED); 3925 AddTabAtIndex(0, signin_url, ui::PAGE_TRANSITION_TYPED);
3908 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED); 3926 AddTabAtIndex(1, signin_url, ui::PAGE_TRANSITION_TYPED);
3909 WaitForWebViewInDom(); 3927 WaitForWebViewInDom();
3910 3928
3911 chrome::CloseTab(browser()); 3929 chrome::CloseTab(browser());
3912 } 3930 }
3913 #endif 3931 #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