| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); | 331 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); |
| 332 } | 332 } |
| 333 | 333 |
| 334 void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { | 334 void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { |
| 335 PPAPITestBase::SetUpCommandLine(command_line); | 335 PPAPITestBase::SetUpCommandLine(command_line); |
| 336 | 336 |
| 337 base::FilePath plugin_lib; | 337 base::FilePath plugin_lib; |
| 338 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 338 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 339 EXPECT_TRUE(base::PathExists(plugin_lib)); | 339 EXPECT_TRUE(base::PathExists(plugin_lib)); |
| 340 | 340 |
| 341 // Enable running (non-portable) NaCl outside of the Chrome web store. | 341 // Enable running NaCl outside of the store. |
| 342 command_line->AppendSwitch(switches::kEnableNaCl); | 342 command_line->AppendSwitch(switches::kEnableNaCl); |
| 343 command_line->AppendSwitch(switches::kEnablePnacl); |
| 343 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); | 344 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| 344 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 345 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
| 345 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); | 346 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); |
| 346 } | 347 } |
| 347 | 348 |
| 348 // Append the correct mode and testcase string | 349 // Append the correct mode and testcase string |
| 349 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, | 350 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, |
| 350 const std::string& test_case) { | 351 const std::string& test_case) { |
| 351 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 352 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 352 test_case.c_str()); | 353 test_case.c_str()); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 367 } | 368 } |
| 368 | 369 |
| 369 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( | 370 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
| 370 CommandLine* command_line) { | 371 CommandLine* command_line) { |
| 371 PPAPITestBase::SetUpCommandLine(command_line); | 372 PPAPITestBase::SetUpCommandLine(command_line); |
| 372 | 373 |
| 373 base::FilePath plugin_lib; | 374 base::FilePath plugin_lib; |
| 374 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 375 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 375 EXPECT_TRUE(base::PathExists(plugin_lib)); | 376 EXPECT_TRUE(base::PathExists(plugin_lib)); |
| 376 | 377 |
| 377 // Enable running (non-portable) NaCl outside of the Chrome web store. | 378 // Enable running NaCl outside of the store. |
| 378 command_line->AppendSwitch(switches::kEnableNaCl); | 379 command_line->AppendSwitch(switches::kEnableNaCl); |
| 380 command_line->AppendSwitch(switches::kEnablePnacl); |
| 379 } | 381 } |
| 380 | 382 |
| 381 // Append the correct mode and testcase string | 383 // Append the correct mode and testcase string |
| 382 std::string PPAPINaClTestDisallowedSockets::BuildQuery( | 384 std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| 383 const std::string& base, | 385 const std::string& base, |
| 384 const std::string& test_case) { | 386 const std::string& test_case) { |
| 385 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 387 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 386 test_case.c_str()); | 388 test_case.c_str()); |
| 387 } | 389 } |
| 388 | 390 |
| 389 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 391 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
| 390 // The default content setting for the PPAPI broker is ASK. We purposefully | 392 // The default content setting for the PPAPI broker is ASK. We purposefully |
| 391 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 393 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
| 392 } | 394 } |
| OLD | NEW |