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

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

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 d8993bf67a525363583129e9237774101bf5e051..3af91c647208ddcc1db66a5fea34acc963b17b19 100644
--- a/mojo/public/cpp/bindings/tests/validation_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/validation_unittest.cc
@@ -176,7 +176,8 @@ void RunValidationTests(const std::string& prefix,
base::RunLoop run_loop;
mojo::internal::ValidationErrorObserverForTesting observer(
run_loop.QuitClosure());
- ignore_result(test_message_receiver->Accept(&message));
+ Error error;
+ ignore_result(test_message_receiver->Accept(&message, &error));
if (expected != "PASS") // Observer only gets called on errors.
run_loop.Run();
if (observer.last_error() == mojo::internal::VALIDATION_ERROR_NONE)
@@ -190,7 +191,7 @@ void RunValidationTests(const std::string& prefix,
class DummyMessageReceiver : public MessageReceiver {
public:
- bool Accept(Message* message) override {
+ bool Accept(Message* message, Error* error) override {
return true; // Any message is OK.
}
};
@@ -245,8 +246,8 @@ class ValidationIntegrationTest : public ValidationTest {
}
~TestMessageReceiver() override {}
- bool Accept(Message* message) override {
- return connector_.Accept(message);
+ bool Accept(Message* message, Error* error) override {
+ return connector_.Accept(message, error);
}
public:

Powered by Google App Engine
This is Rietveld 408576698