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

Unified Diff: mojo/public/cpp/bindings/tests/validation_unittest.cc

Issue 2276043002: Support custom message filtering on Mojo binding objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/tests/router_unittest.cc ('k') | mojo/public/interfaces/bindings/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/validation_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/validation_unittest.cc b/mojo/public/cpp/bindings/tests/validation_unittest.cc
index d2543836bf802868eb2328980fea7294b500e041..7b7dcbeee2fe835194379387a7784bfb02dfa185 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -16,8 +16,8 @@
#include "mojo/public/c/system/macros.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/connector.h"
+#include "mojo/public/cpp/bindings/filter_chain.h"
#include "mojo/public/cpp/bindings/interface_ptr.h"
-#include "mojo/public/cpp/bindings/lib/filter_chain.h"
#include "mojo/public/cpp/bindings/lib/router.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/message.h"
@@ -376,20 +376,20 @@ TEST_F(ValidationTest, InputParser) {
TEST_F(ValidationTest, Conformance) {
DummyMessageReceiver dummy_receiver;
- mojo::internal::FilterChain validators(&dummy_receiver);
+ mojo::FilterChain validators(&dummy_receiver);
validators.Append<mojo::MessageHeaderValidator>();
validators.Append<ConformanceTestInterface::RequestValidator_>();
- RunValidationTests("conformance_", validators.GetHead());
+ RunValidationTests("conformance_", &validators);
}
TEST_F(ValidationTest, AssociatedConformace) {
DummyMessageReceiver dummy_receiver;
- mojo::internal::FilterChain validators(&dummy_receiver);
+ mojo::FilterChain validators(&dummy_receiver);
validators.Append<mojo::MessageHeaderValidator>();
validators.Append<AssociatedConformanceTestInterface::RequestValidator_>();
- RunValidationTests("associated_conformance_", validators.GetHead());
+ RunValidationTests("associated_conformance_", &validators);
}
// This test is similar to Conformance test but its goal is specifically
@@ -397,31 +397,31 @@ TEST_F(ValidationTest, AssociatedConformace) {
// detection of off-by-one errors in method ordinals.
TEST_F(ValidationTest, BoundsCheck) {
DummyMessageReceiver dummy_receiver;
- mojo::internal::FilterChain validators(&dummy_receiver);
+ mojo::FilterChain validators(&dummy_receiver);
validators.Append<mojo::MessageHeaderValidator>();
validators.Append<BoundsCheckTestInterface::RequestValidator_>();
- RunValidationTests("boundscheck_", validators.GetHead());
+ RunValidationTests("boundscheck_", &validators);
}
// This test is similar to the Conformance test but for responses.
TEST_F(ValidationTest, ResponseConformance) {
DummyMessageReceiver dummy_receiver;
- mojo::internal::FilterChain validators(&dummy_receiver);
+ mojo::FilterChain validators(&dummy_receiver);
validators.Append<mojo::MessageHeaderValidator>();
validators.Append<ConformanceTestInterface::ResponseValidator_>();
- RunValidationTests("resp_conformance_", validators.GetHead());
+ RunValidationTests("resp_conformance_", &validators);
}
// This test is similar to the BoundsCheck test but for responses.
TEST_F(ValidationTest, ResponseBoundsCheck) {
DummyMessageReceiver dummy_receiver;
- mojo::internal::FilterChain validators(&dummy_receiver);
+ mojo::FilterChain validators(&dummy_receiver);
validators.Append<mojo::MessageHeaderValidator>();
validators.Append<BoundsCheckTestInterface::ResponseValidator_>();
- RunValidationTests("resp_boundscheck_", validators.GetHead());
+ RunValidationTests("resp_boundscheck_", &validators);
}
// Test that InterfacePtr<X> applies the correct validators and they don't
« no previous file with comments | « mojo/public/cpp/bindings/tests/router_unittest.cc ('k') | mojo/public/interfaces/bindings/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698