Chromium Code Reviews| Index: chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc |
| =================================================================== |
| --- chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc (revision 0) |
| +++ chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc (working copy) |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/command_line.h" |
| +#include "base/file_util.h" |
| +#include "base/path_service.h" |
| +#include "chrome/browser/nacl_host/test/mock_nacl_gdb.h" |
| +#include "chrome/common/chrome_switches.h" |
| +#include "chrome/test/ui/ppapi_uitest.h" |
| + |
| +static const FilePath::CharType kMockNaClGdb[] = |
| +#if defined(OS_WIN) |
| + FILE_PATH_LITERAL("mock_nacl_gdb.exe"); |
| +#else |
| + FILE_PATH_LITERAL("mock_nacl_gdb"); |
| +#endif |
| + |
| +class NaClGdbTest : public PPAPINaClTest { |
| + public: |
| + NaClGdbTest() { |
| + } |
| + |
| + void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| + PPAPINaClTest::SetUpCommandLine(command_line); |
| + |
| + FilePath mock_nacl_gdb; |
| + EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb)); |
| + mock_nacl_gdb = mock_nacl_gdb.Append(kMockNaClGdb); |
| + command_line->AppendSwitchPath(switches::kNaClGdb, mock_nacl_gdb); |
| + } |
| +}; |
| + |
| +IN_PROC_BROWSER_TEST_F(NaClGdbTest, Empty) { |
| + FilePath mock_nacl_gdb_file; |
| + EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb_file)); |
| + mock_nacl_gdb_file = mock_nacl_gdb_file.Append(kMockNaClGdbFile); |
| + file_util::Delete(mock_nacl_gdb_file, false); |
| + RunTestViaHTTP("Empty"); |
| + EXPECT_TRUE(file_util::PathExists(mock_nacl_gdb_file)); |
|
Mark Seaborn
2012/03/14 23:33:14
This file seems to be going into the current direc
halyavin
2012/03/15 15:31:36
No, it is src/build/Debug directory (src/out/Debug
|
| + EXPECT_TRUE(file_util::Delete(mock_nacl_gdb_file, false)); |
| +} |