OLD | NEW |
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/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "chrome/browser/nacl_host/nacl_browser.h" | 9 #include "chrome/browser/nacl_host/nacl_browser.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/test/ppapi/ppapi_test.h" | 11 #include "chrome/test/ppapi/ppapi_test.h" |
12 #include "content/public/test/test_browser_thread.h" | |
13 #include "content/public/test/test_utils.h" | 12 #include "content/public/test/test_utils.h" |
14 | 13 |
15 class NaClGdbDebugStubTest : public PPAPINaClNewlibTest { | 14 class NaClGdbDebugStubTest : public PPAPINaClNewlibTest { |
16 public: | 15 public: |
17 NaClGdbDebugStubTest() { | 16 NaClGdbDebugStubTest() { |
18 } | 17 } |
19 | 18 |
20 void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 19 void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
21 | 20 |
22 void StartTestScript(base::ProcessHandle* test_process, | 21 void StartTestScript(base::ProcessHandle* test_process, |
23 std::string test_name, int debug_stub_port); | 22 std::string test_name, int debug_stub_port); |
24 | |
25 void RunDebugStubTest(const std::string& nacl_module, | 23 void RunDebugStubTest(const std::string& nacl_module, |
26 const std::string& test_name); | 24 const std::string& test_name); |
27 }; | 25 }; |
28 | 26 |
29 void NaClGdbDebugStubTest::SetUpCommandLine(CommandLine* command_line) { | 27 void NaClGdbDebugStubTest::SetUpCommandLine(CommandLine* command_line) { |
30 PPAPINaClNewlibTest::SetUpCommandLine(command_line); | 28 PPAPINaClNewlibTest::SetUpCommandLine(command_line); |
31 command_line->AppendSwitch(switches::kEnableNaClDebug); | 29 command_line->AppendSwitch(switches::kEnableNaClDebug); |
32 } | 30 } |
33 | 31 |
34 void NaClGdbDebugStubTest::StartTestScript(base::ProcessHandle* test_process, | 32 void NaClGdbDebugStubTest::StartTestScript(base::ProcessHandle* test_process, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 # define MAYBE_Breakpoint Breakpoint | 67 # define MAYBE_Breakpoint Breakpoint |
70 #endif | 68 #endif |
71 | 69 |
72 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Empty) { | 70 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Empty) { |
73 RunDebugStubTest("Empty", "continue"); | 71 RunDebugStubTest("Empty", "continue"); |
74 } | 72 } |
75 | 73 |
76 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Breakpoint) { | 74 IN_PROC_BROWSER_TEST_F(NaClGdbDebugStubTest, MAYBE_Breakpoint) { |
77 RunDebugStubTest("Empty", "breakpoint"); | 75 RunDebugStubTest("Empty", "breakpoint"); |
78 } | 76 } |
OLD | NEW |