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

Side by Side Diff: ui/views/widget/widget_unittest.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/widget_interactive_uitest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 EXPECT_EQ(toplevel, child->GetTopLevelWidget()); 303 EXPECT_EQ(toplevel, child->GetTopLevelWidget());
304 304
305 toplevel->CloseNow(); 305 toplevel->CloseNow();
306 // |child| should be automatically destroyed with |toplevel|. 306 // |child| should be automatically destroyed with |toplevel|.
307 } 307 }
308 308
309 // Test if a focus manager and an inputmethod work without CHECK failure 309 // Test if a focus manager and an inputmethod work without CHECK failure
310 // when window activation changes. 310 // when window activation changes.
311 TEST_F(WidgetTest, ChangeActivation) { 311 TEST_F(WidgetTest, ChangeActivation) {
312 Widget* top1 = CreateTopLevelPlatformWidget(); 312 Widget* top1 = CreateTopLevelPlatformWidget();
313 // CreateInputMethod before activated
314 top1->GetInputMethod();
315 top1->Show(); 313 top1->Show();
316 RunPendingMessages(); 314 RunPendingMessages();
317 315
318 Widget* top2 = CreateTopLevelPlatformWidget(); 316 Widget* top2 = CreateTopLevelPlatformWidget();
319 top2->Show(); 317 top2->Show();
320 RunPendingMessages(); 318 RunPendingMessages();
321 319
322 top1->Activate(); 320 top1->Activate();
323 RunPendingMessages(); 321 RunPendingMessages();
324 322
325 // Create InputMethod after deactivated.
326 top2->GetInputMethod();
327 top2->Activate(); 323 top2->Activate();
328 RunPendingMessages(); 324 RunPendingMessages();
329 325
330 top1->Activate(); 326 top1->Activate();
331 RunPendingMessages(); 327 RunPendingMessages();
332 328
333 top1->CloseNow(); 329 top1->CloseNow();
334 top2->CloseNow(); 330 top2->CloseNow();
335 } 331 }
336 332
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 widget->Restore(); 791 widget->Restore();
796 widget->IsMaximized(); 792 widget->IsMaximized();
797 widget->IsFullscreen(); 793 widget->IsFullscreen();
798 widget->SetOpacity(0); 794 widget->SetOpacity(0);
799 widget->SetUseDragFrame(true); 795 widget->SetUseDragFrame(true);
800 widget->FlashFrame(true); 796 widget->FlashFrame(true);
801 widget->IsVisible(); 797 widget->IsVisible();
802 widget->GetThemeProvider(); 798 widget->GetThemeProvider();
803 widget->GetNativeTheme(); 799 widget->GetNativeTheme();
804 widget->GetFocusManager(); 800 widget->GetFocusManager();
805 widget->GetInputMethod();
806 widget->SchedulePaintInRect(gfx::Rect(0, 0, 1, 2)); 801 widget->SchedulePaintInRect(gfx::Rect(0, 0, 1, 2));
807 widget->IsMouseEventsEnabled(); 802 widget->IsMouseEventsEnabled();
808 widget->SetNativeWindowProperty("xx", widget); 803 widget->SetNativeWindowProperty("xx", widget);
809 widget->GetNativeWindowProperty("xx"); 804 widget->GetNativeWindowProperty("xx");
810 widget->GetFocusTraversable(); 805 widget->GetFocusTraversable();
811 widget->GetLayer(); 806 widget->GetLayer();
812 widget->ReorderNativeViews(); 807 widget->ReorderNativeViews();
813 widget->SetCapture(widget->GetRootView()); 808 widget->SetCapture(widget->GetRootView());
814 widget->ReleaseCapture(); 809 widget->ReleaseCapture();
815 widget->HasCapture(); 810 widget->HasCapture();
(...skipping 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after
3443 EXPECT_FALSE(widget->IsAlwaysOnTop()); 3438 EXPECT_FALSE(widget->IsAlwaysOnTop());
3444 widget->SetAlwaysOnTop(true); 3439 widget->SetAlwaysOnTop(true);
3445 EXPECT_TRUE(widget->IsAlwaysOnTop()); 3440 EXPECT_TRUE(widget->IsAlwaysOnTop());
3446 widget->SetAlwaysOnTop(false); 3441 widget->SetAlwaysOnTop(false);
3447 EXPECT_FALSE(widget->IsAlwaysOnTop()); 3442 EXPECT_FALSE(widget->IsAlwaysOnTop());
3448 widget->CloseNow(); 3443 widget->CloseNow();
3449 } 3444 }
3450 3445
3451 } // namespace test 3446 } // namespace test
3452 } // namespace views 3447 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget_interactive_uitest.cc ('k') | ui/views/win/hwnd_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698