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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 384 |
385 TEST_F(ValidationTest, Conformance) { | 385 TEST_F(ValidationTest, Conformance) { |
386 DummyMessageReceiver dummy_receiver; | 386 DummyMessageReceiver dummy_receiver; |
387 mojo::internal::FilterChain validators(&dummy_receiver); | 387 mojo::internal::FilterChain validators(&dummy_receiver); |
388 validators.Append<mojo::internal::MessageHeaderValidator>(); | 388 validators.Append<mojo::internal::MessageHeaderValidator>(); |
389 validators.Append<ConformanceTestInterface::RequestValidator_>(); | 389 validators.Append<ConformanceTestInterface::RequestValidator_>(); |
390 | 390 |
391 RunValidationTests("conformance_", validators.GetHead()); | 391 RunValidationTests("conformance_", validators.GetHead()); |
392 } | 392 } |
393 | 393 |
| 394 TEST_F(ValidationTest, NotImplemented) { |
| 395 DummyMessageReceiver dummy_receiver; |
| 396 mojo::internal::FilterChain validators(&dummy_receiver); |
| 397 validators.Append<mojo::internal::MessageHeaderValidator>(); |
| 398 validators.Append<ConformanceTestInterface::RequestValidator_>(); |
| 399 |
| 400 RunValidationTests("not_implemented_", validators.GetHead()); |
| 401 } |
| 402 |
394 TEST_F(ValidationIntegrationTest, InterfacePtr) { | 403 TEST_F(ValidationIntegrationTest, InterfacePtr) { |
395 // Test that InterfacePtr<X> applies the correct validators and they don't | 404 // Test that InterfacePtr<X> applies the correct validators and they don't |
396 // conflict with each other: | 405 // conflict with each other: |
397 // - MessageHeaderValidator | 406 // - MessageHeaderValidator |
398 // - X::Client::RequestValidator_ | 407 // - X::Client::RequestValidator_ |
399 // - X::ResponseValidator_ | 408 // - X::ResponseValidator_ |
400 | 409 |
401 IntegrationTestInterface1Client interface1_client; | 410 IntegrationTestInterface1Client interface1_client; |
402 IntegrationTestInterface2Ptr interface2_ptr = | 411 IntegrationTestInterface2Ptr interface2_ptr = |
403 MakeProxy<IntegrationTestInterface2>(testee_endpoint().Pass()); | 412 MakeProxy<IntegrationTestInterface2>(testee_endpoint().Pass()); |
(...skipping 14 matching lines...) Expand all Loading... |
418 IntegrationTestInterface1Impl* interface1_impl = | 427 IntegrationTestInterface1Impl* interface1_impl = |
419 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); | 428 BindToPipe(new IntegrationTestInterface1Impl(), testee_endpoint().Pass()); |
420 interface1_impl->internal_state()->router()->EnableTestingMode(); | 429 interface1_impl->internal_state()->router()->EnableTestingMode(); |
421 | 430 |
422 RunValidationTests("integration_", test_message_receiver()); | 431 RunValidationTests("integration_", test_message_receiver()); |
423 } | 432 } |
424 | 433 |
425 } // namespace | 434 } // namespace |
426 } // namespace test | 435 } // namespace test |
427 } // namespace mojo | 436 } // namespace mojo |
OLD | NEW |