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