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

Side by Side Diff: content/renderer/resource_fetcher_browsertest.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "content/public/renderer/resource_fetcher.h" 5 #include "content/public/renderer/resource_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // invalidates |response| and |data|. 124 // invalidates |response| and |data|.
125 fetcher_.reset(); 125 fetcher_.reset();
126 } 126 }
127 127
128 private: 128 private:
129 scoped_ptr<ResourceFetcher> fetcher_; 129 scoped_ptr<ResourceFetcher> fetcher_;
130 }; 130 };
131 131
132 class ResourceFetcherTests : public ContentBrowserTest { 132 class ResourceFetcherTests : public ContentBrowserTest {
133 public: 133 public:
134 void SetUpCommandLine(CommandLine* command_line) override { 134 void SetUpCommandLine(base::CommandLine* command_line) override {
135 command_line->AppendSwitch(switches::kSingleProcess); 135 command_line->AppendSwitch(switches::kSingleProcess);
136 #if defined(OS_WIN) 136 #if defined(OS_WIN)
137 // Don't want to try to create a GPU process. 137 // Don't want to try to create a GPU process.
138 command_line->AppendSwitch(switches::kDisableGpu); 138 command_line->AppendSwitch(switches::kDisableGpu);
139 #endif 139 #endif
140 } 140 }
141 141
142 RenderView* GetRenderView() { 142 RenderView* GetRenderView() {
143 // We could have the test on the UI thread get the WebContent's routing ID, 143 // We could have the test on the UI thread get the WebContent's routing ID,
144 // but we know this will be the first RV so skip that and just hardcode it. 144 // but we know this will be the first RV so skip that and just hardcode it.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 ASSERT_TRUE(test_server()->Start()); 398 ASSERT_TRUE(test_server()->Start());
399 GURL url(test_server()->GetURL("echoheader?header")); 399 GURL url(test_server()->GetURL("echoheader?header"));
400 400
401 PostTaskToInProcessRendererAndWait( 401 PostTaskToInProcessRendererAndWait(
402 base::Bind( 402 base::Bind(
403 &ResourceFetcherTests::ResourceFetcherSetHeader, 403 &ResourceFetcherTests::ResourceFetcherSetHeader,
404 base::Unretained(this), url)); 404 base::Unretained(this), url));
405 } 405 }
406 406
407 } // namespace content 407 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_main_platform_delegate_win.cc ('k') | content/renderer/savable_resources_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698