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

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

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing creis@'s comments Created 4 years, 3 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
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 5233951e59ecae1cf8db2df7a252e0be383a493e..f526e5928f9bbc79a52e9d874d2dd2a57f238ce1 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -55,7 +55,6 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents_delegate.h"
-#include "content/public/common/browser_plugin_guest_mode.h"
#include "content/public/common/child_process_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
@@ -217,6 +216,11 @@ class EmbedderWebContentsObserver : public content::WebContentsObserver {
DISALLOW_COPY_AND_ASSIGN(EmbedderWebContentsObserver);
};
+bool UseCrossProcessFramesForGuests() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseCrossProcessFramesForGuests);
+}
+
void ExecuteScriptWaitForTitle(content::WebContents* web_contents,
const char* script,
const char* title) {
@@ -1093,7 +1097,7 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, AcceptTouchEvents) {
// UseCrossProcessFramesForGuests() events are routed directly to the
// guest, so the embedder does not need to know about the installation of
// touch handlers.
- if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
+ if (UseCrossProcessFramesForGuests())
return;
LoadAppWithGuest("web_view/accept_touch_events");
@@ -1304,8 +1308,8 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, Shim_TestDisplayNoneWebviewLoad) {
IN_PROC_BROWSER_TEST_P(WebViewTest, Shim_TestDisplayNoneWebviewRemoveChild) {
// http://crbug.com/585652
- if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
- return;
+ if (UseCrossProcessFramesForGuests())
+ return;
TestHelper("testDisplayNoneWebviewRemoveChild",
"web_view/shim", NO_TEST_SERVER);
}
@@ -3198,7 +3202,7 @@ IN_PROC_BROWSER_TEST_P(WebViewTest, Shim_TestFocusWhileFocused) {
IN_PROC_BROWSER_TEST_P(WebViewTest, NestedGuestContainerBounds) {
// TODO(lfg): https://crbug.com/581898
- if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
+ if (UseCrossProcessFramesForGuests())
return;
TestHelper("testPDFInWebview", "web_view/shim", NO_TEST_SERVER);
@@ -3532,7 +3536,7 @@ class FocusChangeWaiter {
IN_PROC_BROWSER_TEST_F(WebViewGuestTouchFocusTest,
TouchFocusesBrowserPluginInEmbedder) {
// This test is only relevant for non-OOPIF WebView.
- if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests())
+ if (UseCrossProcessFramesForGuests())
return;
LoadAppWithGuest("web_view/guest_focus_test");

Powered by Google App Engine
This is Rietveld 408576698