| Index: chrome/test/data/extensions/api_test/bluetooth_low_energy/start_stop_notifications/runtest.js
|
| diff --git a/chrome/test/data/extensions/api_test/bluetooth_low_energy/start_stop_notifications/runtest.js b/chrome/test/data/extensions/api_test/bluetooth_low_energy/start_stop_notifications/runtest.js
|
| index fad86d8054b402209ac6bfbc1577c4a3046473f1..a4c9a7a8753fb7e66b3c0e7b974ebf396701719b 100644
|
| --- a/chrome/test/data/extensions/api_test/bluetooth_low_energy/start_stop_notifications/runtest.js
|
| +++ b/chrome/test/data/extensions/api_test/bluetooth_low_energy/start_stop_notifications/runtest.js
|
| @@ -23,32 +23,22 @@ var ble = chrome.bluetoothLowEnergy;
|
| var start = ble.startCharacteristicNotifications;
|
| var stop = ble.stopCharacteristicNotifications;
|
|
|
| -function sendReady(errorMessage) {
|
| - chrome.test.sendMessage('ready', function (message) {
|
| - if (errorMessage) {
|
| - chrome.test.fail(errorMessage);
|
| - return;
|
| - }
|
| -
|
| - chrome.test.runTests([testStartStopNotifications]);
|
| - });
|
| -}
|
| -
|
| function expectError(expectedMessage) {
|
| if (!chrome.runtime.lastError) {
|
| - sendReady('Expected error: ' + expectedMessage);
|
| + chrome.test.sendMessage('Expected error: ' + expectedMessage);
|
| return;
|
| }
|
|
|
| if (chrome.runtime.lastError.message != expectedMessage) {
|
| - sendReady('Expected error: ' + expectedMessage + ', got error: ' +
|
| - expectedMessage);
|
| + chrome.test.sendMessage('Expected error: ' + expectedMessage
|
| + + ', got error: ' + expectedMessage);
|
| }
|
| }
|
|
|
| function expectSuccess() {
|
| if (chrome.runtime.lastError) {
|
| - sendReady('Unexpected error: ' + chrome.runtime.lastError.message);
|
| + chrome.test.sendMessage('Unexpected error: '
|
| + + chrome.runtime.lastError.message);
|
| }
|
| }
|
|
|
| @@ -76,7 +66,9 @@ start('foo', function () {
|
| expectError(errorNotNotifying);
|
| stop(charId2, function () {
|
| expectError(errorNotNotifying);
|
| - sendReady(undefined);
|
| + chrome.test.sendMessage('ready', function (message) {
|
| + chrome.test.runTests([testStartStopNotifications]);
|
| + });
|
| });
|
| });
|
| });
|
|
|