Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: chrome/test/ppapi/ppapi_test.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/ppapi/ppapi_test.h ('k') | chrome/test/pyautolib/pyautolib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 void OutOfProcessPPAPIPrivateTest::SetUpCommandLine(CommandLine* command_line) { 352 void OutOfProcessPPAPIPrivateTest::SetUpCommandLine(CommandLine* command_line) {
353 OutOfProcessPPAPITest::SetUpCommandLine(command_line); 353 OutOfProcessPPAPITest::SetUpCommandLine(command_line);
354 AddPrivateSwitches(command_line); 354 AddPrivateSwitches(command_line);
355 } 355 }
356 356
357 void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { 357 void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) {
358 RETURN_IF_NO_NACL(); 358 RETURN_IF_NO_NACL();
359 PPAPITestBase::SetUpCommandLine(command_line); 359 PPAPITestBase::SetUpCommandLine(command_line);
360 360
361 base::FilePath plugin_lib;
362 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
363 EXPECT_TRUE(base::PathExists(plugin_lib));
364
365 // Enable running (non-portable) NaCl outside of the Chrome web store. 361 // Enable running (non-portable) NaCl outside of the Chrome web store.
366 command_line->AppendSwitch(switches::kEnableNaCl); 362 command_line->AppendSwitch(switches::kEnableNaCl);
367 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); 363 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1");
368 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 364 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
369 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream); 365 command_line->AppendSwitch(switches::kUseFakeUIForMediaStream);
370 } 366 }
371 367
368 void PPAPINaClTest::SetUpOnMainThread() {
369 base::FilePath plugin_lib;
370 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
371 EXPECT_TRUE(base::PathExists(plugin_lib));
372 }
373
372 void PPAPINaClTest::RunTest(const std::string& test_case) { 374 void PPAPINaClTest::RunTest(const std::string& test_case) {
373 RETURN_IF_NO_NACL(); 375 RETURN_IF_NO_NACL();
374 PPAPITestBase::RunTest(test_case); 376 PPAPITestBase::RunTest(test_case);
375 } 377 }
376 378
377 void PPAPINaClTest::RunTestAndReload(const std::string& test_case) { 379 void PPAPINaClTest::RunTestAndReload(const std::string& test_case) {
378 RETURN_IF_NO_NACL(); 380 RETURN_IF_NO_NACL();
379 PPAPITestBase::RunTestAndReload(test_case); 381 PPAPITestBase::RunTestAndReload(test_case);
380 } 382 }
381 383
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 441
440 void PPAPIPrivateNaClPNaClTest::SetUpCommandLine(CommandLine* command_line) { 442 void PPAPIPrivateNaClPNaClTest::SetUpCommandLine(CommandLine* command_line) {
441 PPAPINaClPNaClTest::SetUpCommandLine(command_line); 443 PPAPINaClPNaClTest::SetUpCommandLine(command_line);
442 AddPrivateSwitches(command_line); 444 AddPrivateSwitches(command_line);
443 } 445 }
444 446
445 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( 447 void PPAPINaClTestDisallowedSockets::SetUpCommandLine(
446 CommandLine* command_line) { 448 CommandLine* command_line) {
447 PPAPITestBase::SetUpCommandLine(command_line); 449 PPAPITestBase::SetUpCommandLine(command_line);
448 450
449 base::FilePath plugin_lib;
450 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
451 EXPECT_TRUE(base::PathExists(plugin_lib));
452
453 // Enable running (non-portable) NaCl outside of the Chrome web store. 451 // Enable running (non-portable) NaCl outside of the Chrome web store.
454 command_line->AppendSwitch(switches::kEnableNaCl); 452 command_line->AppendSwitch(switches::kEnableNaCl);
455 } 453 }
456 454
457 // Append the correct mode and testcase string 455 // Append the correct mode and testcase string
458 std::string PPAPINaClTestDisallowedSockets::BuildQuery( 456 std::string PPAPINaClTestDisallowedSockets::BuildQuery(
459 const std::string& base, 457 const std::string& base,
460 const std::string& test_case) { 458 const std::string& test_case) {
461 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 459 return base::StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
462 test_case.c_str()); 460 test_case.c_str());
463 } 461 }
464 462
465 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { 463 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
466 // The default content setting for the PPAPI broker is ASK. We purposefully 464 // The default content setting for the PPAPI broker is ASK. We purposefully
467 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. 465 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
466
467 base::FilePath plugin_lib;
468 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
469 EXPECT_TRUE(base::PathExists(plugin_lib));
468 } 470 }
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_test.h ('k') | chrome/test/pyautolib/pyautolib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698