OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "app/gfx/canvas.h" | 5 #include "app/gfx/canvas.h" |
6 #include "app/gfx/path.h" | 6 #include "app/gfx/path.h" |
7 #include "base/clipboard.h" | 7 #include "base/clipboard.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "views/background.h" | 10 #include "views/background.h" |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 //////////////////////////////////////////////////////////////////////////////// | 706 //////////////////////////////////////////////////////////////////////////////// |
707 // Mouse-wheel message rerouting | 707 // Mouse-wheel message rerouting |
708 //////////////////////////////////////////////////////////////////////////////// | 708 //////////////////////////////////////////////////////////////////////////////// |
709 class ButtonTest : public NativeButton { | 709 class ButtonTest : public NativeButton { |
710 public: | 710 public: |
711 ButtonTest(ButtonListener* listener, const std::wstring& label) | 711 ButtonTest(ButtonListener* listener, const std::wstring& label) |
712 : NativeButton(listener, label) { | 712 : NativeButton(listener, label) { |
713 } | 713 } |
714 | 714 |
715 HWND GetHWND() { | 715 HWND GetHWND() { |
716 return static_cast<NativeButtonWin*>(native_wrapper_)->GetHWND(); | 716 return static_cast<NativeButtonWin*>(native_wrapper_)->native_view(); |
717 } | 717 } |
718 }; | 718 }; |
719 | 719 |
720 class CheckboxTest : public Checkbox { | 720 class CheckboxTest : public Checkbox { |
721 public: | 721 public: |
722 explicit CheckboxTest(const std::wstring& label) : Checkbox(label) { | 722 explicit CheckboxTest(const std::wstring& label) : Checkbox(label) { |
723 } | 723 } |
724 | 724 |
725 HWND GetHWND() { | 725 HWND GetHWND() { |
726 return static_cast<NativeCheckboxWin*>(native_wrapper_)->GetHWND(); | 726 return static_cast<NativeCheckboxWin*>(native_wrapper_)->native_view(); |
727 } | 727 } |
728 }; | 728 }; |
729 | 729 |
730 class ScrollableTestView : public View { | 730 class ScrollableTestView : public View { |
731 public: | 731 public: |
732 ScrollableTestView() { } | 732 ScrollableTestView() { } |
733 | 733 |
734 virtual gfx::Size GetPreferredSize() { | 734 virtual gfx::Size GetPreferredSize() { |
735 return gfx::Size(100, 10000); | 735 return gfx::Size(100, 10000); |
736 } | 736 } |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 SimularePressingEnterAndCheckDefaultButton(OK); | 998 SimularePressingEnterAndCheckDefaultButton(OK); |
999 | 999 |
1000 // Focus the cancel button. | 1000 // Focus the cancel button. |
1001 client_view_->FocusWillChange(NULL, cancel_button_); | 1001 client_view_->FocusWillChange(NULL, cancel_button_); |
1002 EXPECT_FALSE(ok_button_->is_default()); | 1002 EXPECT_FALSE(ok_button_->is_default()); |
1003 EXPECT_TRUE(cancel_button_->is_default()); | 1003 EXPECT_TRUE(cancel_button_->is_default()); |
1004 EXPECT_FALSE(dialog_view_->button1_->is_default()); | 1004 EXPECT_FALSE(dialog_view_->button1_->is_default()); |
1005 EXPECT_FALSE(dialog_view_->button2_->is_default()); | 1005 EXPECT_FALSE(dialog_view_->button2_->is_default()); |
1006 SimularePressingEnterAndCheckDefaultButton(CANCEL); | 1006 SimularePressingEnterAndCheckDefaultButton(CANCEL); |
1007 } | 1007 } |
OLD | NEW |