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

Side by Side Diff: chrome/browser/net/proxy_browsertest.cc

Issue 940813003: Use a utility process for the Mojo v8 proxy resolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8-pac-in-process-enable
Patch Set: Address review comments. Created 5 years, 9 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 (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/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 private: 244 private:
245 DISALLOW_COPY_AND_ASSIGN(DataProxyScriptBrowserTest); 245 DISALLOW_COPY_AND_ASSIGN(DataProxyScriptBrowserTest);
246 }; 246 };
247 247
248 IN_PROC_BROWSER_TEST_F(DataProxyScriptBrowserTest, Verify) { 248 IN_PROC_BROWSER_TEST_F(DataProxyScriptBrowserTest, Verify) {
249 VerifyProxyScript(browser()); 249 VerifyProxyScript(browser());
250 } 250 }
251 251
252 // Fetch PAC script via a data: URL and run out-of-process using Mojo.
253 class OutOfProcessProxyResolverBrowserTest : public InProcessBrowserTest {
254 public:
255 OutOfProcessProxyResolverBrowserTest() {}
256 ~OutOfProcessProxyResolverBrowserTest() override {}
257
258 void SetUpCommandLine(base::CommandLine* command_line) override {
259 std::string contents;
260 // Read in kPACScript contents.
261 ASSERT_TRUE(base::ReadFileToString(ui_test_utils::GetTestFilePath(
262 base::FilePath(base::FilePath::kCurrentDirectory),
263 base::FilePath(kPACScript)),
264 &contents));
265 command_line->AppendSwitchASCII(switches::kProxyPacUrl,
Sam McNally 2015/03/09 03:36:15 Wrap after ( or align the next line after it.
Anand Mistry (off Chromium) 2015/03/10 07:24:23 Done.
266 std::string("data:,") + contents);
Sam McNally 2015/03/09 03:36:15 Shouldn't need to construct a std::string here.
Anand Mistry (off Chromium) 2015/03/10 07:24:22 Done.
267 command_line->AppendSwitch(switches::kV8PacMojoOutOfProcess);
268 }
269
270 private:
271 DISALLOW_COPY_AND_ASSIGN(OutOfProcessProxyResolverBrowserTest);
272 };
273
274 IN_PROC_BROWSER_TEST_F(OutOfProcessProxyResolverBrowserTest, Verify) {
275 VerifyProxyScript(browser());
276 }
277
252 } // namespace 278 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/proxy_service_factory.cc » ('j') | chrome/browser/net/proxy_service_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698