| 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/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 // Enable running (non-portable) NaCl outside of the Chrome web store. | 336 // Enable running (non-portable) NaCl outside of the Chrome web store. |
| 337 command_line->AppendSwitch(switches::kEnableNaCl); | 337 command_line->AppendSwitch(switches::kEnableNaCl); |
| 338 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); | 338 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| 339 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 339 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
| 340 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); | 340 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); |
| 341 #endif | 341 #endif |
| 342 } | 342 } |
| 343 | 343 |
| 344 void PPAPINaClTest::SetUpOnMainThread() { | 344 void PPAPINaClTest::SetUpOnMainThread() { |
| 345 base::FilePath plugin_lib; | |
| 346 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | |
| 347 EXPECT_TRUE(base::PathExists(plugin_lib)); | |
| 348 } | 345 } |
| 349 | 346 |
| 350 void PPAPINaClTest::RunTest(const std::string& test_case) { | 347 void PPAPINaClTest::RunTest(const std::string& test_case) { |
| 351 #if !defined(DISABLE_NACL) | 348 #if !defined(DISABLE_NACL) |
| 352 PPAPITestBase::RunTest(test_case); | 349 PPAPITestBase::RunTest(test_case); |
| 353 #endif | 350 #endif |
| 354 } | 351 } |
| 355 | 352 |
| 356 void PPAPINaClTest::RunTestViaHTTP(const std::string& test_case) { | 353 void PPAPINaClTest::RunTestViaHTTP(const std::string& test_case) { |
| 357 #if !defined(DISABLE_NACL) | 354 #if !defined(DISABLE_NACL) |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 } | 459 } |
| 463 | 460 |
| 464 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { | 461 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { |
| 465 // The default content setting for the PPAPI broker is ASK. We purposefully | 462 // The default content setting for the PPAPI broker is ASK. We purposefully |
| 466 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. | 463 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. |
| 467 | 464 |
| 468 base::FilePath plugin_lib; | 465 base::FilePath plugin_lib; |
| 469 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); | 466 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 470 EXPECT_TRUE(base::PathExists(plugin_lib)); | 467 EXPECT_TRUE(base::PathExists(plugin_lib)); |
| 471 } | 468 } |
| OLD | NEW |