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 command_line->AppendSwitch(switches::kDisableNamespaceSandbox); |
447 #endif | 449 #endif |
448 } | 450 } |
449 | 451 |
450 void PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine( | 452 void PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine( |
451 base::CommandLine* command_line) { | 453 base::CommandLine* command_line) { |
452 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); | 454 PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line); |
453 AddPrivateSwitches(command_line); | 455 AddPrivateSwitches(command_line); |
454 } | 456 } |
455 | 457 |
456 void PPAPIPrivateNaClPNaClTransitionalNonSfiTest::SetUpCommandLine( | 458 void PPAPIPrivateNaClPNaClTransitionalNonSfiTest::SetUpCommandLine( |
457 base::CommandLine* command_line) { | 459 base::CommandLine* command_line) { |
458 PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine(command_line); | 460 PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine(command_line); |
459 #if !defined(DISABLE_NACL) | 461 #if !defined(DISABLE_NACL) |
460 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); | 462 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); |
| 463 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported. |
| 464 command_line->AppendSwitch(switches::kDisableNamespaceSandbox); |
461 #endif | 465 #endif |
462 } | 466 } |
463 | 467 |
464 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( | 468 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
465 base::CommandLine* command_line) { | 469 base::CommandLine* command_line) { |
466 PPAPITestBase::SetUpCommandLine(command_line); | 470 PPAPITestBase::SetUpCommandLine(command_line); |
467 | 471 |
468 // Enable running (non-portable) NaCl outside of the Chrome web store. | 472 // Enable running (non-portable) NaCl outside of the Chrome web store. |
469 command_line->AppendSwitch(switches::kEnableNaCl); | 473 command_line->AppendSwitch(switches::kEnableNaCl); |
470 } | 474 } |
471 | 475 |
472 // Append the correct mode and testcase string | 476 // Append the correct mode and testcase string |
473 std::string PPAPINaClTestDisallowedSockets::BuildQuery( | 477 std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
474 const std::string& base, | 478 const std::string& base, |
475 const std::string& test_case) { | 479 const std::string& test_case) { |
476 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 480 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
477 test_case.c_str()); | 481 test_case.c_str()); |
478 } | 482 } |
479 | 483 |
480 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 484 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
481 // The default content setting for the PPAPI broker is ASK. We purposefully | 485 // The default content setting for the PPAPI broker is ASK. We purposefully |
482 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 486 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
483 } | 487 } |
OLD | NEW |