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

Side by Side Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 }; 268 };
269 269
270 class IntegrationTestInterface1Impl 270 class IntegrationTestInterface1Impl
271 : public InterfaceImpl<IntegrationTestInterface1> { 271 : public InterfaceImpl<IntegrationTestInterface1> {
272 public: 272 public:
273 virtual ~IntegrationTestInterface1Impl() { 273 virtual ~IntegrationTestInterface1Impl() {
274 } 274 }
275 275
276 virtual void Method0(BasicStructPtr param0) MOJO_OVERRIDE { 276 virtual void Method0(BasicStructPtr param0) MOJO_OVERRIDE {
277 } 277 }
278
279 virtual void OnConnectionError() MOJO_OVERRIDE {
280 delete this;
281 }
282 }; 278 };
283 279
284 TEST_F(ValidationTest, InputParser) { 280 TEST_F(ValidationTest, InputParser) {
285 { 281 {
286 // The parser, as well as Append() defined above, assumes that this code is 282 // The parser, as well as Append() defined above, assumes that this code is
287 // running on a little-endian platform. Test whether that is true. 283 // running on a little-endian platform. Test whether that is true.
288 uint16_t x = 1; 284 uint16_t x = 1;
289 ASSERT_EQ(1, *(reinterpret_cast<char*>(&x))); 285 ASSERT_EQ(1, *(reinterpret_cast<char*>(&x)));
290 } 286 }
291 { 287 {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 IntegrationTestInterface1Impl* interface1_impl = 418 IntegrationTestInterface1Impl* interface1_impl =
423 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); 419 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass());
424 interface1_impl->internal_state()->router()->EnableTestingMode(); 420 interface1_impl->internal_state()->router()->EnableTestingMode();
425 421
426 RunValidationTests("integration_", test_message_receiver()); 422 RunValidationTests("integration_", test_message_receiver());
427 } 423 }
428 424
429 } // namespace 425 } // namespace
430 } // namespace test 426 } // namespace test
431 } // namespace mojo 427 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/request_response_unittest.cc ('k') | mojo/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698