Bug 1243415 - Add hash format support for screenshots in chrome scope.
MozReview-Commit-ID: Dp0vDyYTzX1
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2412,17 +2412,21 @@ GeckoDriver.prototype.takeScreenshot = f
let highlightEls = [];
for (let h of highlights) {
let el = this.curBrowser.seenEls.get(h, container);
highlightEls.push(el);
}
let canvas = capture.viewport(this.getCurrentWindow(), highlightEls);
- return capture.toBase64(canvas);
+ if (hash) {
+ return capture.toHash(canvas);
+ } else {
+ return capture.toBase64(canvas);
+ }
case Context.CONTENT:
if (hash) {
return this.listener.getScreenshotHash(id, full, highlights);
} else {
return this.listener.takeScreenshot(id, full, highlights);
}
}