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

Unified Diff: chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js

Issue 593163002: Short-circuit failures in BLE js tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Testing new cls Created 6 years, 3 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: chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js
diff --git a/chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js b/chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js
index 86c4d7c8fa20a66adc66493ba651c38567a06287..067f6737929750696d8c808f3d49df3e5036b8a2 100644
--- a/chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js
+++ b/chrome/test/data/extensions/api_test/bluetooth_low_energy/get_descriptors/runtest.js
@@ -37,27 +37,28 @@ var descrs = null;
function failOnError() {
if (chrome.runtime.lastError) {
- chrome.test.fail(chrome.runtime.lastError.message);
+ chrome.test.sendMessage(chrome.runtime.lastError.message);
}
}
// 1. Unknown characteristic ID.
getDescriptors(badCharId, function (result) {
if (result || !chrome.runtime.lastError) {
- chrome.test.fail('getDescriptors should have failed for \'badCharId\'');
+ chrome.test.sendMessage('getDescriptors should have failed ' +
+ 'for \'badCharId\'');
}
// 2. Known ID, unknown characteristic.
getDescriptors(charId, function (result) {
if (result || !chrome.runtime.lastError) {
- chrome.test.fail('getDescriptors should have failed');
+ chrome.test.sendMessage('getDescriptors should have failed');
}
// 3. Empty descriptors.
getDescriptors(charId, function (result) {
failOnError();
if (!result || result.length != 0) {
- chrome.test.fail('Descriptors should be empty');
+ chrome.test.sendMessage('Descriptors should be empty');
}
// 4. Success.

Powered by Google App Engine
This is Rietveld 408576698