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 "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_update_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 new base::ScopedPathOverride(chromeos::FILE_UPTIME, uptime_file)); | 80 new base::ScopedPathOverride(chromeos::FILE_UPTIME, uptime_file)); |
81 } | 81 } |
82 | 82 |
83 void SetUpOnMainThread() override { | 83 void SetUpOnMainThread() override { |
84 extensions::PlatformAppBrowserTest::SetUpOnMainThread(); | 84 extensions::PlatformAppBrowserTest::SetUpOnMainThread(); |
85 | 85 |
86 app_ = LoadExtension( | 86 app_ = LoadExtension( |
87 test_data_dir_.AppendASCII("api_test/runtime/on_restart_required")); | 87 test_data_dir_.AppendASCII("api_test/runtime/on_restart_required")); |
88 | 88 |
89 // Fake app mode command line. | 89 // Fake app mode command line. |
90 CommandLine* command = CommandLine::ForCurrentProcess(); | 90 base::CommandLine* command = base::CommandLine::ForCurrentProcess(); |
91 command->AppendSwitch(switches::kForceAppMode); | 91 command->AppendSwitch(switches::kForceAppMode); |
92 command->AppendSwitchASCII(switches::kAppId, app_->id()); | 92 command->AppendSwitchASCII(switches::kAppId, app_->id()); |
93 | 93 |
94 automatic_reboot_manager_ = | 94 automatic_reboot_manager_ = |
95 g_browser_process->platform_part()->automatic_reboot_manager(); | 95 g_browser_process->platform_part()->automatic_reboot_manager(); |
96 | 96 |
97 // Wait for the |automatic_reboot_manager_| to finish initializing. | 97 // Wait for the |automatic_reboot_manager_| to finish initializing. |
98 base::RunLoop run_loop; | 98 base::RunLoop run_loop; |
99 base::SequencedWorkerPool* worker_pool = | 99 base::SequencedWorkerPool* worker_pool = |
100 content::BrowserThread::GetBlockingPool(); | 100 content::BrowserThread::GetBlockingPool(); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // was requested before Chrome was started. | 210 // was requested before Chrome was started. |
211 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, StartAfterPeriodic) { | 211 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, StartAfterPeriodic) { |
212 RequestPeriodicReboot(); | 212 RequestPeriodicReboot(); |
213 | 213 |
214 ExtensionTestMessageListener listener("periodic", false); | 214 ExtensionTestMessageListener listener("periodic", false); |
215 CreateKioskAppUpdateService(); | 215 CreateKioskAppUpdateService(); |
216 listener.WaitUntilSatisfied(); | 216 listener.WaitUntilSatisfied(); |
217 } | 217 } |
218 | 218 |
219 } // namespace chromeos | 219 } // namespace chromeos |
OLD | NEW |