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

Unified Diff: chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc

Issue 2166573003: Track TextInputState from multiple RenderWidgets in TextInputManager (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing creis@'s comments 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
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
diff --git a/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc b/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
index 8cd594b17a96f4c99ca44d3d979198f62d27ef55..56582f09547a59a7b01b08c649161cf6de058f43 100644
--- a/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
+++ b/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
@@ -26,9 +26,10 @@
#include "ui/base/ime/text_input_type.h"
#include "url/gurl.h"
-// TODO(ekaramad): The following tests are only active on aura platforms. After
-// fixing crbug.com/578168 for all platforms, the following tests should be
-// activated for other platforms, e.g., Mac and Android (crbug.com/602723).
+// TODO(ekaramad): The following tests should be active on all platforms. After
+// fixing https://crbug.com/578168, this test file should be built for android
+// as well and most of the following tests should be enabled for all platforms
+//(https://crbug.com/602723).
///////////////////////////////////////////////////////////////////////////////
// TextInputManager and IME Tests
@@ -536,6 +537,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest,
reset_state_observer.Wait();
}
+// TODO(ekaramad): Enable the following tests on other platforms when the
+// corresponding feature is implemented (http://crbug.com/578168).
+#if defined(USE_AURA)
// This test creates a page with multiple child frames and adds an <input> to
// each frame. Then, sequentially, each <input> is focused by sending a tab key.
// Then, after |TextInputState.type| for a view is changed to text, another key
@@ -647,9 +651,16 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest,
send_tab_and_wait_for_selection_change(frames[i], input_text[i].size());
}
-// TODO(ekaramad): The following tests are specifically written for Aura and are
-// based on InputMethodObserver. Write similar tests for Mac/Android/Mus
-// (crbug.com/602723).
+// -----------------------------------------------------------------------------
+// Input Method Observer Tests
+//
+// The following tests will make use of the InputMethodObserver to verify that
+// OOPIF pages interact properly with the InputMethod through the tab's view.
+
+// TODO(ekaramad): We only have coverage for some aura tests as the whole idea
+// of ui::TextInputClient/ui::InputMethod/ui::InputMethodObserver seems to be
+// only fit to aura (specifically, OS_CHROMEOS). Can we add more tests here for
+// aura as well as other platforms (https://crbug.com/602723)?
// Observes current input method for state changes.
class InputMethodObserverBase {
@@ -703,13 +714,13 @@ class InputMethodObserverForShowIme : public InputMethodObserverBase {
DISALLOW_COPY_AND_ASSIGN(InputMethodObserverForShowIme);
};
+// TODO(ekaramad): This test is actually a unit test and should be moved to
+// somewhere more relevant (https://crbug.com/602723).
// This test verifies that the IME for Aura is shown if and only if the current
// client's |TextInputState.type| is not ui::TEXT_INPUT_TYPE_NONE and the flag
// |TextInputState.show_ime_if_needed| is true. This should happen even when
// the TextInputState has not changed (according to the platform), e.g., in
// aura when receiving two consecutive updates with same |TextInputState.type|.
-// TODO(ekaramad): This test is actually a unit test not necessarily an OOPIF
-// test. We should move it to somewhere more relevant.
IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest,
CorrectlyShowImeIfNeeded) {
// We only need the <iframe> page to create RWHV.
@@ -756,3 +767,4 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessTextInputManagerTest,
sender.SetType(ui::TEXT_INPUT_TYPE_NONE);
EXPECT_FALSE(send_and_check_show_ime());
}
+#endif // USE_AURA
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698