OLD | NEW |
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 "base/test/opaque_ref_counted.h" | 5 #include "base/test/opaque_ref_counted.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe() { | 47 scoped_refptr<OpaqueRefCountedThreadSafe> MakeOpaqueRefCountedThreadSafe() { |
48 return new OpaqueRefCountedThreadSafe(); | 48 return new OpaqueRefCountedThreadSafe(); |
49 } | 49 } |
50 | 50 |
51 void TestOpaqueRefCountedThreadSafe( | 51 void TestOpaqueRefCountedThreadSafe( |
52 scoped_refptr<OpaqueRefCountedThreadSafe> p) { | 52 scoped_refptr<OpaqueRefCountedThreadSafe> p) { |
53 EXPECT_EQ(42, p->Return42()); | 53 EXPECT_EQ(42, p->Return42()); |
54 } | 54 } |
55 | 55 |
56 } // namespace base | 56 } // namespace base |
57 | |
58 template class scoped_refptr<base::OpaqueRefCounted>; | |
59 template class scoped_refptr<base::OpaqueRefCountedThreadSafe>; | |
OLD | NEW |