| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/views/html_dialog_view.h" | 12 #include "chrome/browser/ui/views/html_dialog_view.h" |
| 13 #include "chrome/browser/ui/webui/test_html_dialog_ui_delegate.h" | 13 #include "chrome/browser/ui/webui/test_html_dialog_ui_delegate.h" |
| 14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
| 15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
| 16 #include "chrome/test/base/ui_test_utils.h" | 16 #include "chrome/test/base/ui_test_utils.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_view.h" | 17 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "views/widget/widget.h" |
| 22 | 22 |
| 23 using testing::Eq; | 23 using testing::Eq; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // Initial size of HTMLDialog for SizeWindow test case. | 27 // Initial size of HTMLDialog for SizeWindow test case. |
| 28 const int kInitialWidth = 40; | 28 const int kInitialWidth = 40; |
| 29 const int kInitialHeight = 40; | 29 const int kInitialHeight = 40; |
| 30 | 30 |
| 31 class TestHtmlDialogView: public HtmlDialogView { | 31 class TestHtmlDialogView: public HtmlDialogView { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 html_view->InitDialog(); | 196 html_view->InitDialog(); |
| 197 html_view->GetWidget()->Show(); | 197 html_view->GetWidget()->Show(); |
| 198 | 198 |
| 199 // TestHtmlDialogView::OnTabMainFrameFirstRender() will Quit(). | 199 // TestHtmlDialogView::OnTabMainFrameFirstRender() will Quit(). |
| 200 MessageLoopForUI::current()->Run(); | 200 MessageLoopForUI::current()->Run(); |
| 201 | 201 |
| 202 EXPECT_TRUE(html_view->painted()); | 202 EXPECT_TRUE(html_view->painted()); |
| 203 | 203 |
| 204 html_view->GetWidget()->Close(); | 204 html_view->GetWidget()->Close(); |
| 205 } | 205 } |
| OLD | NEW |