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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/memory/singleton.h" | 6 #include "base/memory/singleton.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/views/html_dialog_view.h" | 9 #include "chrome/browser/ui/views/html_dialog_view.h" |
10 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 10 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "chrome/test/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "chrome/test/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
14 #include "content/browser/renderer_host/render_widget_host_view.h" | 14 #include "content/browser/renderer_host/render_widget_host_view.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "views/widget/widget.h" | 18 #include "views/widget/widget.h" |
19 | 19 |
20 using testing::Eq; | 20 using testing::Eq; |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 WindowChangedObserver::GetInstance()); | 224 WindowChangedObserver::GetInstance()); |
225 // We use busy loop because the state is updated in notifications. | 225 // We use busy loop because the state is updated in notifications. |
226 while (html_view->state_ != HtmlDialogView::PAINTED) | 226 while (html_view->state_ != HtmlDialogView::PAINTED) |
227 MessageLoop::current()->RunAllPending(); | 227 MessageLoop::current()->RunAllPending(); |
228 | 228 |
229 EXPECT_EQ(HtmlDialogView::PAINTED, html_view->state_); | 229 EXPECT_EQ(HtmlDialogView::PAINTED, html_view->state_); |
230 | 230 |
231 MessageLoopForUI::current()->RemoveObserver( | 231 MessageLoopForUI::current()->RemoveObserver( |
232 WindowChangedObserver::GetInstance()); | 232 WindowChangedObserver::GetInstance()); |
233 } | 233 } |
OLD | NEW |