OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 #include "chrome/browser/ui/views/dom_view.h" | 6 #include "chrome/browser/ui/views/dom_view.h" |
7 #include "chrome/test/base/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
8 #include "chrome/test/base/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
9 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
10 #include "content/public/browser/notification_types.h" | 10 #include "content/public/browser/notification_types.h" |
11 #include "views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
12 | 12 |
13 using views::Widget; | 13 using views::Widget; |
14 | 14 |
15 class DOMViewTest : public InProcessBrowserTest { | 15 class DOMViewTest : public InProcessBrowserTest { |
16 public: | 16 public: |
17 Widget* CreatePopupWindow() { | 17 Widget* CreatePopupWindow() { |
18 Widget* widget = new Widget; | 18 Widget* widget = new Widget; |
19 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); | 19 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); |
20 params.bounds = gfx::Rect(0, 0, 400, 400); | 20 params.bounds = gfx::Rect(0, 0, 400, 400); |
21 widget->Init(params); | 21 widget->Init(params); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Re-attach to another Widget. | 93 // Re-attach to another Widget. |
94 Widget* two = CreatePopupWindow(); | 94 Widget* two = CreatePopupWindow(); |
95 two->GetRootView()->AddChildView(dom_view); | 95 two->GetRootView()->AddChildView(dom_view); |
96 two->Show(); | 96 two->Show(); |
97 | 97 |
98 ui_test_utils::RunAllPendingInMessageLoop(); | 98 ui_test_utils::RunAllPendingInMessageLoop(); |
99 | 99 |
100 two->Hide(); | 100 two->Hide(); |
101 } | 101 } |
OLD | NEW |