Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / system_indicator / system_indicator_apitest.cc
index 8e58ca2..ec35a40 100644 (file)
 #include "extensions/browser/extension_system.h"
 #include "extensions/browser/process_manager.h"
 #include "extensions/common/extension.h"
-#include "extensions/common/switches.h"
+#include "extensions/test/result_catcher.h"
 
 class SystemIndicatorApiTest : public ExtensionApiTest {
  public:
-  virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
-    ExtensionApiTest::SetUpCommandLine(command_line);
+  virtual void SetUpOnMainThread() OVERRIDE {
+    ExtensionApiTest::SetUpOnMainThread();
     // Set shorter delays to prevent test timeouts in tests that need to wait
     // for the event page to unload.
-    command_line->AppendSwitchASCII(
-        extensions::switches::kEventPageIdleTime, "1000");
-    command_line->AppendSwitchASCII(
-        extensions::switches::kEventPageSuspendingTime, "1000");
+    extensions::ProcessManager::SetEventPageIdleTimeForTesting(1);
+    extensions::ProcessManager::SetEventPageSuspendingTimeForTesting(1);
   }
 
   const extensions::Extension* LoadExtensionAndWait(
@@ -53,7 +51,7 @@ IN_PROC_BROWSER_TEST_F(SystemIndicatorApiTest, SystemIndicator) {
   extensions::SystemIndicatorManager* manager =
       extensions::SystemIndicatorManagerFactory::GetForProfile(profile());
   if (manager) {
-    ResultCatcher catcher;
+    extensions::ResultCatcher catcher;
 
     const extensions::Extension* extension =
         LoadExtensionAndWait("system_indicator/unloaded");