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

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

Issue 1105613002: [MacViews] Implement AlwaysOnTop and VisibleOnAllWorkspaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 7 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/native_widget_mac.mm ('k') | no next file » | 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 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after
3426 ui::WindowEventTarget::kWin32InputEventTarget)); 3426 ui::WindowEventTarget::kWin32InputEventTarget));
3427 EXPECT_NE(nullptr, target); 3427 EXPECT_NE(nullptr, target);
3428 bool handled = false; 3428 bool handled = false;
3429 target->HandleKeyboardMessage(WM_CHAR, 0, 0, &handled); 3429 target->HandleKeyboardMessage(WM_CHAR, 0, 0, &handled);
3430 target->HandleKeyboardMessage(WM_SYSCHAR, 0, 0, &handled); 3430 target->HandleKeyboardMessage(WM_SYSCHAR, 0, 0, &handled);
3431 target->HandleKeyboardMessage(WM_SYSDEADCHAR, 0, 0, &handled); 3431 target->HandleKeyboardMessage(WM_SYSDEADCHAR, 0, 0, &handled);
3432 widget.CloseNow(); 3432 widget.CloseNow();
3433 } 3433 }
3434 #endif 3434 #endif
3435 3435
3436 // Test that SetAlwaysOnTop and IsAlwaysOnTop are consistent.
3437 TEST_F(WidgetTest, AlwaysOnTop) {
3438 Widget* widget = CreateTopLevelNativeWidget();
3439 EXPECT_FALSE(widget->IsAlwaysOnTop());
3440 widget->SetAlwaysOnTop(true);
3441 EXPECT_TRUE(widget->IsAlwaysOnTop());
3442 widget->SetAlwaysOnTop(false);
3443 EXPECT_FALSE(widget->IsAlwaysOnTop());
3444 }
3445
3436 } // namespace test 3446 } // namespace test
3437 } // namespace views 3447 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698