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/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
12 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 13 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
13 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 14 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
14 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
17 #include "content/browser/renderer_host/render_widget_host_view.h" | 18 #include "content/browser/renderer_host/render_widget_host_view.h" |
18 #include "content/browser/tab_contents/tab_contents.h" | 19 #include "content/browser/tab_contents/tab_contents.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 IN_PROC_BROWSER_TEST_F(ConstrainedHtmlDialogBrowserTest, BasicTest) { | 68 IN_PROC_BROWSER_TEST_F(ConstrainedHtmlDialogBrowserTest, BasicTest) { |
68 // The delegate deletes itself. | 69 // The delegate deletes itself. |
69 HtmlDialogUIDelegate* delegate = new TestHtmlDialogUIDelegate(); | 70 HtmlDialogUIDelegate* delegate = new TestHtmlDialogUIDelegate(); |
70 TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper(); | 71 TabContentsWrapper* wrapper = browser()->GetSelectedTabContentsWrapper(); |
71 ASSERT_TRUE(wrapper != NULL); | 72 ASSERT_TRUE(wrapper != NULL); |
72 | 73 |
73 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(browser()->profile(), | 74 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(browser()->profile(), |
74 delegate, | 75 delegate, |
75 wrapper); | 76 wrapper); |
76 | 77 |
77 ASSERT_EQ(1U, wrapper->tab_contents()->constrained_window_count()); | 78 ASSERT_EQ(1U, wrapper->constrained_window_tab_helper()-> |
| 79 constrained_window_count()); |
78 } | 80 } |
OLD | NEW |