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

Side by Side Diff: chrome/renderer/renderer_main_unittest.cc

Issue 5844001: seccomp: remove build-time flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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/common/chrome_switches.cc ('k') | chrome/test/nacl/nacl_test.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/test/multiprocess_test.h" 8 #include "base/test/multiprocess_test.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 fds_to_map.push_back(std::pair<int,int>(ipcfd, 3)); 66 fds_to_map.push_back(std::pair<int,int>(ipcfd, 3));
67 } 67 }
68 68
69 return MultiProcessTest::SpawnChild(procname, fds_to_map, false); 69 return MultiProcessTest::SpawnChild(procname, fds_to_map, false);
70 } 70 }
71 71
72 CommandLine RendererMainTest::MakeCmdLine(const std::string& procname, 72 CommandLine RendererMainTest::MakeCmdLine(const std::string& procname,
73 bool debug_on_start) { 73 bool debug_on_start) {
74 CommandLine command_line = 74 CommandLine command_line =
75 MultiProcessTest::MakeCmdLine(procname, debug_on_start); 75 MultiProcessTest::MakeCmdLine(procname, debug_on_start);
76 #if defined(USE_SECCOMP_SANDBOX) 76
77 // Turn off seccomp for this test. It's just a problem of refactoring, 77 // Force seccomp off for this test. It's just a problem of refactoring,
78 // not a bug. 78 // not a bug.
79 // http://code.google.com/p/chromium/issues/detail?id=59376 79 // http://code.google.com/p/chromium/issues/detail?id=59376
80 command_line.AppendSwitch(switches::kDisableSeccompSandbox); 80 command_line.AppendSwitch(switches::kDisableSeccompSandbox);
81 #endif 81
82 return command_line; 82 return command_line;
83 } 83 }
84 84
85 // Listener class that kills the message loop when it connects. 85 // Listener class that kills the message loop when it connects.
86 class SuicidalListener : public IPC::Channel::Listener { 86 class SuicidalListener : public IPC::Channel::Listener {
87 public: 87 public:
88 void OnChannelConnected(int32 peer_pid) { 88 void OnChannelConnected(int32 peer_pid) {
89 MessageLoop::current()->Quit(); 89 MessageLoop::current()->Quit();
90 } 90 }
91 91
(...skipping 24 matching lines...) Expand all
116 116
117 MessageLoop::current()->Run(); 117 MessageLoop::current()->Run();
118 118
119 // The renderer should exit when we close the channel. 119 // The renderer should exit when we close the channel.
120 control_channel.Close(); 120 control_channel.Close();
121 121
122 EXPECT_TRUE(base::WaitForSingleProcess(renderer_pid, 122 EXPECT_TRUE(base::WaitForSingleProcess(renderer_pid,
123 TestTimeouts::action_timeout_ms())); 123 TestTimeouts::action_timeout_ms()));
124 } 124 }
125 #endif // defined(OS_POSIX) 125 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/test/nacl/nacl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698