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

Side by Side Diff: chrome/browser/devtools/device/port_forwarding_browsertest.cc

Issue 2957983002: Remove pointless InProcessBrowserTest calls. (Closed)
Patch Set: build Created 3 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 22 matching lines...) Expand all
33 const int kAlternativeDebuggingPort = 9224; 33 const int kAlternativeDebuggingPort = 9224;
34 34
35 } 35 }
36 36
37 class PortForwardingTest: public InProcessBrowserTest { 37 class PortForwardingTest: public InProcessBrowserTest {
38 virtual int GetRemoteDebuggingPort() { 38 virtual int GetRemoteDebuggingPort() {
39 return kDefaultDebuggingPort; 39 return kDefaultDebuggingPort;
40 } 40 }
41 41
42 void SetUpCommandLine(base::CommandLine* command_line) override { 42 void SetUpCommandLine(base::CommandLine* command_line) override {
43 InProcessBrowserTest::SetUpCommandLine(command_line);
44 command_line->AppendSwitchASCII(switches::kRemoteDebuggingPort, 43 command_line->AppendSwitchASCII(switches::kRemoteDebuggingPort,
45 base::IntToString(GetRemoteDebuggingPort())); 44 base::IntToString(GetRemoteDebuggingPort()));
46 } 45 }
47 46
48 protected: 47 protected:
49 class Listener : public DevToolsAndroidBridge::PortForwardingListener { 48 class Listener : public DevToolsAndroidBridge::PortForwardingListener {
50 public: 49 public:
51 explicit Listener(Profile* profile) 50 explicit Listener(Profile* profile)
52 : profile_(profile), 51 : profile_(profile),
53 skip_empty_devices_(true) { 52 skip_empty_devices_(true) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 base::RunLoop run_loop; 180 base::RunLoop run_loop;
182 181
183 self_provider->set_release_callback_for_test( 182 self_provider->set_release_callback_for_test(
184 base::Bind(base::IgnoreResult(&base::SingleThreadTaskRunner::PostTask), 183 base::Bind(base::IgnoreResult(&base::SingleThreadTaskRunner::PostTask),
185 base::ThreadTaskRunnerHandle::Get(), FROM_HERE, 184 base::ThreadTaskRunnerHandle::Get(), FROM_HERE,
186 run_loop.QuitWhenIdleClosure())); 185 run_loop.QuitWhenIdleClosure()));
187 wait_for_port_forwarding.reset(); 186 wait_for_port_forwarding.reset();
188 187
189 content::RunThisRunLoop(&run_loop); 188 content::RunThisRunLoop(&run_loop);
190 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698