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

Side by Side Diff: chrome/test/nacl/nacl_browsertest_util.cc

Issue 888903004: Non-SFI mode:Suid sandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « no previous file | chrome/test/ppapi/ppapi_browsertest.cc » ('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/nacl/nacl_browsertest_util.h" 5 #include "chrome/test/nacl/nacl_browsertest_util.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void NaClBrowserTestNonSfiMode::SetUpCommandLine( 290 void NaClBrowserTestNonSfiMode::SetUpCommandLine(
291 base::CommandLine* command_line) { 291 base::CommandLine* command_line) {
292 NaClBrowserTestBase::SetUpCommandLine(command_line); 292 NaClBrowserTestBase::SetUpCommandLine(command_line);
293 command_line->AppendSwitch(switches::kEnableNaClNonSfiMode); 293 command_line->AppendSwitch(switches::kEnableNaClNonSfiMode);
294 } 294 }
295 295
296 void NaClBrowserTestTransitionalNonSfi::SetUpCommandLine( 296 void NaClBrowserTestTransitionalNonSfi::SetUpCommandLine(
297 base::CommandLine* command_line) { 297 base::CommandLine* command_line) {
298 NaClBrowserTestNonSfiMode::SetUpCommandLine(command_line); 298 NaClBrowserTestNonSfiMode::SetUpCommandLine(command_line);
299 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); 299 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi);
300 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported
301 // by nacl_helper_nonsfi. (cf. crbug.com/464663)
302 command_line->AppendSwitch(switches::kDisableNamespaceSandbox);
300 } 303 }
301 304
302 base::FilePath::StringType NaClBrowserTestStatic::Variant() { 305 base::FilePath::StringType NaClBrowserTestStatic::Variant() {
303 return FILE_PATH_LITERAL("static"); 306 return FILE_PATH_LITERAL("static");
304 } 307 }
305 308
306 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { 309 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) {
307 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); 310 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl"));
308 return true; 311 return true;
309 } 312 }
310 313
311 base::FilePath::StringType NaClBrowserTestPnaclNonSfi::Variant() { 314 base::FilePath::StringType NaClBrowserTestPnaclNonSfi::Variant() {
312 return FILE_PATH_LITERAL("nonsfi"); 315 return FILE_PATH_LITERAL("nonsfi");
313 } 316 }
314 317
315 void NaClBrowserTestPnaclNonSfi::SetUpCommandLine( 318 void NaClBrowserTestPnaclNonSfi::SetUpCommandLine(
316 base::CommandLine* command_line) { 319 base::CommandLine* command_line) {
317 NaClBrowserTestBase::SetUpCommandLine(command_line); 320 NaClBrowserTestBase::SetUpCommandLine(command_line);
318 command_line->AppendSwitch(switches::kEnableNaClNonSfiMode); 321 command_line->AppendSwitch(switches::kEnableNaClNonSfiMode);
319 } 322 }
320 323
321 void NaClBrowserTestPnaclTransitionalNonSfi::SetUpCommandLine( 324 void NaClBrowserTestPnaclTransitionalNonSfi::SetUpCommandLine(
322 base::CommandLine* command_line) { 325 base::CommandLine* command_line) {
323 NaClBrowserTestPnaclNonSfi::SetUpCommandLine(command_line); 326 NaClBrowserTestPnaclNonSfi::SetUpCommandLine(command_line);
324 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi); 327 command_line->AppendSwitch(switches::kUseNaClHelperNonSfi);
328 // TODO(hidehiko): Remove this flag, when namespace sandbox is supported
329 // by nacl_helper_nonsfi. (cf. crbug.com/464663)
330 command_line->AppendSwitch(switches::kDisableNamespaceSandbox);
325 } 331 }
326 332
327 void NaClBrowserTestNewlibExtension::SetUpCommandLine( 333 void NaClBrowserTestNewlibExtension::SetUpCommandLine(
328 base::CommandLine* command_line) { 334 base::CommandLine* command_line) {
329 NaClBrowserTestBase::SetUpCommandLine(command_line); 335 NaClBrowserTestBase::SetUpCommandLine(command_line);
330 base::FilePath src_root; 336 base::FilePath src_root;
331 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &src_root)); 337 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &src_root));
332 338
333 // Extension-based tests should specialize the GetDocumentRoot() / Variant() 339 // Extension-based tests should specialize the GetDocumentRoot() / Variant()
334 // to point at the isolated the test extension directory. 340 // to point at the isolated the test extension directory.
(...skipping 17 matching lines...) Expand all
352 // to point at the isolated the test extension directory. 358 // to point at the isolated the test extension directory.
353 // Otherwise, multiple NaCl extensions tests will end up sharing the 359 // Otherwise, multiple NaCl extensions tests will end up sharing the
354 // same directory when loading the extension files. 360 // same directory when loading the extension files.
355 base::FilePath document_root; 361 base::FilePath document_root;
356 ASSERT_TRUE(GetDocumentRoot(&document_root)); 362 ASSERT_TRUE(GetDocumentRoot(&document_root));
357 363
358 // Document root is relative to source root, and source root may not be CWD. 364 // Document root is relative to source root, and source root may not be CWD.
359 command_line->AppendSwitchPath(switches::kLoadExtension, 365 command_line->AppendSwitchPath(switches::kLoadExtension,
360 src_root.Append(document_root)); 366 src_root.Append(document_root));
361 } 367 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/ppapi/ppapi_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698