| 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/in_process_browser_test.h" | 7 #include "chrome/test/base/in_process_browser_test.h" |
| 8 #include "chrome/test/ui_test_utils.h" | 8 #include "chrome/test/base/ui_test_utils.h" |
| 9 #include "views/widget/widget.h" | 9 #include "views/widget/widget.h" |
| 10 | 10 |
| 11 using views::Widget; | 11 using views::Widget; |
| 12 | 12 |
| 13 class DOMViewTest : public InProcessBrowserTest { | 13 class DOMViewTest : public InProcessBrowserTest { |
| 14 public: | 14 public: |
| 15 Widget* CreatePopupWindow() { | 15 Widget* CreatePopupWindow() { |
| 16 Widget* widget = new Widget; | 16 Widget* widget = new Widget; |
| 17 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); | 17 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); |
| 18 params.bounds = gfx::Rect(0, 0, 400, 400); | 18 params.bounds = gfx::Rect(0, 0, 400, 400); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Re-attach to another Widget. | 82 // Re-attach to another Widget. |
| 83 Widget* two = CreatePopupWindow(); | 83 Widget* two = CreatePopupWindow(); |
| 84 two->GetRootView()->AddChildView(dom_view); | 84 two->GetRootView()->AddChildView(dom_view); |
| 85 two->Show(); | 85 two->Show(); |
| 86 | 86 |
| 87 ui_test_utils::RunAllPendingInMessageLoop(); | 87 ui_test_utils::RunAllPendingInMessageLoop(); |
| 88 | 88 |
| 89 two->Hide(); | 89 two->Hide(); |
| 90 } | 90 } |
| OLD | NEW |