| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/ppapi/ppapi_test.h" | 5 #include "chrome/test/ppapi/ppapi_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 318 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 319 EXPECT_TRUE(file_util::PathExists(plugin_lib)); | 319 EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 320 | 320 |
| 321 // Enable running NaCl outside of the store. | 321 // Enable running NaCl outside of the store. |
| 322 command_line->AppendSwitch(switches::kEnableNaCl); | 322 command_line->AppendSwitch(switches::kEnableNaCl); |
| 323 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); | 323 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| 324 } | 324 } |
| 325 | 325 |
| 326 // Append the correct mode and testcase string | 326 // Append the correct mode and testcase string |
| 327 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, | 327 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, |
| 328 const std::string& test_case) { | 328 const std::string& test_case) { |
| 329 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 329 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 330 test_case.c_str()); | 330 test_case.c_str()); |
| 331 } | 331 } |
| 332 | 332 |
| 333 // Append the correct mode and testcase string | 333 // Append the correct mode and testcase string |
| 334 std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base, | 334 std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base, |
| 335 const std::string& test_case) { | 335 const std::string& test_case) { |
| 336 return StringPrintf("%smode=nacl_glibc&testcase=%s", base.c_str(), | 336 return StringPrintf("%smode=nacl_glibc&testcase=%s", base.c_str(), |
| 337 test_case.c_str()); | 337 test_case.c_str()); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( | 340 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
| 341 CommandLine* command_line) { | 341 CommandLine* command_line) { |
| 342 PPAPITestBase::SetUpCommandLine(command_line); | 342 PPAPITestBase::SetUpCommandLine(command_line); |
| 343 | 343 |
| 344 base::FilePath plugin_lib; | 344 base::FilePath plugin_lib; |
| 345 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 345 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 346 EXPECT_TRUE(file_util::PathExists(plugin_lib)); | 346 EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 347 | 347 |
| 348 // Enable running NaCl outside of the store. | 348 // Enable running NaCl outside of the store. |
| 349 command_line->AppendSwitch(switches::kEnableNaCl); | 349 command_line->AppendSwitch(switches::kEnableNaCl); |
| 350 } | 350 } |
| 351 | 351 |
| 352 // Append the correct mode and testcase string | 352 // Append the correct mode and testcase string |
| 353 std::string PPAPINaClTestDisallowedSockets::BuildQuery( | 353 std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| 354 const std::string& base, | 354 const std::string& base, |
| 355 const std::string& test_case) { | 355 const std::string& test_case) { |
| 356 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 356 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 357 test_case.c_str()); | 357 test_case.c_str()); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 360 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
| 361 // The default content setting for the PPAPI broker is ASK. We purposefully | 361 // The default content setting for the PPAPI broker is ASK. We purposefully |
| 362 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 362 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
| 363 } | 363 } |
| OLD | NEW |