OLD | NEW |
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 // Test that InterfacePtr<X> applies the correct validators and they don't | 399 // Test that InterfacePtr<X> applies the correct validators and they don't |
400 // conflict with each other: | 400 // conflict with each other: |
401 // - MessageHeaderValidator | 401 // - MessageHeaderValidator |
402 // - X::Client::RequestValidator_ | 402 // - X::Client::RequestValidator_ |
403 // - X::ResponseValidator_ | 403 // - X::ResponseValidator_ |
404 | 404 |
405 IntegrationTestInterface1Client interface1_client; | 405 IntegrationTestInterface1Client interface1_client; |
406 IntegrationTestInterface2Ptr interface2_ptr = | 406 IntegrationTestInterface2Ptr interface2_ptr = |
407 MakeProxy<IntegrationTestInterface2>(testee_endpoint().Pass()); | 407 MakeProxy<IntegrationTestInterface2>(testee_endpoint().Pass()); |
408 interface2_ptr.set_client(&interface1_client); | 408 interface2_ptr.set_client(&interface1_client); |
409 interface2_ptr.internal_state()->router()->EnableTestingMode(); | 409 interface2_ptr.internal_state()->router_for_testing()->EnableTestingMode(); |
410 | 410 |
411 RunValidationTests("integration_", test_message_receiver()); | 411 RunValidationTests("integration_", test_message_receiver()); |
412 } | 412 } |
413 | 413 |
414 TEST_F(ValidationIntegrationTest, InterfaceImpl) { | 414 TEST_F(ValidationIntegrationTest, InterfaceImpl) { |
415 // Test that InterfaceImpl<X> applies the correct validators and they don't | 415 // Test that InterfaceImpl<X> applies the correct validators and they don't |
416 // conflict with each other: | 416 // conflict with each other: |
417 // - MessageHeaderValidator | 417 // - MessageHeaderValidator |
418 // - X::RequestValidator_ | 418 // - X::RequestValidator_ |
419 // - X::Client::ResponseValidator_ | 419 // - X::Client::ResponseValidator_ |
420 | 420 |
421 // |interface1_impl| will delete itself when the pipe is closed. | 421 // |interface1_impl| will delete itself when the pipe is closed. |
422 IntegrationTestInterface1Impl* interface1_impl = | 422 IntegrationTestInterface1Impl* interface1_impl = |
423 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); | 423 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); |
424 interface1_impl->internal_state()->router()->EnableTestingMode(); | 424 interface1_impl->internal_state()->router()->EnableTestingMode(); |
425 | 425 |
426 RunValidationTests("integration_", test_message_receiver()); | 426 RunValidationTests("integration_", test_message_receiver()); |
427 } | 427 } |
428 | 428 |
429 } // namespace | 429 } // namespace |
430 } // namespace test | 430 } // namespace test |
431 } // namespace mojo | 431 } // namespace mojo |
OLD | NEW |