Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: chrome/browser/apps/ephemeral_app_browsertest.cc

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « apps/launcher.cc ('k') | chrome/browser/apps/window_controls_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 bool result = catcher.GetNextResult(); 365 bool result = catcher.GetNextResult();
366 message_ = catcher.message(); 366 message_ = catcher.message();
367 367
368 CloseAppWaitForUnload(app->id()); 368 CloseAppWaitForUnload(app->id());
369 return result; 369 return result;
370 } 370 }
371 371
372 // Verify that the event page of the app has not been loaded. 372 // Verify that the event page of the app has not been loaded.
373 void VerifyAppNotLoaded(const std::string& app_id) { 373 void VerifyAppNotLoaded(const std::string& app_id) {
374 EXPECT_FALSE(ExtensionSystem::Get(profile())-> 374 EXPECT_FALSE(extensions::ProcessManager::Get(profile())
375 process_manager()->GetBackgroundHostForExtension(app_id)); 375 ->GetBackgroundHostForExtension(app_id));
376 } 376 }
377 377
378 // Verify properties of ephemeral apps. 378 // Verify properties of ephemeral apps.
379 void VerifyEphemeralApp(const std::string& app_id) { 379 void VerifyEphemeralApp(const std::string& app_id) {
380 EXPECT_TRUE(extensions::util::IsEphemeralApp(app_id, profile())); 380 EXPECT_TRUE(extensions::util::IsEphemeralApp(app_id, profile()));
381 381
382 // Ephemeral apps should not be synced. 382 // Ephemeral apps should not be synced.
383 scoped_ptr<AppSyncData> sync_change = GetLastSyncChangeForApp(app_id); 383 scoped_ptr<AppSyncData> sync_change = GetLastSyncChangeForApp(app_id);
384 EXPECT_FALSE(sync_change.get()); 384 EXPECT_FALSE(sync_change.get());
385 385
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); 1032 base::Bind(&PowerSaveBlockerStub::Create, &power_settings));
1033 1033
1034 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); 1034 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp);
1035 ASSERT_TRUE(app); 1035 ASSERT_TRUE(app);
1036 EXPECT_EQ(1, power_settings.keep_awake_count()); 1036 EXPECT_EQ(1, power_settings.keep_awake_count());
1037 1037
1038 CloseAppWaitForUnload(app->id()); 1038 CloseAppWaitForUnload(app->id());
1039 1039
1040 EXPECT_EQ(0, power_settings.keep_awake_count()); 1040 EXPECT_EQ(0, power_settings.keep_awake_count());
1041 } 1041 }
OLDNEW
« no previous file with comments | « apps/launcher.cc ('k') | chrome/browser/apps/window_controls_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698