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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
36 | 36 |
37 namespace chromeos { | 37 namespace chromeos { |
38 | 38 |
39 class KioskAppUpdateServiceTest : public extensions::PlatformAppBrowserTest { | 39 class KioskAppUpdateServiceTest : public extensions::PlatformAppBrowserTest { |
40 public: | 40 public: |
41 KioskAppUpdateServiceTest() : app_(NULL), update_service_(NULL) {} | 41 KioskAppUpdateServiceTest() : app_(NULL), update_service_(NULL) {} |
42 virtual ~KioskAppUpdateServiceTest() {} | 42 virtual ~KioskAppUpdateServiceTest() {} |
43 | 43 |
44 // extensions::PlatformAppBrowserTest overrides: | 44 // extensions::PlatformAppBrowserTest overrides: |
45 virtual void SetUpOnMainThread() OVERRIDE { | 45 virtual void SetUpOnMainThread() override { |
46 extensions::PlatformAppBrowserTest::SetUpOnMainThread(); | 46 extensions::PlatformAppBrowserTest::SetUpOnMainThread(); |
47 | 47 |
48 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 48 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
49 const base::FilePath& temp_dir = temp_dir_.path(); | 49 const base::FilePath& temp_dir = temp_dir_.path(); |
50 | 50 |
51 const base::TimeDelta uptime = base::TimeDelta::FromHours(1); | 51 const base::TimeDelta uptime = base::TimeDelta::FromHours(1); |
52 const std::string uptime_seconds = | 52 const std::string uptime_seconds = |
53 base::DoubleToString(uptime.InSecondsF()); | 53 base::DoubleToString(uptime.InSecondsF()); |
54 const base::FilePath uptime_file = temp_dir.Append("uptime"); | 54 const base::FilePath uptime_file = temp_dir.Append("uptime"); |
55 ASSERT_EQ(static_cast<int>(uptime_seconds.size()), | 55 ASSERT_EQ(static_cast<int>(uptime_seconds.size()), |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, Periodic) { | 110 IN_PROC_BROWSER_TEST_F(KioskAppUpdateServiceTest, Periodic) { |
111 g_browser_process->local_state()->SetInteger( | 111 g_browser_process->local_state()->SetInteger( |
112 prefs::kUptimeLimit, base::TimeDelta::FromMinutes(30).InSeconds()); | 112 prefs::kUptimeLimit, base::TimeDelta::FromMinutes(30).InSeconds()); |
113 | 113 |
114 ExtensionTestMessageListener listener("periodic", false); | 114 ExtensionTestMessageListener listener("periodic", false); |
115 listener.WaitUntilSatisfied(); | 115 listener.WaitUntilSatisfied(); |
116 } | 116 } |
117 | 117 |
118 } // namespace chromeos | 118 } // namespace chromeos |
OLD | NEW |