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

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

Issue 2149493004: [refactor] Removing the dead method RenderWidgetHostView::GetSelectedText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call method on correct view Created 4 years, 5 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_interactive_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
index e25a322b3b25e03d4ec16ab89b16c4c44d7c413f..6d96ba4cacced960a49b2ac3e45581a682bb7432 100644
--- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -34,6 +34,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
+#include "content/public/test/text_input_test_utils.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/app_window/app_window.h"
#include "extensions/browser/app_window/app_window_registry.h"
@@ -1287,11 +1288,11 @@ IN_PROC_BROWSER_TEST_P(WebViewInteractiveTest, DISABLED_Focus_InputMethod) {
#if defined(OS_MACOSX)
IN_PROC_BROWSER_TEST_P(WebViewInteractiveTest, TextSelection) {
-#if defined(OS_MACOSX)
- // TODO(ekaramad): This test is failing under OOPIF for MAC.
+ // TODO(ekaramad): This test is failing under OOPIF for MAC
+ // (crbug.com/582562).
if (GetParam())
return;
-#endif
+
SetupTest("web_view/text_selection",
"/extensions/platform_apps/web_view/text_selection/guest.html");
ASSERT_TRUE(guest_web_contents());
@@ -1309,7 +1310,8 @@ IN_PROC_BROWSER_TEST_P(WebViewInteractiveTest, TextSelection) {
content::RenderWidgetHostView* guest_rwhv =
guest_web_contents()->GetRenderWidgetHostView();
ASSERT_TRUE(guest_rwhv);
- std::string selected_text = base::UTF16ToUTF8(guest_rwhv->GetSelectedText());
+ std::string selected_text = base::UTF16ToUTF8(
+ content::GetSelectedTextForRenderWidgetHostView(guest_rwhv));
ASSERT_TRUE(selected_text.size() >= 10u);
ASSERT_EQ("AAAAAAAAAA", selected_text.substr(0, 10));
}

Powered by Google App Engine
This is Rietveld 408576698