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

Unified Diff: mojo/public/js/new_bindings/validator.js

Issue 2891193002: Mojo JS bindings: switch all mojo/ layout tests to use the new mode. (Closed)
Patch Set: . Created 3 years, 7 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/js/new_bindings/validator.js
diff --git a/mojo/public/js/new_bindings/validator.js b/mojo/public/js/new_bindings/validator.js
index b43a65b4abfb3514893156aa6b4fe295da9d3b9c..577dcf003394d69d2d054655daacb30b61326646 100644
--- a/mojo/public/js/new_bindings/validator.js
+++ b/mojo/public/js/new_bindings/validator.js
@@ -34,26 +34,19 @@
function reportValidationError(error) {
if (gValidationErrorObserver) {
- gValidationErrorObserver.setLastError(error);
+ gValidationErrorObserver.lastError = error;
+ } else {
+ console.warn('Invalid message: ' + error);
}
}
var ValidationErrorObserverForTesting = (function() {
function Observer() {
this.lastError = validationError.NONE;
- this.callback = null;
}
- Observer.prototype.setLastError = function(error) {
- this.lastError = error;
- if (this.callback) {
- this.callback(error);
- }
- };
-
- Observer.prototype.reset = function(error) {
+ Observer.prototype.reset = function() {
this.lastError = validationError.NONE;
- this.callback = null;
};
return {
« no previous file with comments | « mojo/public/js/new_bindings/router.js ('k') | mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698