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

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

Issue 12193015: PPAPI/NaCl: Make related tests run in 1 fixture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pre-review cleanup Created 7 years, 10 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
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/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); 315 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
316 EXPECT_TRUE(file_util::PathExists(plugin_lib)); 316 EXPECT_TRUE(file_util::PathExists(plugin_lib));
317 317
318 // Enable running NaCl outside of the store. 318 // Enable running NaCl outside of the store.
319 command_line->AppendSwitch(switches::kEnableNaCl); 319 command_line->AppendSwitch(switches::kEnableNaCl);
320 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); 320 command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1");
321 } 321 }
322 322
323 // Append the correct mode and testcase string 323 // Append the correct mode and testcase string
324 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base, 324 std::string PPAPINaClNewlibTest::BuildQuery(const std::string& base,
325 const std::string& test_case) { 325 const std::string& test_case) {
326 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 326 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
327 test_case.c_str()); 327 test_case.c_str());
328 } 328 }
329 329
330 // Append the correct mode and testcase string 330 // Append the correct mode and testcase string
331 std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base, 331 std::string PPAPINaClGLibcTest::BuildQuery(const std::string& base,
332 const std::string& test_case) { 332 const std::string& test_case) {
333 return StringPrintf("%smode=nacl_glibc&testcase=%s", base.c_str(), 333 return StringPrintf("%smode=nacl_glibc&testcase=%s", base.c_str(),
334 test_case.c_str()); 334 test_case.c_str());
335 } 335 }
336 336
337 void PPAPINaClTestDisallowedSockets::SetUpCommandLine( 337 void PPAPINaClTestDisallowedSockets::SetUpCommandLine(
338 CommandLine* command_line) { 338 CommandLine* command_line) {
339 PPAPITestBase::SetUpCommandLine(command_line); 339 PPAPITestBase::SetUpCommandLine(command_line);
340 340
341 FilePath plugin_lib; 341 FilePath plugin_lib;
342 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); 342 EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib));
343 EXPECT_TRUE(file_util::PathExists(plugin_lib)); 343 EXPECT_TRUE(file_util::PathExists(plugin_lib));
344 344
345 // Enable running NaCl outside of the store. 345 // Enable running NaCl outside of the store.
346 command_line->AppendSwitch(switches::kEnableNaCl); 346 command_line->AppendSwitch(switches::kEnableNaCl);
347 } 347 }
348 348
349 // Append the correct mode and testcase string 349 // Append the correct mode and testcase string
350 std::string PPAPINaClTestDisallowedSockets::BuildQuery( 350 std::string PPAPINaClTestDisallowedSockets::BuildQuery(
351 const std::string& base, 351 const std::string& base,
352 const std::string& test_case) { 352 const std::string& test_case) {
353 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), 353 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(),
354 test_case.c_str()); 354 test_case.c_str());
355 } 355 }
356 356
357 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() { 357 void PPAPIBrokerInfoBarTest::SetUpOnMainThread() {
358 // The default content setting for the PPAPI broker is ASK. We purposefully 358 // The default content setting for the PPAPI broker is ASK. We purposefully
359 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way. 359 // don't call PPAPITestBase::SetUpOnMainThread() to keep it that way.
360 } 360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698