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

Unified Diff: mojo/public/cpp/bindings/tests/handle_passing_unittest.cc

Issue 405653003: mojo: Make InterfacePtr<> testable in if() statements without .get(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 5 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/public/cpp/bindings/tests/handle_passing_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
index ab2e47506cc4d7192398be09df6da1bca38022e7..d2e287f73dfc2df260cd02fd1688074cc4962ebe 100644
--- a/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc
@@ -94,7 +94,7 @@ class SampleFactoryImpl : public InterfaceImpl<sample::Factory> {
response->pipe = pipe0.Pass();
client()->DidStuff(response.Pass(), text1);
- if (request->obj.get())
+ if (request->obj)
request->obj->DoSomething();
}
@@ -335,14 +335,14 @@ TEST_F(HandlePassingTest, CreateNamedObject) {
BindToProxy(new SampleFactoryImpl(), &factory);
sample::NamedObjectPtr object1;
- EXPECT_FALSE(object1.get());
+ EXPECT_FALSE(object1);
InterfaceRequest<sample::NamedObject> object1_request = Get(&object1);
EXPECT_TRUE(object1_request.is_pending());
factory->CreateNamedObject(object1_request.Pass());
EXPECT_FALSE(object1_request.is_pending()); // We've passed the request.
- ASSERT_TRUE(object1.get());
+ ASSERT_TRUE(object1);
object1->SetName("object1");
sample::NamedObjectPtr object2;

Powered by Google App Engine
This is Rietveld 408576698