Revision 6b2fe34df13d646cab0a4b35dc33ee0202301851 authored by Brad Werth on 11 April 2018, 09:35:15 UTC, committed by moz-wptsync-bot on 11 April 2018, 16:39:02 UTC
The test currently stretches a 100 x 100 image to 150 pixels wide, which makes the shaded region of the png stretch to 75 pixels. None of the math in the rest of the test accounts for this stretching, and the test fails on all browsers. It seems clear that the intention was to use an unstretched, 100 pixel wide image, which makes the test pass. bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1404222 gecko-commit: 1c17b43d22afbd5e25f6d29c9168f2316b36103b gecko-integration-branch: central gecko-reviewers: dholbert
1 parent ccd2afa
interfaces.html
<!doctype html>
<meta charset=utf-8>
<title>DOM IDL tests</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/WebIDLParser.js></script>
<script src=/resources/idlharness.js></script>
<h1>DOM IDL tests</h1>
<div id=log></div>
<script>
"use strict";
var xmlDoc = document.implementation.createDocument(null, "", null);
var detachedRange = document.createRange();
detachedRange.detach();
var element = xmlDoc.createElementNS(null, "test");
element.setAttribute("bar", "baz");
var idlArray = new IdlArray();
function doTest([html, dom]) {
// HTML is needed for EventHandler. Provide a dummy interface for
// LinkStyle which HTML depends on but we're not testing.
idlArray.add_untested_idls('interface LinkStyle {};');
idlArray.add_untested_idls(html);
idlArray.add_idls(dom);
idlArray.add_objects({
EventTarget: ['new EventTarget()'],
Event: ['document.createEvent("Event")', 'new Event("foo")'],
CustomEvent: ['new CustomEvent("foo")'],
AbortController: ['new AbortController()'],
AbortSignal: ['new AbortController().signal'],
Document: ['new Document()'],
XMLDocument: ['xmlDoc'],
DOMImplementation: ['document.implementation'],
DocumentFragment: ['document.createDocumentFragment()'],
DocumentType: ['document.doctype'],
Element: ['element'],
Attr: ['document.querySelector("[id]").attributes[0]'],
Text: ['document.createTextNode("abc")'],
ProcessingInstruction: ['xmlDoc.createProcessingInstruction("abc", "def")'],
Comment: ['document.createComment("abc")'],
Range: ['document.createRange()', 'detachedRange'],
NodeIterator: ['document.createNodeIterator(document.body, NodeFilter.SHOW_ALL, null, false)'],
TreeWalker: ['document.createTreeWalker(document.body, NodeFilter.SHOW_ALL, null, false)'],
NodeList: ['document.querySelectorAll("script")'],
HTMLCollection: ['document.body.children'],
DOMTokenList: ['document.body.classList'],
});
idlArray.test();
}
function fetchText(url) {
return fetch(url).then((response) => response.text());
}
promise_test(function() {
return Promise.all(['/interfaces/html.idl',
'/interfaces/dom.idl'].map(fetchText))
.then(doTest);
}, "Test driver");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...