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

Side by Side Diff: mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/edk/embedder/simple_platform_shared_buffer.h" 5 #include "mojo/edk/embedder/simple_platform_shared_buffer.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "mojo/public/cpp/system/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace edk { 15 namespace edk {
16 namespace { 16 namespace {
17 17
18 TEST(SimplePlatformSharedBufferTest, Basic) { 18 TEST(SimplePlatformSharedBufferTest, Basic) {
19 const size_t kNumInts = 100; 19 const size_t kNumInts = 100;
20 const size_t kNumBytes = kNumInts * sizeof(int); 20 const size_t kNumBytes = kNumInts * sizeof(int);
21 // A fudge so that we're not just writing zero bytes 75% of the time. 21 // A fudge so that we're not just writing zero bytes 75% of the time.
22 const int kFudge = 1234567890; 22 const int kFudge = 1234567890;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 EXPECT_EQ('x', static_cast<char*>(mapping2->GetBase())[0]); 179 EXPECT_EQ('x', static_cast<char*>(mapping2->GetBase())[0]);
180 180
181 static_cast<char*>(mapping2->GetBase())[1] = 'y'; 181 static_cast<char*>(mapping2->GetBase())[1] = 'y';
182 EXPECT_EQ('y', static_cast<char*>(mapping1->GetBase())[51]); 182 EXPECT_EQ('y', static_cast<char*>(mapping1->GetBase())[51]);
183 } 183 }
184 184
185 } // namespace 185 } // namespace
186 } // namespace edk 186 } // namespace edk
187 } // namespace mojo 187 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/simple_platform_shared_buffer.h ('k') | mojo/edk/embedder/simple_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698