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

Side by Side Diff: chrome/browser/printing/cloud_print/test/cloud_print_policy_browsertest.cc

Issue 10825188: Add comment explaining fix and added explicit HistoryService dependency in predictor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/process_util.h" 8 #include "base/process_util.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 TestTimeouts::action_timeout()); 51 TestTimeouts::action_timeout());
52 52
53 EXPECT_TRUE(exited); 53 EXPECT_TRUE(exited);
54 EXPECT_EQ(chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED, exit_code); 54 EXPECT_EQ(chrome::RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED, exit_code);
55 base::CloseProcessHandle(handle); 55 base::CloseProcessHandle(handle);
56 } 56 }
57 57
58 IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, CloudPrintPolicyFlag) { 58 IN_PROC_BROWSER_TEST_F(CloudPrintPolicyTest, CloudPrintPolicyFlag) {
59 CommandLine new_command_line(GetCommandLineForRelaunch()); 59 CommandLine new_command_line(GetCommandLineForRelaunch());
60 new_command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy); 60 new_command_line.AppendSwitch(switches::kCheckCloudPrintConnectorPolicy);
61 // This is important for the test as the way the browser process is launched
62 // here causes the predictor databases to be initialized multiple times. This
63 // is not an issue for production where the process is launched as a service
64 // and a Profile is not created. See http://crbug.com/140466 for more details.
61 new_command_line.AppendSwitchASCII( 65 new_command_line.AppendSwitchASCII(
62 switches::kSpeculativeResourcePrefetching, 66 switches::kSpeculativeResourcePrefetching,
63 switches::kSpeculativeResourcePrefetchingDisabled); 67 switches::kSpeculativeResourcePrefetchingDisabled);
64 68
65 base::ProcessHandle handle; 69 base::ProcessHandle handle;
66 bool launched = 70 bool launched =
67 base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle); 71 base::LaunchProcess(new_command_line, base::LaunchOptions(), &handle);
68 EXPECT_TRUE(launched); 72 EXPECT_TRUE(launched);
69 73
70 int exit_code = -100; 74 int exit_code = -100;
71 bool exited = 75 bool exited =
72 base::WaitForExitCodeWithTimeout(handle, &exit_code, 76 base::WaitForExitCodeWithTimeout(handle, &exit_code,
73 TestTimeouts::action_timeout()); 77 TestTimeouts::action_timeout());
74 78
75 EXPECT_TRUE(exited); 79 EXPECT_TRUE(exited);
76 EXPECT_EQ(content::RESULT_CODE_NORMAL_EXIT, exit_code); 80 EXPECT_EQ(content::RESULT_CODE_NORMAL_EXIT, exit_code);
77 base::CloseProcessHandle(handle); 81 base::CloseProcessHandle(handle);
78 } 82 }
79 83
80 } // namespace 84 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/predictors/resource_prefetch_predictor_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698