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

Unified Diff: mojo/embedder/simple_platform_shared_buffer_unittest.cc

Issue 502573006: Remove implicit conversions from scoped_refptr to T* in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/embedder/simple_platform_shared_buffer_unittest.cc
diff --git a/mojo/embedder/simple_platform_shared_buffer_unittest.cc b/mojo/embedder/simple_platform_shared_buffer_unittest.cc
index a3a7c6e623a952b08e60e5eab7f9d247bf814933..50287f81ecbd9cf60a9fa9ff153a721cc8741936 100644
--- a/mojo/embedder/simple_platform_shared_buffer_unittest.cc
+++ b/mojo/embedder/simple_platform_shared_buffer_unittest.cc
@@ -24,7 +24,7 @@ TEST(SimplePlatformSharedBufferTest, Basic) {
// Make some memory.
scoped_refptr<SimplePlatformSharedBuffer> buffer(
SimplePlatformSharedBuffer::Create(kNumBytes));
- ASSERT_TRUE(buffer);
+ ASSERT_TRUE(buffer.get());
// Map it all, scribble some stuff, and then unmap it.
{
@@ -100,7 +100,7 @@ TEST(SimplePlatformSharedBufferTest, Basic) {
TEST(SimplePlatformSharedBufferTest, InvalidMappings) {
scoped_refptr<SimplePlatformSharedBuffer> buffer(
SimplePlatformSharedBuffer::Create(100));
- ASSERT_TRUE(buffer);
+ ASSERT_TRUE(buffer.get());
// Zero length not allowed.
EXPECT_FALSE(buffer->Map(0, 0));
@@ -133,7 +133,7 @@ TEST(SimplePlatformSharedBufferTest, TooBig) {
SimplePlatformSharedBuffer::Create(kMaxSizeT));
// But, assuming |sizeof(size_t) == sizeof(void*)|, mapping all of it should
// always fail.
- if (buffer)
+ if (buffer.get())
EXPECT_FALSE(buffer->Map(0, kMaxSizeT));
}

Powered by Google App Engine
This is Rietveld 408576698