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

Side by Side Diff: chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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/environment.h" 6 #include "base/environment.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/launch.h" 9 #include "base/process/launch.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "chrome/test/ppapi/ppapi_test.h" 12 #include "chrome/test/ppapi/ppapi_test.h"
13 #include "components/nacl/browser/nacl_browser.h" 13 #include "components/nacl/browser/nacl_browser.h"
14 #include "components/nacl/common/nacl_switches.h" 14 #include "components/nacl/common/nacl_switches.h"
15 #include "content/public/test/test_utils.h" 15 #include "content/public/test/test_utils.h"
16 16
17 class NaClGdbDebugStubTest : public PPAPINaClNewlibTest { 17 class NaClGdbDebugStubTest : public PPAPINaClNewlibTest {
18 public: 18 public:
19 NaClGdbDebugStubTest() { 19 NaClGdbDebugStubTest() {
20 } 20 }
21 21
22 void SetUpCommandLine(CommandLine* command_line) override; 22 void SetUpCommandLine(base::CommandLine* command_line) override;
23 23
24 void StartTestScript(base::ProcessHandle* test_process, 24 void StartTestScript(base::ProcessHandle* test_process,
25 std::string test_name, int debug_stub_port); 25 std::string test_name, int debug_stub_port);
26 void RunDebugStubTest(const std::string& nacl_module, 26 void RunDebugStubTest(const std::string& nacl_module,
27 const std::string& test_name); 27 const std::string& test_name);
28 }; 28 };
29 29
30 void NaClGdbDebugStubTest::SetUpCommandLine(CommandLine* command_line) { 30 void NaClGdbDebugStubTest::SetUpCommandLine(base::CommandLine* command_line) {
31 PPAPINaClNewlibTest::SetUpCommandLine(command_line); 31 PPAPINaClNewlibTest::SetUpCommandLine(command_line);
32 command_line->AppendSwitch(switches::kEnableNaClDebug); 32 command_line->AppendSwitch(switches::kEnableNaClDebug);
33 } 33 }
34 34
35 void NaClGdbDebugStubTest::StartTestScript(base::ProcessHandle* test_process, 35 void NaClGdbDebugStubTest::StartTestScript(base::ProcessHandle* test_process,
36 std::string test_name, 36 std::string test_name,
37 int debug_stub_port) { 37 int debug_stub_port) {
38 // We call python script to reuse GDB RSP protocol implementation. 38 // We call python script to reuse GDB RSP protocol implementation.
39 CommandLine cmd(base::FilePath(FILE_PATH_LITERAL("python"))); 39 base::CommandLine cmd(base::FilePath(FILE_PATH_LITERAL("python")));
40 base::FilePath script; 40 base::FilePath script;
41 PathService::Get(chrome::DIR_TEST_DATA, &script); 41 PathService::Get(chrome::DIR_TEST_DATA, &script);
42 script = script.AppendASCII("nacl/debug_stub_browser_tests.py"); 42 script = script.AppendASCII("nacl/debug_stub_browser_tests.py");
43 cmd.AppendArgPath(script); 43 cmd.AppendArgPath(script);
44 cmd.AppendArg(base::IntToString(debug_stub_port)); 44 cmd.AppendArg(base::IntToString(debug_stub_port));
45 cmd.AppendArg(test_name); 45 cmd.AppendArg(test_name);
46 LOG(INFO) << cmd.GetCommandLineString(); 46 LOG(INFO) << cmd.GetCommandLineString();
47 base::LaunchProcess(cmd, base::LaunchOptions(), test_process); 47 base::LaunchProcess(cmd, base::LaunchOptions(), test_process);
48 } 48 }
49 49
(...skipping 30 matching lines...) Expand all
80 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 80 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
81 // Timing out on ARM linux: http://crbug.com/238469 81 // Timing out on ARM linux: http://crbug.com/238469
82 # define MAYBE_Breakpoint DISABLED_Breakpoint 82 # define MAYBE_Breakpoint DISABLED_Breakpoint
83 #else 83 #else
84 # define MAYBE_Breakpoint Breakpoint 84 # define MAYBE_Breakpoint Breakpoint
85 #endif 85 #endif
86 86
87 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Breakpoint) { 87 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Breakpoint) {
88 RunDebugStubTest("Empty", "breakpoint"); 88 RunDebugStubTest("Empty", "breakpoint");
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/variations/variations_service.cc ('k') | chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698