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

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

Issue 9662055: Test for --nacl-gdb functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Windows XP compatibility Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/command_line.h"
6 #include "base/file_util.h"
7 #include "base/path_service.h"
8 #include "chrome/browser/nacl_host/test/mock_nacl_gdb.h"
9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/test/ui/ppapi_uitest.h"
11
12 static const FilePath::CharType kMockNaClGdb[] =
13 #if defined(OS_WIN)
14 FILE_PATH_LITERAL("mock_nacl_gdb.exe");
15 #else
16 FILE_PATH_LITERAL("mock_nacl_gdb");
17 #endif
18
19 class NaClGdbTest : public PPAPINaClTest {
20 public:
21 NaClGdbTest() {
22 }
23
24 void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
25 PPAPINaClTest::SetUpCommandLine(command_line);
26
27 FilePath mock_nacl_gdb;
28 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb));
29 mock_nacl_gdb = mock_nacl_gdb.Append(kMockNaClGdb);
30 command_line->AppendSwitchPath(switches::kNaClGdb, mock_nacl_gdb);
31 }
32 };
33
34 IN_PROC_BROWSER_TEST_F(NaClGdbTest, Empty) {
35 FilePath mock_nacl_gdb_file;
36 EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb_file));
37 mock_nacl_gdb_file = mock_nacl_gdb_file.Append(kMockNaClGdbFile);
38 file_util::Delete(mock_nacl_gdb_file, false);
39 RunTestViaHTTP("Empty");
40 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
41 EXPECT_TRUE(file_util::Delete(mock_nacl_gdb_file, false));
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698