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

Side by Side Diff: chrome/browser/chromeos/process_proxy/process_output_watcher_unittest.cc

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include <sys/wait.h> 11 #include <sys/wait.h>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/eintr_wrapper.h"
15 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/posix/eintr_wrapper.h"
16 #include "base/synchronization/waitable_event.h" 16 #include "base/synchronization/waitable_event.h"
17 #include "base/threading/thread.h" 17 #include "base/threading/thread.h"
18 #include "chrome/browser/chromeos/process_proxy/process_output_watcher.h" 18 #include "chrome/browser/chromeos/process_proxy/process_output_watcher.h"
19 19
20 struct TestCase { 20 struct TestCase {
21 std::string str; 21 std::string str;
22 bool should_send_terminating_null; 22 bool should_send_terminating_null;
23 23
24 TestCase(const std::string& expected_string, 24 TestCase(const std::string& expected_string,
25 bool send_terminating_null) 25 bool send_terminating_null)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 TEST_F(ProcessOutputWatcherTest, SendNull) { 158 TEST_F(ProcessOutputWatcherTest, SendNull) {
159 std::vector<TestCase> test_cases; 159 std::vector<TestCase> test_cases;
160 // This will send '\0' to output wathcer. 160 // This will send '\0' to output wathcer.
161 test_cases.push_back(TestCase("", true)); 161 test_cases.push_back(TestCase("", true));
162 // Let's verify that next input also gets detected (i.e. output watcher does 162 // Let's verify that next input also gets detected (i.e. output watcher does
163 // not exit after seeing '\0' from previous test case). 163 // not exit after seeing '\0' from previous test case).
164 test_cases.push_back(TestCase("a", true)); 164 test_cases.push_back(TestCase("a", true));
165 165
166 RunTest(test_cases); 166 RunTest(test_cases);
167 }; 167 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698