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

Side by Side Diff: chrome/browser/extensions/web_view_browsertest.cc

Issue 14272003: <webview>: Focusing <webview> should propagate to BrowserPlugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary console.log Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/stringprintf.h" 5 #include "base/stringprintf.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/automation/automation_util.h" 7 #include "chrome/browser/automation/automation_util.h"
8 #include "chrome/browser/extensions/extension_test_message_listener.h" 8 #include "chrome/browser/extensions/extension_test_message_listener.h"
9 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 9 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
10 #include "chrome/browser/prerender/prerender_link_manager.h" 10 #include "chrome/browser/prerender/prerender_link_manager.h"
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 958
959 // Tests that 959 // Tests that
960 // BrowserPluginGeolocationPermissionContext::CancelGeolocationPermissionRequest 960 // BrowserPluginGeolocationPermissionContext::CancelGeolocationPermissionRequest
961 // is handled correctly (and does not crash). 961 // is handled correctly (and does not crash).
962 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPICancelGeolocation) { 962 IN_PROC_BROWSER_TEST_F(WebViewTest, GeolocationAPICancelGeolocation) {
963 ASSERT_TRUE(StartTestServer()); // For serving guest pages. 963 ASSERT_TRUE(StartTestServer()); // For serving guest pages.
964 ASSERT_TRUE(RunPlatformAppTest( 964 ASSERT_TRUE(RunPlatformAppTest(
965 "platform_apps/web_view/geolocation/cancel_request")) << message_; 965 "platform_apps/web_view/geolocation/cancel_request")) << message_;
966 } 966 }
967 967
968 // Tests that setting focus on the <webview> sets focus on the guest.
969 IN_PROC_BROWSER_TEST_F(WebViewTest, Focus) {
970 ASSERT_TRUE(StartTestServer()); // For serving guest pages.
971 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/focus"))
972 << message_;
973 }
974
968 // Disabled on win debug bots due to flaky timeouts. 975 // Disabled on win debug bots due to flaky timeouts.
969 // See http://crbug.com/222618 . 976 // See http://crbug.com/222618 .
970 #if defined(OS_WIN) && !defined(NDEBUG) 977 #if defined(OS_WIN) && !defined(NDEBUG)
971 #define MAYBE_NewWindow DISABLED_NewWindow 978 #define MAYBE_NewWindow DISABLED_NewWindow
972 #else 979 #else
973 #define MAYBE_NewWindow NewWindow 980 #define MAYBE_NewWindow NewWindow
974 #endif 981 #endif
975 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_NewWindow) { 982 IN_PROC_BROWSER_TEST_F(WebViewTest, MAYBE_NewWindow) {
976 ASSERT_TRUE(StartTestServer()); // For serving guest pages. 983 ASSERT_TRUE(StartTestServer()); // For serving guest pages.
977 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/newwindow")) 984 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/newwindow"))
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, 1022 EXPECT_TRUE(content::ExecuteScript(guest_web_contents,
1016 "startDownload('download-link-2')")); 1023 "startDownload('download-link-2')"));
1017 mock_delegate->WaitForCanDownload(true); // Expect to allow. 1024 mock_delegate->WaitForCanDownload(true); // Expect to allow.
1018 mock_delegate->Reset(); 1025 mock_delegate->Reset();
1019 1026
1020 // 3. Guest requests a download that its embedder ignores, this implies deny. 1027 // 3. Guest requests a download that its embedder ignores, this implies deny.
1021 EXPECT_TRUE(content::ExecuteScript(guest_web_contents, 1028 EXPECT_TRUE(content::ExecuteScript(guest_web_contents,
1022 "startDownload('download-link-3')")); 1029 "startDownload('download-link-3')"));
1023 mock_delegate->WaitForCanDownload(false); // Expect to not allow. 1030 mock_delegate->WaitForCanDownload(false); // Expect to not allow.
1024 } 1031 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/web_view.js » ('j') | chrome/renderer/resources/extensions/web_view.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698