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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2694543002: [refactor] Cleanup IME State in RenderWidgetHostViewMac which is already tracked by TextInputManager (Closed)
Patch Set: Fixed another compile error for Android test Created 3 years, 10 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
« no previous file with comments | « content/browser/renderer_host/text_input_manager.cc ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 2d497d51efd8ed557a2ea1fe36f9d511e8d52f15..855d531dda4c3f4587f5bcf08695e397791e04f9 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -9439,14 +9439,12 @@ class TextSelectionObserver : public TextInputManager::Observer {
private:
void OnTextSelectionChanged(TextInputManager* text_input_manager,
RenderWidgetHostViewBase* updated_view) override {
- base::string16 text;
- if (text_input_manager->GetTextSelection(updated_view)
- ->GetSelectedText(&text)) {
- last_selected_text_ = base::UTF16ToUTF8(text);
- if (last_selected_text_ == expected_text_ && loop_runner_)
- loop_runner_->Quit();
- }
+ last_selected_text_ = base::UTF16ToUTF8(
+ text_input_manager->GetTextSelection(updated_view)->selected_text());
+ if (last_selected_text_ == expected_text_ && loop_runner_)
+ loop_runner_->Quit();
}
+
TextInputManager* const text_input_manager_;
std::string last_selected_text_;
std::string expected_text_;
« no previous file with comments | « content/browser/renderer_host/text_input_manager.cc ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698