| 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 {
|
|
|