Commit 8781c770 authored by Romain Courteaud's avatar Romain Courteaud

Test: fix absolute URL calculation

parent a421fa3b
......@@ -87,6 +87,7 @@ module.exports = function (grunt) {
'RSVP',
'DOMParser',
'URI',
'URL',
'__RenderJSIframeGadget',
'__RenderJSEmbeddedGadget'
]
......
/*jslint nomen: true*/
(function (document, renderJS, QUnit, sinon, URI) {
(function (document, renderJS, QUnit, sinon, URI, URL) {
"use strict";
var test = QUnit.test,
stop = QUnit.stop,
......@@ -3704,9 +3704,7 @@
document.querySelector('.acquisitionError'),
klass_div = iframe.contentWindow.document.querySelector('.klass');
equal(url_div.innerHTML,
window.location.protocol + "//" + window.location.hostname +
(window.location.port ? ':' + window.location.port : '') +
"/test/not_declared_gadget.html");
new URL('not_declared_gadget.html', window.location).href);
equal(acquisition_div.innerHTML,
"AcquisitionError: No gadget provides willFail");
equal(klass_div.innerHTML,
......@@ -3720,5 +3718,5 @@
});
});
}(document, renderJS, QUnit, sinon, URI));
}(document, renderJS, QUnit, sinon, URI, URL));
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