| Index: mojo/public/js/tests/validation_unittest.js
|
| diff --git a/mojo/public/js/tests/validation_unittest.js b/mojo/public/js/tests/validation_unittest.js
|
| index 2a70248e662ef561f0fa900b4ac51c3c6ab8f6c3..1866b8e7a65dd4b45cd2fd0ac0d93e18baf308f2 100644
|
| --- a/mojo/public/js/tests/validation_unittest.js
|
| +++ b/mojo/public/js/tests/validation_unittest.js
|
| @@ -278,15 +278,10 @@ define([
|
| expect(testMessagePipe.result).toBe(core.RESULT_OK);
|
|
|
| endpoint.bind(testMessagePipe.handle1);
|
| - var testingController = endpoint.enableTestingMode();
|
| -
|
| - var validationError;
|
| - testingController.setInvalidIncomingMessageHandler(function(error) {
|
| - validationError = error;
|
| - });
|
| + var observer = validator.ValidationErrorObserverForTesting.getInstance();
|
| + observer.reset();
|
|
|
| for (var i = 0; i < testFiles.length; i++) {
|
| - validationError = noError;
|
| var testMessage = readTestMessage(testFiles[i]);
|
| var handles = new Array(testMessage.handleCount);
|
|
|
| @@ -297,8 +292,8 @@ define([
|
| core.WRITE_MESSAGE_FLAG_NONE);
|
| expect(writeMessageValue).toBe(core.RESULT_OK);
|
|
|
| - testingController.waitForNextMessage();
|
| - checkValidationResult(testFiles[i], validationError);
|
| + endpoint.waitForNextMessageForTesting();
|
| + checkValidationResult(testFiles[i], observer.lastError);
|
| }
|
|
|
| expect(core.close(testMessagePipe.handle0)).toBe(core.RESULT_OK);
|
|
|