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

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

Issue 547003002: Remove the --event-page-idle-time and --event-page-suspending-time switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 months 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
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 EphemeralAppTestBase::EphemeralAppTestBase() {} 190 EphemeralAppTestBase::EphemeralAppTestBase() {}
191 191
192 EphemeralAppTestBase::~EphemeralAppTestBase() {} 192 EphemeralAppTestBase::~EphemeralAppTestBase() {}
193 193
194 void EphemeralAppTestBase::SetUpCommandLine(base::CommandLine* command_line) { 194 void EphemeralAppTestBase::SetUpCommandLine(base::CommandLine* command_line) {
195 // Skip PlatformAppBrowserTest, which sets different values for the switches 195 // Skip PlatformAppBrowserTest, which sets different values for the switches
196 // below. 196 // below.
197 ExtensionBrowserTest::SetUpCommandLine(command_line); 197 ExtensionBrowserTest::SetUpCommandLine(command_line);
198 198
199 // Make event pages get suspended immediately. 199 // Make event pages get suspended immediately.
200 command_line->AppendSwitchASCII( 200 extensions::ProcessManager::SetEventPageIdleTimeForTesting(1);
201 extensions::switches::kEventPageIdleTime, "10"); 201 extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1);
202 command_line->AppendSwitchASCII(
203 extensions::switches::kEventPageSuspendingTime, "10");
204 202
205 // Enable ephemeral apps flag. 203 // Enable ephemeral apps flag.
206 command_line->AppendSwitch(switches::kEnableEphemeralApps); 204 command_line->AppendSwitch(switches::kEnableEphemeralApps);
207 } 205 }
208 206
209 void EphemeralAppTestBase::SetUpOnMainThread() { 207 void EphemeralAppTestBase::SetUpOnMainThread() {
210 PlatformAppBrowserTest::SetUpOnMainThread(); 208 PlatformAppBrowserTest::SetUpOnMainThread();
211 209
212 // Disable ephemeral apps immediately after they stop running in tests. 210 // Disable ephemeral apps immediately after they stop running in tests.
213 EphemeralAppService::Get(profile())->set_disable_delay_for_test(0); 211 EphemeralAppService::Get(profile())->set_disable_delay_for_test(0);
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 base::Bind(&PowerSaveBlockerStub::Create, &power_settings)); 1031 base::Bind(&PowerSaveBlockerStub::Create, &power_settings));
1034 1032
1035 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp); 1033 const Extension* app = InstallAndLaunchEphemeralApp(kPowerTestApp);
1036 ASSERT_TRUE(app); 1034 ASSERT_TRUE(app);
1037 EXPECT_EQ(1, power_settings.keep_awake_count()); 1035 EXPECT_EQ(1, power_settings.keep_awake_count());
1038 1036
1039 CloseAppWaitForUnload(app->id()); 1037 CloseAppWaitForUnload(app->id());
1040 1038
1041 EXPECT_EQ(0, power_settings.keep_awake_count()); 1039 EXPECT_EQ(0, power_settings.keep_awake_count());
1042 } 1040 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698