| 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/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.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 | 12 |
| 13 static const FilePath::CharType kMockNaClGdb[] = | 13 static const FilePath::CharType kMockNaClGdb[] = |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 FILE_PATH_LITERAL("mock_nacl_gdb.exe"); | 15 FILE_PATH_LITERAL("mock_nacl_gdb.exe"); |
| 16 #else | 16 #else |
| 17 FILE_PATH_LITERAL("mock_nacl_gdb"); | 17 FILE_PATH_LITERAL("mock_nacl_gdb"); |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 class NaClGdbTest : public PPAPINaClNewlibTest { | 20 class NaClGdbTest : public PPAPINaClNewlibTest { |
| 21 public: | 21 public: |
| 22 NaClGdbTest() { | 22 NaClGdbTest() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 25 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 26 PPAPINaClNewlibTest::SetUpCommandLine(command_line); | 26 PPAPINaClNewlibTest::SetUpCommandLine(command_line); |
| 27 | 27 |
| 28 FilePath mock_nacl_gdb; | 28 FilePath mock_nacl_gdb; |
| 29 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb)); | 29 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb)); |
| 30 mock_nacl_gdb = mock_nacl_gdb.Append(kMockNaClGdb); | 30 mock_nacl_gdb = mock_nacl_gdb.Append(kMockNaClGdb); |
| 31 command_line->AppendSwitchPath(switches::kNaClGdb, mock_nacl_gdb); | 31 command_line->AppendSwitchPath(switches::kNaClGdb, mock_nacl_gdb); |
| 32 EXPECT_TRUE(file_util::CreateTemporaryFile(&script_)); | 32 EXPECT_TRUE(file_util::CreateTemporaryFile(&script_)); |
| 33 command_line->AppendSwitchPath(switches::kNaClGdbScript, script_); | 33 command_line->AppendSwitchPath(switches::kNaClGdbScript, script_); |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Fails on the ASAN test bot. See http://crbug.com/122219 | 71 // Fails on the ASAN test bot. See http://crbug.com/122219 |
| 72 #if defined(ADDRESS_SANITIZER) | 72 #if defined(ADDRESS_SANITIZER) |
| 73 #define MAYBE_Empty DISABLED_Empty | 73 #define MAYBE_Empty DISABLED_Empty |
| 74 #else | 74 #else |
| 75 #define MAYBE_Empty Empty | 75 #define MAYBE_Empty Empty |
| 76 #endif | 76 #endif |
| 77 IN_PROC_BROWSER_TEST_F(NaClGdbTest, MAYBE_Empty) { | 77 IN_PROC_BROWSER_TEST_F(NaClGdbTest, MAYBE_Empty) { |
| 78 RunWithNaClGdb("Empty"); | 78 RunWithNaClGdb("Empty"); |
| 79 } | 79 } |
| OLD | NEW |