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

Unified Diff: chrome/browser/nacl_host/nacl_gdb_browsertest.cc

Issue 9662055: Test for --nacl-gdb functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/nacl_host/nacl_gdb_browsertest.cc
===================================================================
--- chrome/browser/nacl_host/nacl_gdb_browsertest.cc (revision 0)
+++ chrome/browser/nacl_host/nacl_gdb_browsertest.cc (working copy)
@@ -0,0 +1,36 @@
+// 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/path_service.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/test/ui/ppapi_uitest.h"
+
+#if defined(OS_WIN)
+static const FilePath::CharType kMockNaClGdb[] =
Mark Seaborn 2012/03/13 01:05:20 You could move this line outside of the #if.
halyavin 2012/03/13 12:48:27 Done.
+ FILE_PATH_LITERAL("mock_nacl_gdb.exe");
+#else
+static const FilePath::CharType kMockNaClGdb[] =
+ FILE_PATH_LITERAL("mock_nacl_gdb");
+#endif
+
+class NaClGdbTest : public PPAPINaClTest {
+ public:
+ NaClGdbTest() {
+ }
+
+ void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ PPAPINaClTest::SetUpCommandLine(command_line);
+
+ command_line->AppendSwitch(switches::kNoSandbox);
Mark Seaborn 2012/03/13 01:05:20 I thought this gets added automatically when using
halyavin 2012/03/13 12:48:27 Sorry, I knew that this should be removed but forg
+ 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);
Mark Seaborn 2012/03/13 01:05:20 What happens if Chromium ignores the --nacl-gdb ar
Mark Seaborn 2012/03/13 17:06:27 Andrey, you didn't answer this question. This is
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(NaClGdbTest, Empty) {
+ RunTestViaHTTP("Empty");
+}

Powered by Google App Engine
This is Rietveld 408576698