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

Side by Side Diff: views/view_unittest.cc

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « views/focus/focus_manager.h ('k') | views/views.gyp » ('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) 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
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
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 }
OLDNEW
« no previous file with comments | « views/focus/focus_manager.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698