Index: trunk/src/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc |
=================================================================== |
--- trunk/src/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc (revision 282559) |
+++ trunk/src/mojo/public/cpp/bindings/tests/handle_passing_unittest.cc (working copy) |
@@ -26,24 +26,6 @@ |
std::string* buf_; |
}; |
-class ImportedInterfaceImpl |
- : public InterfaceImpl<imported::ImportedInterface> { |
- public: |
- virtual void OnConnectionError() MOJO_OVERRIDE { |
- delete this; |
- } |
- |
- virtual void DoSomething() MOJO_OVERRIDE { |
- do_something_count_++; |
- } |
- |
- static int do_something_count() { return do_something_count_; } |
- |
- private: |
- static int do_something_count_; |
-}; |
-int ImportedInterfaceImpl::do_something_count_ = 0; |
- |
class SampleNamedObjectImpl : public InterfaceImpl<sample::NamedObject> { |
public: |
virtual void OnConnectionError() MOJO_OVERRIDE { |
@@ -93,9 +75,6 @@ |
response->x = 2; |
response->pipe = pipe0.Pass(); |
client()->DidStuff(response.Pass(), text1); |
- |
- if (request->obj.get()) |
- request->obj->DoSomething(); |
} |
virtual void DoStuff2(ScopedDataPipeConsumerHandle pipe) MOJO_OVERRIDE { |
@@ -215,22 +194,16 @@ |
MessagePipe pipe1; |
EXPECT_TRUE(WriteTextMessage(pipe1.handle1.get(), kText2)); |
- imported::ImportedInterfacePtr imported; |
- BindToProxy(new ImportedInterfaceImpl(), &imported); |
- |
sample::RequestPtr request(sample::Request::New()); |
request->x = 1; |
request->pipe = pipe1.handle0.Pass(); |
- request->obj = imported.Pass(); |
factory->DoStuff(request.Pass(), pipe0.handle0.Pass()); |
EXPECT_FALSE(factory_client.got_response()); |
- int count_before = ImportedInterfaceImpl::do_something_count(); |
PumpMessages(); |
EXPECT_TRUE(factory_client.got_response()); |
- EXPECT_EQ(1, ImportedInterfaceImpl::do_something_count() - count_before); |
} |
TEST_F(HandlePassingTest, PassInvalid) { |