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

Unified Diff: third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js

Issue 2660563003: [Sensors] Improve error logging in sensors layout tests (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
diff --git a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
index fd5caf3c2e60dc4cde08a61aacd2d227b2fe3b2d..e514fe0be1c09b4fe52efa257f53062611c7586c 100644
--- a/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
+++ b/third_party/WebKit/LayoutTests/sensor/resources/sensor-helpers.js
@@ -7,7 +7,7 @@ class CallbackWrapper {
try {
callback(args);
} catch(e) {
- reject_func();
+ reject_func(e);
}
}
}
@@ -374,9 +374,9 @@ function sensor_test(func, name, properties) {
return new Promise((resolve, reject) => { setTimeout(resolve, 0); });
};
- let onFailure = () => {
+ let onFailure = error => {
sensor.mockSensorProvider.reset();
- return new Promise((resolve, reject) => { setTimeout(reject, 0); });
+ return new Promise((resolve, reject) => { setTimeout(() => {reject(error);}, 0); });
};
return Promise.resolve(func(sensor)).then(onSuccess, onFailure);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698