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

Side by Side Diff: content/browser/file_descriptor_info_impl_unittest.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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
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 "content/browser/file_descriptor_info_impl.h" 5 #include "content/browser/file_descriptor_info_impl.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/basictypes.h"
12 #include "base/posix/eintr_wrapper.h" 11 #include "base/posix/eintr_wrapper.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 namespace { 14 namespace {
16 15
17 // Get a safe file descriptor for test purposes. 16 // Get a safe file descriptor for test purposes.
18 // TODO(morrita) Merge with things in file_descriptor_set_posix_unittest.cc 17 // TODO(morrita) Merge with things in file_descriptor_set_posix_unittest.cc
19 int GetSafeFd() { 18 int GetSafeFd() {
20 return open("/dev/null", O_RDONLY); 19 return open("/dev/null", O_RDONLY);
21 } 20 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 target->Transfer(testingId1, base::ScopedFD(GetSafeFd())); 77 target->Transfer(testingId1, base::ScopedFD(GetSafeFd()));
79 target->Transfer(testingId2, base::ScopedFD(GetSafeFd())); 78 target->Transfer(testingId2, base::ScopedFD(GetSafeFd()));
80 79
81 base::FileHandleMappingVector mapping = 80 base::FileHandleMappingVector mapping =
82 target->GetMappingWithIDAdjustment(100); 81 target->GetMappingWithIDAdjustment(100);
83 ASSERT_EQ(mapping[0].second, 142); 82 ASSERT_EQ(mapping[0].second, 142);
84 ASSERT_EQ(mapping[1].second, 143); 83 ASSERT_EQ(mapping[1].second, 143);
85 } 84 }
86 85
87 } // namespace content 86 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/file_descriptor_info_impl.h ('k') | content/browser/fileapi/blob_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698