OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "chrome/browser/background/background_mode_manager.h" | 9 #include "chrome/browser/background/background_mode_manager.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/test/net/url_request_slow_download_job.h" | 42 #include "content/test/net/url_request_slow_download_job.h" |
43 #include "net/test/embedded_test_server/embedded_test_server.h" | 43 #include "net/test/embedded_test_server/embedded_test_server.h" |
44 #include "net/test/url_request/url_request_mock_http_job.h" | 44 #include "net/test/url_request/url_request_mock_http_job.h" |
45 | 45 |
46 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
47 #include "chromeos/chromeos_switches.h" | 47 #include "chromeos/chromeos_switches.h" |
48 #endif | 48 #endif |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 NativeAppModalDialog* GetNextDialog() { | 52 app_modal::NativeAppModalDialog* GetNextDialog() { |
53 AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog(); | 53 app_modal::AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog(); |
54 EXPECT_TRUE(dialog->IsJavaScriptModalDialog()); | 54 EXPECT_TRUE(dialog->IsJavaScriptModalDialog()); |
55 JavaScriptAppModalDialog* js_dialog = | 55 app_modal::JavaScriptAppModalDialog* js_dialog = |
56 static_cast<JavaScriptAppModalDialog*>(dialog); | 56 static_cast<app_modal::JavaScriptAppModalDialog*>(dialog); |
57 CHECK(js_dialog->native_dialog()); | 57 CHECK(js_dialog->native_dialog()); |
58 return js_dialog->native_dialog(); | 58 return js_dialog->native_dialog(); |
59 } | 59 } |
60 | 60 |
61 void AcceptClose() { | 61 void AcceptClose() { |
62 GetNextDialog()->AcceptAppModalDialog(); | 62 GetNextDialog()->AcceptAppModalDialog(); |
63 } | 63 } |
64 | 64 |
65 void CancelClose() { | 65 void CancelClose() { |
66 GetNextDialog()->CancelAppModalDialog(); | 66 GetNextDialog()->CancelAppModalDialog(); |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 | 946 |
947 chrome::CloseAllBrowsers(); | 947 chrome::CloseAllBrowsers(); |
948 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); | 948 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); |
949 EXPECT_TRUE(chrome::BrowserIterator().done()); | 949 EXPECT_TRUE(chrome::BrowserIterator().done()); |
950 EXPECT_TRUE(IsBackgroundModeSuspended()); | 950 EXPECT_TRUE(IsBackgroundModeSuspended()); |
951 } | 951 } |
952 | 952 |
953 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, | 953 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, |
954 BrowserCloseManagerWithBackgroundModeBrowserTest, | 954 BrowserCloseManagerWithBackgroundModeBrowserTest, |
955 testing::Bool()); | 955 testing::Bool()); |
OLD | NEW |