Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / printing / cloud_print / test / cloud_print_policy_browsertest.cc
index 344fcf4..dc29c06 100644 (file)
@@ -3,7 +3,6 @@
 // found in the LICENSE file.
 
 #include "base/command_line.h"
-#include "base/path_service.h"
 #include "base/process/kill.h"
 #include "base/process/launch.h"
 #include "base/test/test_timeouts.h"
@@ -47,7 +46,8 @@ IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, NormalPassedFlag) {
 
   base::ProcessHandle handle;
   bool launched =
-      base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle);
+      base::LaunchProcess(new_command_line, base::LaunchOptionsForTest(),
+          &handle);
   EXPECT_TRUE(launched);
 
   observer.Wait();
@@ -66,10 +66,18 @@ IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, NormalPassedFlag) {
 IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, DISABLED_CloudPrintPolicyFlag) {
   CommandLine new_command_line(GetCommandLineForRelaunch());
   new_command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
+  // This is important for the test as the way the browser process is launched
+  // here causes the predictor databases to be initialized multiple times. This
+  // is not an issue for production where the process is launched as a service
+  // and a Profile is not created. See http://crbug.com/140466 for more details.
+  new_command_line.AppendSwitchASCII(
+      switches::kSpeculativeResourcePrefetching,
+      switches::kSpeculativeResourcePrefetchingDisabled);
 
   base::ProcessHandle handle;
   bool launched =
-      base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle);
+      base::LaunchProcess(new_command_line, base::LaunchOptionsForTest(),
+          &handle);
   EXPECT_TRUE(launched);
 
   int exit_code = -100;