OLD | NEW |
1 // Copyright (c) 2010 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 "chrome/browser/dom_ui/constrained_html_ui.h" | |
10 #include "chrome/browser/dom_ui/html_dialog_ui.h" | |
11 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
12 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
| 11 #include "chrome/browser/webui/constrained_html_ui.h" |
| 12 #include "chrome/browser/webui/html_dialog_ui.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "chrome/test/in_process_browser_test.h" | 14 #include "chrome/test/in_process_browser_test.h" |
15 #include "chrome/test/ui_test_utils.h" | 15 #include "chrome/test/ui_test_utils.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | |
18 | 18 |
19 using testing::Eq; | 19 using testing::Eq; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 class TestHtmlDialogUIDelegate : public HtmlDialogUIDelegate { | 23 class TestHtmlDialogUIDelegate : public HtmlDialogUIDelegate { |
24 public: | 24 public: |
25 TestHtmlDialogUIDelegate() {} | 25 TestHtmlDialogUIDelegate() {} |
26 virtual ~TestHtmlDialogUIDelegate() {} | 26 virtual ~TestHtmlDialogUIDelegate() {} |
27 | 27 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 HtmlDialogUIDelegate* delegate = new TestHtmlDialogUIDelegate(); | 65 HtmlDialogUIDelegate* delegate = new TestHtmlDialogUIDelegate(); |
66 TabContents* tab_contents = browser()->GetSelectedTabContents(); | 66 TabContents* tab_contents = browser()->GetSelectedTabContents(); |
67 ASSERT_TRUE(tab_contents != NULL); | 67 ASSERT_TRUE(tab_contents != NULL); |
68 | 68 |
69 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(browser()->profile(), | 69 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(browser()->profile(), |
70 delegate, | 70 delegate, |
71 tab_contents); | 71 tab_contents); |
72 | 72 |
73 ASSERT_EQ(1U, tab_contents->constrained_window_count()); | 73 ASSERT_EQ(1U, tab_contents->constrained_window_count()); |
74 } | 74 } |
OLD | NEW |