Commit 2030edc2 authored by Robert Knight's avatar Robert Knight

Remove workarounds for PhantomJS in tests

parent 8e1e34a0
......@@ -30,11 +30,6 @@ describe('DocumentMeta', function() {
tempDocument.appendChild(tempDocumentHead);
fakeNormalizeURI = sinon.stub().callsFake((url, base) => {
if (url === 'http://a:b:c') {
// A modern browser would reject this URL, but PhantomJS's URL parser is
// more lenient.
throw new Error('Invalid URL');
}
return normalizeURI(url, base);
});
......
......@@ -175,10 +175,7 @@ function createDirective(
/** Helper to dispatch a native event to a DOM element. */
function sendEvent(element, eventType) {
// createEvent() used instead of Event constructor
// for PhantomJS compatibility
const event = document.createEvent('Event');
event.initEvent(eventType, true /* bubbles */, true /* cancelable */);
const event = new Event(eventType, { bubbles: true, cancelable: true });
element.dispatchEvent(event);
}
......
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