OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/tab_closeable_state_watcher.h" | 5 #include "chrome/browser/chromeos/tab_closeable_state_watcher.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "chrome/browser/app_modal_dialog.h" | 8 #include "chrome/browser/app_modal_dialog.h" |
9 #include "chrome/browser/browser.h" | |
10 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
11 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
12 #include "chrome/browser/native_app_modal_dialog.h" | 11 #include "chrome/browser/native_app_modal_dialog.h" |
13 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/tabs/tab_strip_model.h" | 14 #include "chrome/browser/tabs/tab_strip_model.h" |
| 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "chrome/test/in_process_browser_test.h" | 17 #include "chrome/test/in_process_browser_test.h" |
18 #include "chrome/test/ui_test_utils.h" | 18 #include "chrome/test/ui_test_utils.h" |
19 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace chromeos { | 23 namespace chromeos { |
24 | 24 |
25 class TabCloseableStateWatcherTest : public InProcessBrowserTest { | 25 class TabCloseableStateWatcherTest : public InProcessBrowserTest { |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 AppModalDialog* confirm = ui_test_utils::WaitForAppModalDialog(); | 310 AppModalDialog* confirm = ui_test_utils::WaitForAppModalDialog(); |
311 confirm->native_dialog()->AcceptAppModalDialog(); | 311 confirm->native_dialog()->AcceptAppModalDialog(); |
312 NewTabObserver new_tab_observer(browser()); | 312 NewTabObserver new_tab_observer(browser()); |
313 EXPECT_EQ(1u, BrowserList::size()); | 313 EXPECT_EQ(1u, BrowserList::size()); |
314 EXPECT_EQ(browser(), *(BrowserList::begin())); | 314 EXPECT_EQ(browser(), *(BrowserList::begin())); |
315 EXPECT_EQ(1, browser()->tab_count()); | 315 EXPECT_EQ(1, browser()->tab_count()); |
316 EXPECT_EQ(ntp_url_, browser()->GetSelectedTabContents()->GetURL()); | 316 EXPECT_EQ(ntp_url_, browser()->GetSelectedTabContents()->GetURL()); |
317 } | 317 } |
318 | 318 |
319 } // namespace chromeos | 319 } // namespace chromeos |
OLD | NEW |