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

Unified Diff: chrome/test/nacl/nacl_browsertest.cc

Issue 181153002: Have PNaCl use debug pexe URL instead of stripped pexe w/ kEnableNaClDebug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split the test Created 6 years, 10 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/test/nacl/nacl_browsertest.cc
diff --git a/chrome/test/nacl/nacl_browsertest.cc b/chrome/test/nacl/nacl_browsertest.cc
index 2df28a7044d1a099809f9fc112b153ba851a8d1f..8deb28ebec48ac2a610389952eb177a66727d1a4 100644
--- a/chrome/test/nacl/nacl_browsertest.cc
+++ b/chrome/test/nacl/nacl_browsertest.cc
@@ -16,6 +16,8 @@
#include "base/path_service.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/nacl/nacl_browsertest_util.h"
+#include "components/nacl/common/nacl_switches.h"
+#include "content/public/common/content_switches.h"
namespace {
@@ -187,6 +189,41 @@ IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, RelativeManifest) {
RunLoadTest(FILE_PATH_LITERAL("manifest/relative_manifest.html"));
}
+class NaClBrowserTestPnaclDebugURL : public NaClBrowserTestPnacl {
+ public:
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ NaClBrowserTestPnacl::SetUpCommandLine(command_line);
+ // Turn on debugging to influence the PNaCl URL loaded
+ command_line->AppendSwitch(switches::kEnableNaClDebug);
+ // On windows, the debug stub requires --no-sandbox:
+ // crbug.com/265624
+#if defined(OS_WIN)
+ command_line->AppendSwitch(switches::kNoSandbox);
+#endif
+ // Don't actually debug the app though.
+ command_line->AppendSwitchASCII(switches::kNaClDebugMask,
+ "!<all_urls>");
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclDebugURL,
+ MAYBE_PNACL(PnaclDebugURLFlagAndURL)) {
+ RunLoadTest(FILE_PATH_LITERAL(
+ "pnacl_debug_url.html?nmf_file=pnacl_has_debug.nmf"));
+}
+
+IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclDebugURL,
+ MAYBE_PNACL(PnaclDebugURLFlagNoURL)) {
+ RunLoadTest(FILE_PATH_LITERAL(
+ "pnacl_debug_url.html?nmf_file=pnacl_no_debug.nmf"));
+}
+
+IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl,
+ MAYBE_PNACL(PnaclDebugURLFlagOff)) {
+ RunLoadTest(FILE_PATH_LITERAL(
+ "pnacl_debug_url.html?nmf_file=pnacl_has_debug_flag_off.nmf"));
+}
+
IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl,
MAYBE_PNACL(PnaclErrorHandling)) {
RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html"));
« no previous file with comments | « chrome/test/data/nacl/pnacl_debug_url/pnacl_no_debug.nmf ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698