| 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 <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 update_service_(NULL), | 60 update_service_(NULL), |
| 61 automatic_reboot_manager_(NULL) {} | 61 automatic_reboot_manager_(NULL) {} |
| 62 | 62 |
| 63 ~KioskAppUpdateServiceTest() override {} | 63 ~KioskAppUpdateServiceTest() override {} |
| 64 | 64 |
| 65 // extensions::PlatformAppBrowserTest overrides: | 65 // extensions::PlatformAppBrowserTest overrides: |
| 66 void SetUpInProcessBrowserTestFixture() override { | 66 void SetUpInProcessBrowserTestFixture() override { |
| 67 extensions::PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture(); | 67 extensions::PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 68 | 68 |
| 69 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 69 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 70 const base::FilePath& temp_dir = temp_dir_.path(); | 70 const base::FilePath& temp_dir = temp_dir_.GetPath(); |
| 71 | 71 |
| 72 const base::TimeDelta uptime = base::TimeDelta::FromHours(3); | 72 const base::TimeDelta uptime = base::TimeDelta::FromHours(3); |
| 73 const std::string uptime_seconds = | 73 const std::string uptime_seconds = |
| 74 base::DoubleToString(uptime.InSecondsF()); | 74 base::DoubleToString(uptime.InSecondsF()); |
| 75 const base::FilePath uptime_file = temp_dir.Append("uptime"); | 75 const base::FilePath uptime_file = temp_dir.Append("uptime"); |
| 76 ASSERT_EQ(static_cast<int>(uptime_seconds.size()), | 76 ASSERT_EQ(static_cast<int>(uptime_seconds.size()), |
| 77 base::WriteFile( | 77 base::WriteFile( |
| 78 uptime_file, uptime_seconds.c_str(), uptime_seconds.size())); | 78 uptime_file, uptime_seconds.c_str(), uptime_seconds.size())); |
| 79 uptime_file_override_.reset( | 79 uptime_file_override_.reset( |
| 80 new base::ScopedPathOverride(chromeos::FILE_UPTIME, uptime_file)); | 80 new base::ScopedPathOverride(chromeos::FILE_UPTIME, uptime_file)); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // was requested before Chrome was started. | 208 // was requested before Chrome was started. |
| 209 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, StartAfterPeriodic) { | 209 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, StartAfterPeriodic) { |
| 210 RequestPeriodicReboot(); | 210 RequestPeriodicReboot(); |
| 211 | 211 |
| 212 ExtensionTestMessageListener listener("periodic", false); | 212 ExtensionTestMessageListener listener("periodic", false); |
| 213 CreateKioskAppUpdateService(); | 213 CreateKioskAppUpdateService(); |
| 214 listener.WaitUntilSatisfied(); | 214 listener.WaitUntilSatisfied(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace chromeos | 217 } // namespace chromeos |
| OLD | NEW |