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

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

Issue 22839005: disable pnacl by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review changes Created 7 years, 4 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
« no previous file with comments | « chrome/test/nacl/nacl_browsertest_util.h ('k') | chrome/test/ppapi/ppapi_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/nacl/nacl_browsertest_util.cc
diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
index 3cd7e35d4cff960762d5c97b93ced4c8366a508f..1c171a75e4d3d5361e12cca8abf4cc5bc1ad8831 100644
--- a/chrome/test/nacl/nacl_browsertest_util.cc
+++ b/chrome/test/nacl/nacl_browsertest_util.cc
@@ -187,15 +187,6 @@ static void AddPnaclParm(const base::FilePath::StringType& url,
}
}
-static void AddPnaclDisabledParm(const base::FilePath::StringType& url,
- base::FilePath::StringType* url_with_parm) {
- if (url.find(FILE_PATH_LITERAL("?")) == base::FilePath::StringType::npos) {
- *url_with_parm = url + FILE_PATH_LITERAL("?pnacl_disabled=1");
- } else {
- *url_with_parm = url + FILE_PATH_LITERAL("&pnacl_disabled=1");
- }
-}
-
NaClBrowserTestBase::NaClBrowserTestBase() {
}
@@ -219,11 +210,7 @@ bool NaClBrowserTestBase::GetDocumentRoot(base::FilePath* document_root) {
return GetNaClVariantRoot(Variant(), document_root);
}
-bool NaClBrowserTestBase::IsAPnaclTest() {
- return false;
-}
-
-bool NaClBrowserTestBase::IsPnaclDisabled() {
+bool NaClBrowserTestBase::IsPnacl() {
return false;
}
@@ -246,15 +233,11 @@ bool NaClBrowserTestBase::RunJavascriptTest(const GURL& url,
void NaClBrowserTestBase::RunLoadTest(
const base::FilePath::StringType& test_file) {
LoadTestMessageHandler handler;
- base::FilePath::StringType test_file_with_pnacl = test_file;
- if (IsAPnaclTest()) {
- AddPnaclParm(test_file, &test_file_with_pnacl);
+ base::FilePath::StringType test_file_with_parm = test_file;
+ if (IsPnacl()) {
+ AddPnaclParm(test_file, &test_file_with_parm);
}
- base::FilePath::StringType test_file_with_both = test_file_with_pnacl;
- if (IsPnaclDisabled()) {
- AddPnaclDisabledParm(test_file_with_pnacl, &test_file_with_both);
- }
- bool ok = RunJavascriptTest(TestURL(test_file_with_both), &handler);
+ bool ok = RunJavascriptTest(TestURL(test_file_with_parm), &handler);
ASSERT_TRUE(ok) << handler.error_message();
ASSERT_TRUE(handler.test_passed()) << "Test failed.";
}
@@ -262,15 +245,11 @@ void NaClBrowserTestBase::RunLoadTest(
void NaClBrowserTestBase::RunNaClIntegrationTest(
const base::FilePath::StringType& url_fragment) {
NaClIntegrationMessageHandler handler;
- base::FilePath::StringType url_fragment_with_pnacl = url_fragment;
- if (IsAPnaclTest()) {
- AddPnaclParm(url_fragment, &url_fragment_with_pnacl);
- }
- base::FilePath::StringType url_fragment_with_both = url_fragment_with_pnacl;
- if (IsPnaclDisabled()) {
- AddPnaclDisabledParm(url_fragment_with_pnacl, &url_fragment_with_both);
+ base::FilePath::StringType url_fragment_with_parm = url_fragment;
+ if (IsPnacl()) {
+ AddPnaclParm(url_fragment, &url_fragment_with_parm);
}
- bool ok = RunJavascriptTest(TestURL(url_fragment_with_both), &handler);
+ bool ok = RunJavascriptTest(TestURL(url_fragment_with_parm), &handler);
ASSERT_TRUE(ok) << handler.error_message();
ASSERT_TRUE(handler.test_passed()) << "Test failed.";
}
@@ -299,25 +278,13 @@ base::FilePath::StringType NaClBrowserTestPnacl::Variant() {
return FILE_PATH_LITERAL("pnacl");
}
-bool NaClBrowserTestPnacl::IsAPnaclTest() {
- return true;
-}
-
-base::FilePath::StringType NaClBrowserTestPnaclDisabled::Variant() {
- return FILE_PATH_LITERAL("pnacl");
-}
-
-bool NaClBrowserTestPnaclDisabled::IsAPnaclTest() {
- return true;
-}
-
-bool NaClBrowserTestPnaclDisabled::IsPnaclDisabled() {
+bool NaClBrowserTestPnacl::IsPnacl() {
return true;
}
-void NaClBrowserTestPnaclDisabled::SetUpCommandLine(CommandLine* command_line) {
+void NaClBrowserTestPnacl::SetUpCommandLine(CommandLine* command_line) {
NaClBrowserTestBase::SetUpCommandLine(command_line);
- command_line->AppendSwitch(switches::kDisablePnacl);
+ command_line->AppendSwitch(switches::kEnablePnacl);
}
NaClBrowserTestPnaclWithOldCache::NaClBrowserTestPnaclWithOldCache() {
« no previous file with comments | « chrome/test/nacl/nacl_browsertest_util.h ('k') | chrome/test/ppapi/ppapi_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698