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

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: review feedback 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 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 }; 260 };
261 261
262 class IntegrationTestInterface1Impl 262 class IntegrationTestInterface1Impl
263 : public InterfaceImpl<IntegrationTestInterface1> { 263 : public InterfaceImpl<IntegrationTestInterface1> {
264 public: 264 public:
265 virtual ~IntegrationTestInterface1Impl() { 265 virtual ~IntegrationTestInterface1Impl() {
266 } 266 }
267 267
268 virtual void Method0(BasicStructPtr param0) MOJO_OVERRIDE { 268 virtual void Method0(BasicStructPtr param0) MOJO_OVERRIDE {
269 } 269 }
270
271 virtual void OnConnectionError() MOJO_OVERRIDE {
272 delete this;
273 }
274 }; 270 };
275 271
276 TEST(ValidationTest, InputParser) { 272 TEST(ValidationTest, InputParser) {
277 { 273 {
278 // The parser, as well as Append() defined above, assumes that this code is 274 // The parser, as well as Append() defined above, assumes that this code is
279 // running on a little-endian platform. Test whether that is true. 275 // running on a little-endian platform. Test whether that is true.
280 uint16_t x = 1; 276 uint16_t x = 1;
281 ASSERT_EQ(1, *(reinterpret_cast<char*>(&x))); 277 ASSERT_EQ(1, *(reinterpret_cast<char*>(&x)));
282 } 278 }
283 { 279 {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 IntegrationTestInterface1Impl* interface1_impl = 410 IntegrationTestInterface1Impl* interface1_impl =
415 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); 411 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass());
416 interface1_impl->internal_state()->router()->EnableTestingMode(); 412 interface1_impl->internal_state()->router()->EnableTestingMode();
417 413
418 RunValidationTests("integration_", test_message_receiver()); 414 RunValidationTests("integration_", test_message_receiver());
419 } 415 }
420 416
421 } // namespace 417 } // namespace
422 } // namespace test 418 } // namespace test
423 } // namespace mojo 419 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698