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 <utility> | 5 #include <utility> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "ui/base/accelerators/accelerator.h" | 9 #include "ui/base/accelerators/accelerator.h" |
10 #include "ui/base/keycodes/keyboard_codes.h" | 10 #include "ui/base/keycodes/keyboard_codes.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 class TestTabbedPane : public TabbedPane { | 179 class TestTabbedPane : public TabbedPane { |
180 public: | 180 public: |
181 TestTabbedPane() {} | 181 TestTabbedPane() {} |
182 virtual gfx::NativeView TestGetNativeControlView() { | 182 virtual gfx::NativeView TestGetNativeControlView() { |
183 return native_tabbed_pane_->GetTestingHandle(); | 183 return native_tabbed_pane_->GetTestingHandle(); |
184 } | 184 } |
185 }; | 185 }; |
186 | 186 |
187 // Tests that NativeControls do set the focused View appropriately on the | 187 // Tests that NativeControls do set the focused View appropriately on the |
188 // FocusManager. | 188 // FocusManager. |
189 TEST_F(FocusManagerTest, FAILS_FocusNativeControls) { | 189 TEST_F(FocusManagerTest, DISABLED_FocusNativeControls) { |
190 TestTextfield* textfield = new TestTextfield(); | 190 TestTextfield* textfield = new TestTextfield(); |
191 TestTabbedPane* tabbed_pane = new TestTabbedPane(); | 191 TestTabbedPane* tabbed_pane = new TestTabbedPane(); |
192 tabbed_pane->set_use_native_win_control(true); | 192 tabbed_pane->set_use_native_win_control(true); |
193 TestTextfield* textfield2 = new TestTextfield(); | 193 TestTextfield* textfield2 = new TestTextfield(); |
194 | 194 |
195 GetContentsView()->AddChildView(textfield); | 195 GetContentsView()->AddChildView(textfield); |
196 GetContentsView()->AddChildView(tabbed_pane); | 196 GetContentsView()->AddChildView(tabbed_pane); |
197 | 197 |
198 tabbed_pane->AddTab(ASCIIToUTF16("Awesome textfield"), textfield2); | 198 tabbed_pane->AddTab(ASCIIToUTF16("Awesome textfield"), textfield2); |
199 | 199 |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 views::View* v3 = new View; | 697 views::View* v3 = new View; |
698 v3->set_focusable(true); | 698 v3->set_focusable(true); |
699 GetContentsView()->AddChildView(v3); | 699 GetContentsView()->AddChildView(v3); |
700 | 700 |
701 v3->RequestFocus(); | 701 v3->RequestFocus(); |
702 GetWidget()->GetFocusManager()->AdvanceFocus(true); | 702 GetWidget()->GetFocusManager()->AdvanceFocus(true); |
703 EXPECT_TRUE(v1->HasFocus()); | 703 EXPECT_TRUE(v1->HasFocus()); |
704 } | 704 } |
705 | 705 |
706 } // namespace views | 706 } // namespace views |
OLD | NEW |