Commit 5de34070 authored by Jérome Perrin's avatar Jérome Perrin

Zelenium: do not include (HTML) link in case of expected failure

89115b88 is great, but with "testFunctionalAnonymousSelection" the
result HTML is more than 40Mo.
parent a42da4de
......@@ -502,15 +502,18 @@ objectExtend(HtmlTestCaseRow.prototype, {
// Store the test HTML as a dataURL to ease debugging from posted test results
// This code should be synchronous (no Blob asDataURL method for example)
var aElement = this.trElement.ownerDocument.createElement("a");
aElement.textContent = ' (HTML)';
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
return String.fromCharCode('0x' + p1);
}));
// We don't do this with "expected failures" tests, not to create too big result pages
if (testFrame.currentTestCase.headerRow.trElement.textContent.indexOf("expected failure") === -1) {
var aElement = this.trElement.ownerDocument.createElement("a");
aElement.textContent = ' (HTML)';
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
aElement.href = 'data:text/html;charset=utf-8;base64,' + b64EncodeUnicode(sel$('selenium_myiframe').contentWindow.document.body.innerHTML);
this.trElement.cells[2].appendChild(aElement);
}
aElement.href = 'data:text/html;charset=utf-8;base64,' + b64EncodeUnicode(sel$('selenium_myiframe').contentWindow.document.body.innerHTML);
this.trElement.cells[2].appendChild(aElement);
},
setMessage: function(message) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment