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