Chromium Code Reviews| Index: chrome/test/ui/ppapi_uitest.cc |
| diff --git a/chrome/test/ui/ppapi_uitest.cc b/chrome/test/ui/ppapi_uitest.cc |
| index d52d9d5176913a03a1a44ca7df0a0e0016b5c0c1..5bef0d64744cde258b50e9de3b0f42089acc5245 100644 |
| --- a/chrome/test/ui/ppapi_uitest.cc |
| +++ b/chrome/test/ui/ppapi_uitest.cc |
| @@ -332,10 +332,10 @@ void OutOfProcessPPAPITest::SetUpCommandLine(CommandLine* command_line) { |
| command_line->AppendSwitch(switches::kPpapiOutOfProcess); |
| } |
| -PPAPINaClTest::PPAPINaClTest() { |
| +PPAPINaClNewlibTest::PPAPINaClNewlibTest() { |
| } |
| -void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { |
| +void PPAPINaClNewlibTest::SetUpCommandLine(CommandLine* command_line) { |
| PPAPITestBase::SetUpCommandLine(command_line); |
| FilePath plugin_lib; |
| @@ -348,9 +348,31 @@ void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { |
| } |
| // Append the correct mode and testcase string |
| -std::string PPAPINaClTest::BuildQuery(const std::string& base, |
| +std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, |
| const std::string& test_case) { |
| - return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| + return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| + test_case.c_str()); |
| +} |
| + |
| +PPAPINaClGLibcTest::PPAPINaClGLibcTest() { |
| +} |
| + |
| +void PPAPINaClGLibcTest::SetUpCommandLine(CommandLine* command_line) { |
| + PPAPITestBase::SetUpCommandLine(command_line); |
| + |
| + FilePath plugin_lib; |
| + EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| + EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| + |
| + // Enable running NaCl outside of the store. |
| + command_line->AppendSwitch(switches::kEnableNaCl); |
| + command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| +} |
|
dmichael (off chromium)
2012/05/22 00:04:43
Would it make sense to keep PPAPINaClTest with Set
Brad Chen
2012/05/22 18:35:00
Done.
|
| + |
| +// Append the correct mode and testcase string |
| +std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base, |
| + const std::string& test_case) { |
| + return StringPrintf("%smode=nacl_glibc&testcase=%s", base.c_str(), |
| test_case.c_str()); |
| } |
| @@ -373,7 +395,7 @@ void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
| std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| const std::string& base, |
| const std::string& test_case) { |
| - return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| + return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| test_case.c_str()); |
| } |
| @@ -440,7 +462,10 @@ std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| // NaCl based PPAPI tests |
| #define TEST_PPAPI_NACL_VIA_HTTP(test_name) \ |
| - IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \ |
| + RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| + } \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \ |
| RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| } |
| @@ -452,19 +477,28 @@ std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| // NaCl based PPAPI tests with SSL server |
| #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \ |
| - IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \ |
| + RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \ |
| + } \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \ |
| RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \ |
| } |
| // NaCl based PPAPI tests with WebSocket server |
| #define TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(test_name) \ |
| - IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \ |
| + RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
| + } \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \ |
| RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
| } |
| // NaCl based PPAPI tests requiring an Audio device. |
| #define TEST_PPAPI_NACL_VIA_HTTP_WITH_AUDIO_OUTPUT(test_name) \ |
| - IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \ |
| + RunTestViaHTTPIfAudioOutputAvailable(STRIP_PREFIXES(test_name)); \ |
| + } \ |
| + IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \ |
| RunTestViaHTTPIfAudioOutputAvailable(STRIP_PREFIXES(test_name)); \ |
| } |
| #endif |