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

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

Issue 383083002: Revert 282555 "Mojo: Add support for InterfacePtr as a struct me..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « no previous file | trunk/src/mojo/public/interfaces/bindings/tests/sample_factory.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | trunk/src/mojo/public/interfaces/bindings/tests/sample_factory.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698