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

Unified Diff: chrome/browser/extensions/app_background_page_apitest.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: 1s 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/app_background_page_apitest.cc
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc
index 1ed528918aab6a0399058b08caf7e7557eda40d5..81f04c4c13fa75e6c386b15e8df83f0f0a74f026 100644
--- a/chrome/browser/extensions/app_background_page_apitest.cc
+++ b/chrome/browser/extensions/app_background_page_apitest.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_notification_tracker.h"
#include "content/public/test/test_utils.h"
+#include "extensions/browser/process_manager.h"
#include "extensions/common/extension.h"
#include "extensions/common/switches.h"
#include "net/dns/mock_host_resolver.h"
@@ -128,15 +129,13 @@ class AppBackgroundPageNaClTest : public AppBackgroundPageApiTest {
virtual ~AppBackgroundPageNaClTest() {
}
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- AppBackgroundPageApiTest::SetUpCommandLine(command_line);
+ virtual void SetUpOnMainThread() OVERRIDE {
+ AppBackgroundPageApiTest::SetUpOnMainThread();
#if !defined(DISABLE_NACL)
nacl::NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(50);
#endif
- command_line->AppendSwitchASCII(
- extensions::switches::kEventPageIdleTime, "1000");
- command_line->AppendSwitchASCII(
- extensions::switches::kEventPageSuspendingTime, "1000");
+ extensions::ProcessManager::SetEventPageIdleTimeForTesting(1000);
+ extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1000);
}
const Extension* extension() { return extension_; }
@@ -146,7 +145,7 @@ class AppBackgroundPageNaClTest : public AppBackgroundPageApiTest {
base::FilePath app_dir;
PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir);
app_dir = app_dir.AppendASCII(
- "ppapi/tests/extensions/background_keepalive/newlib");
+ "ppapi/tests/extensions/background_keepalive/newlib");
extension_ = LoadExtension(app_dir);
ASSERT_TRUE(extension_);
}
@@ -651,4 +650,3 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageNaClTest,
idle_impulse_counter.Wait();
#endif
}
-

Powered by Google App Engine
This is Rietveld 408576698