OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 gfx::Rect initial_bounds(0, 0, 500, 500); | 843 gfx::Rect initial_bounds(0, 0, 500, 500); |
844 init_params.bounds = initial_bounds; | 844 init_params.bounds = initial_bounds; |
845 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 845 init_params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
846 init_params.native_widget = | 846 init_params.native_widget = |
847 new PlatformDesktopNativeWidget(&top_level_widget); | 847 new PlatformDesktopNativeWidget(&top_level_widget); |
848 top_level_widget.Init(init_params); | 848 top_level_widget.Init(init_params); |
849 ShowSync(&top_level_widget); | 849 ShowSync(&top_level_widget); |
850 | 850 |
851 ASSERT_FALSE(focus_listener.focus_changes().empty()); | 851 ASSERT_FALSE(focus_listener.focus_changes().empty()); |
852 EXPECT_EQ(top_level_widget.GetNativeView(), | 852 EXPECT_EQ(top_level_widget.GetNativeView(), |
853 focus_listener.focus_changes().back());; | 853 focus_listener.focus_changes().back()); |
854 | 854 |
855 EXPECT_FALSE(top_level_widget.HasCapture()); | 855 EXPECT_FALSE(top_level_widget.HasCapture()); |
856 top_level_widget.SetCapture(NULL); | 856 top_level_widget.SetCapture(NULL); |
857 EXPECT_TRUE(top_level_widget.HasCapture()); | 857 EXPECT_TRUE(top_level_widget.HasCapture()); |
858 | 858 |
859 // Create a modal dialog. | 859 // Create a modal dialog. |
860 ModalDialogDelegate* dialog_delegate = | 860 ModalDialogDelegate* dialog_delegate = |
861 new ModalDialogDelegate(ui::MODAL_TYPE_SYSTEM); | 861 new ModalDialogDelegate(ui::MODAL_TYPE_SYSTEM); |
862 | 862 |
863 Widget* modal_dialog_widget = views::DialogDelegate::CreateDialogWidget( | 863 Widget* modal_dialog_widget = views::DialogDelegate::CreateDialogWidget( |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 widget->GetInputMethod()->GetTextInputType()); | 1588 widget->GetInputMethod()->GetTextInputType()); |
1589 | 1589 |
1590 textfield->SetReadOnly(true); | 1590 textfield->SetReadOnly(true); |
1591 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, | 1591 EXPECT_EQ(ui::TEXT_INPUT_TYPE_NONE, |
1592 widget->GetInputMethod()->GetTextInputType()); | 1592 widget->GetInputMethod()->GetTextInputType()); |
1593 widget->CloseNow(); | 1593 widget->CloseNow(); |
1594 } | 1594 } |
1595 | 1595 |
1596 } // namespace test | 1596 } // namespace test |
1597 } // namespace views | 1597 } // namespace views |
OLD | NEW |