| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |