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

Unified Diff: views/widget/widget_unittest.cc

Issue 7729007: Focus/InputMethod fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 4 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 | « views/widget/widget.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_unittest.cc
diff --git a/views/widget/widget_unittest.cc b/views/widget/widget_unittest.cc
index 3833975245d8011e86747b55c1cca61f426751ee..c9bfbee1b1acc7c9e82f01b16f08528c23384800 100644
--- a/views/widget/widget_unittest.cc
+++ b/views/widget/widget_unittest.cc
@@ -271,6 +271,34 @@ TEST_F(WidgetTest, GrabUngrab) {
toplevel->CloseNow();
}
+// Test if a focus manager and an inputmethod work without CHECK failure
+// when window activation changes.
+TEST_F(WidgetTest, ChangeActivation) {
+ Widget* top1 = CreateTopLevelPlatformWidget();
+ // CreateInputMethod before activated
+ top1->GetInputMethod();
+ top1->Show();
+ RunPendingMessages();
+
+ Widget* top2 = CreateTopLevelPlatformWidget();
+ top2->Show();
+ RunPendingMessages();
+
+ top1->Activate();
+ RunPendingMessages();
+
+ // Create InputMethod after deactivated.
+ top2->GetInputMethod();
+ top2->Activate();
+ RunPendingMessages();
+
+ top1->Activate();
+ RunPendingMessages();
+
+ top1->CloseNow();
+ top2->CloseNow();
+}
+
////////////////////////////////////////////////////////////////////////////////
// Widget ownership tests.
//
« no previous file with comments | « views/widget/widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698