OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/apps/ephemeral_app_browsertest.h" | 5 #include "chrome/browser/apps/ephemeral_app_browsertest.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "apps/app_restore_service.h" | 9 #include "apps/app_restore_service.h" |
10 #include "apps/saved_files_service.h" | 10 #include "apps/saved_files_service.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 using extensions::ExtensionPrefs; | 51 using extensions::ExtensionPrefs; |
52 using extensions::ExtensionRegistry; | 52 using extensions::ExtensionRegistry; |
53 using extensions::ExtensionRegistryObserver; | 53 using extensions::ExtensionRegistryObserver; |
54 using extensions::ExtensionSyncData; | 54 using extensions::ExtensionSyncData; |
55 using extensions::ExtensionSystem; | 55 using extensions::ExtensionSystem; |
56 using extensions::Manifest; | 56 using extensions::Manifest; |
57 using extensions::ResultCatcher; | 57 using extensions::ResultCatcher; |
58 | 58 |
59 namespace { | 59 namespace { |
60 | 60 |
61 namespace alarms = extensions::core_api::alarms; | 61 namespace alarms = extensions::api::alarms; |
62 | 62 |
63 const char kPowerTestApp[] = "ephemeral_apps/power"; | 63 const char kPowerTestApp[] = "ephemeral_apps/power"; |
64 | 64 |
65 // Enabling sync causes these tests to be flaky on Windows. Disable sync so that | 65 // Enabling sync causes these tests to be flaky on Windows. Disable sync so that |
66 // everything else can be tested. See crbug.com/401028 | 66 // everything else can be tested. See crbug.com/401028 |
67 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
68 const bool kEnableSync = false; | 68 const bool kEnableSync = false; |
69 #else | 69 #else |
70 const bool kEnableSync = true; | 70 const bool kEnableSync = true; |
71 #endif | 71 #endif |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); | 1030 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); |
1031 | 1031 |
1032 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); | 1032 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); |
1033 ASSERT_TRUE(app); | 1033 ASSERT_TRUE(app); |
1034 EXPECT_EQ(1, power_settings.keep_awake_count()); | 1034 EXPECT_EQ(1, power_settings.keep_awake_count()); |
1035 | 1035 |
1036 CloseAppWaitForUnload(app->id()); | 1036 CloseAppWaitForUnload(app->id()); |
1037 | 1037 |
1038 EXPECT_EQ(0, power_settings.keep_awake_count()); | 1038 EXPECT_EQ(0, power_settings.keep_awake_count()); |
1039 } | 1039 } |
OLD | NEW |