| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 ExtensionRegistry::IncludeFlag expected_set) { | 483 ExtensionRegistry::IncludeFlag expected_set) { |
| 484 ASSERT_TRUE(app); | 484 ASSERT_TRUE(app); |
| 485 | 485 |
| 486 // Simulate an install from sync. | 486 // Simulate an install from sync. |
| 487 const syncer::StringOrdinal kAppLaunchOrdinal("x"); | 487 const syncer::StringOrdinal kAppLaunchOrdinal("x"); |
| 488 const syncer::StringOrdinal kPageOrdinal("y"); | 488 const syncer::StringOrdinal kPageOrdinal("y"); |
| 489 AppSyncData app_sync_data(*app, | 489 AppSyncData app_sync_data(*app, |
| 490 enable_from_sync, | 490 enable_from_sync, |
| 491 false /* incognito enabled */, | 491 false /* incognito enabled */, |
| 492 false /* remote install */, | 492 false /* remote install */, |
| 493 extensions::ExtensionSyncData::PREF_UNSET, |
| 493 kAppLaunchOrdinal, | 494 kAppLaunchOrdinal, |
| 494 kPageOrdinal, | 495 kPageOrdinal, |
| 495 extensions::LAUNCH_TYPE_REGULAR); | 496 extensions::LAUNCH_TYPE_REGULAR); |
| 496 | 497 |
| 497 std::string app_id = app->id(); | 498 std::string app_id = app->id(); |
| 498 app = NULL; | 499 app = NULL; |
| 499 | 500 |
| 500 ExtensionSyncService* sync_service = ExtensionSyncService::Get(profile()); | 501 ExtensionSyncService* sync_service = ExtensionSyncService::Get(profile()); |
| 501 sync_service->ProcessAppSyncData(app_sync_data); | 502 sync_service->ProcessAppSyncData(app_sync_data); |
| 502 | 503 |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); | 1033 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); |
| 1033 | 1034 |
| 1034 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); | 1035 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); |
| 1035 ASSERT_TRUE(app); | 1036 ASSERT_TRUE(app); |
| 1036 EXPECT_EQ(1, power_settings.keep_awake_count()); | 1037 EXPECT_EQ(1, power_settings.keep_awake_count()); |
| 1037 | 1038 |
| 1038 CloseAppWaitForUnload(app->id()); | 1039 CloseAppWaitForUnload(app->id()); |
| 1039 | 1040 |
| 1040 EXPECT_EQ(0, power_settings.keep_awake_count()); | 1041 EXPECT_EQ(0, power_settings.keep_awake_count()); |
| 1041 } | 1042 } |
| OLD | NEW |