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

Unified Diff: chrome/test/ppapi/ppapi_test.cc

Issue 209183003: Fix "unreachable code" warnings (MSVC warning 4702) in a PPAPI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ppapi/ppapi_test.cc
===================================================================
--- chrome/test/ppapi/ppapi_test.cc (revision 258717)
+++ chrome/test/ppapi/ppapi_test.cc (working copy)
@@ -31,14 +31,6 @@
using content::DomOperationNotificationDetails;
using content::RenderViewHost;
-#if defined(DISABLE_NACL)
-#define RETURN_IF_NO_NACL() do { \
- LOG(WARNING) << "This test always passes with disable_nacl=1."; \
- return; } while (0)
-#else
-#define RETURN_IF_NO_NACL() do { } while (0)
-#endif
-
namespace {
// Platform-specific filename relative to the chrome executable.
@@ -357,7 +349,7 @@
}
void PPAPINaClTest::SetUpCommandLine(base::CommandLine* command_line) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::SetUpCommandLine(command_line);
// Enable running (non-portable) NaCl outside of the Chrome web store.
@@ -365,6 +357,7 @@
command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1");
command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
command_line->AppendSwitch(switches::kUseFakeUIForMediaStream);
+#endif
}
void PPAPINaClTest::SetUpOnMainThread() {
@@ -374,40 +367,47 @@
}
void PPAPINaClTest::RunTest(const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTest(test_case);
+#endif
}
void PPAPINaClTest::RunTestAndReload(const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestAndReload(test_case);
+#endif
}
void PPAPINaClTest::RunTestViaHTTP(const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestViaHTTP(test_case);
+#endif
}
void PPAPINaClTest::RunTestWithSSLServer(const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestWithSSLServer(test_case);
+#endif
}
void PPAPINaClTest::RunTestWithWebSocketServer(const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestWithWebSocketServer(test_case);
+#endif
}
void PPAPINaClTest::RunTestIfAudioOutputAvailable(
const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestIfAudioOutputAvailable(test_case);
+#endif
}
void PPAPINaClTest::RunTestViaHTTPIfAudioOutputAvailable(
const std::string& test_case) {
- RETURN_IF_NO_NACL();
+#if !defined(DISABLE_NACL)
PPAPITestBase::RunTestViaHTTPIfAudioOutputAvailable(test_case);
+#endif
}
// Append the correct mode and testcase string
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698