| 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/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 const std::string& test_case) { | 437 const std::string& test_case) { |
| 438 return base::StringPrintf("%smode=nacl_pnacl_nonsfi&testcase=%s", | 438 return base::StringPrintf("%smode=nacl_pnacl_nonsfi&testcase=%s", |
| 439 base.c_str(), test_case.c_str()); | 439 base.c_str(), test_case.c_str()); |
| 440 } | 440 } |
| 441 | 441 |
| 442 void PPAPINaClPNaClTransitionalNonSfiTest::SetUpCommandLine( | 442 void PPAPINaClPNaClTransitionalNonSfiTest::SetUpCommandLine( |
| 443 base::CommandLine* command_line) { | 443 base::CommandLine* command_line) { |
| 444 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); | 444 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); |
| 445 #if !defined(DISABLE_NACL) | 445 #if !defined(DISABLE_NACL) |
| 446 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); | 446 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); |
| 447 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported. |
| 448 // by nacl_helper_nonsfi. (cf. crbug.com/464663) |
| 449 command_line->AppendSwitch(switches::kDisableNamespaceSandbox); |
| 447 #endif | 450 #endif |
| 448 } | 451 } |
| 449 | 452 |
| 450 void PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine( | 453 void PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine( |
| 451 base::CommandLine* command_line) { | 454 base::CommandLine* command_line) { |
| 452 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); | 455 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); |
| 453 AddPrivateSwitches(command_line); | 456 AddPrivateSwitches(command_line); |
| 454 } | 457 } |
| 455 | 458 |
| 456 void PPAPIPrivateNaClPNaClTransitionalNonSfiTest::SetUpCommandLine( | 459 void PPAPIPrivateNaClPNaClTransitionalNonSfiTest::SetUpCommandLine( |
| 457 base::CommandLine* command_line) { | 460 base::CommandLine* command_line) { |
| 458 PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine(command_line); | 461 PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine(command_line); |
| 459 #if !defined(DISABLE_NACL) | 462 #if !defined(DISABLE_NACL) |
| 460 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); | 463 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); |
| 464 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported |
| 465 // by nacl_helper_nonsfi. (cf. crbug.com/464663) |
| 466 command_line->AppendSwitch(switches::kDisableNamespaceSandbox); |
| 461 #endif | 467 #endif |
| 462 } | 468 } |
| 463 | 469 |
| 464 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( | 470 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
| 465 base::CommandLine* command_line) { | 471 base::CommandLine* command_line) { |
| 466 PPAPITestBase::SetUpCommandLine(command_line); | 472 PPAPITestBase::SetUpCommandLine(command_line); |
| 467 | 473 |
| 468 // Enable running (non-portable) NaCl outside of the Chrome web store. | 474 // Enable running (non-portable) NaCl outside of the Chrome web store. |
| 469 command_line->AppendSwitch(switches::kEnableNaCl); | 475 command_line->AppendSwitch(switches::kEnableNaCl); |
| 470 } | 476 } |
| 471 | 477 |
| 472 // Append the correct mode and testcase string | 478 // Append the correct mode and testcase string |
| 473 std::string PPAPINaClTestDisallowedSockets::BuildQuery( | 479 std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| 474 const std::string& base, | 480 const std::string& base, |
| 475 const std::string& test_case) { | 481 const std::string& test_case) { |
| 476 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 482 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 477 test_case.c_str()); | 483 test_case.c_str()); |
| 478 } | 484 } |
| 479 | 485 |
| 480 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 486 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
| 481 // The default content setting for the PPAPI broker is ASK. We purposefully | 487 // The default content setting for the PPAPI broker is ASK. We purposefully |
| 482 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 488 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
| 483 } | 489 } |
| OLD | NEW |