import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<title>Interfaces</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
function testInterfaceDeletable(iface) {
test(function() {
assert_true(!!window[iface], "Interface should exist.")
assert_true(delete window[iface], "The delete operator should return true.")
assert_equals(window[iface], undefined, "Interface should be gone.")
}, "Should be able to delete " + iface + ".")
}
var interfaces = [
"Event",
"CustomEvent",
"EventTarget",
"Node",
"Document",
"DOMImplementation",
"DocumentFragment",
"ProcessingInstruction",
"DocumentType",
"Element",
"Attr",
"CharacterData",
"Text",
"Comment",
"NodeIterator",
"TreeWalker",
"NodeFilter",
"NodeList",
"HTMLCollection",
"DOMStringList",
"DOMTokenList",
];
test(function() {
for (var p in window) {
interfaces.forEach(function(i) {
assert_not_equals(p, i)
})
}
}, "Interface objects properties should not be Enumerable")
interfaces.forEach(testInterfaceDeletable);
</script>

View file

@ -0,0 +1,455 @@
<!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 type=text/plain>
[Constructor(DOMString name)]
interface DOMError {
readonly attribute DOMString name;
};
[Constructor(DOMString type, optional EventInit eventInitDict)]
interface Event {
readonly attribute DOMString type;
readonly attribute EventTarget? target;
readonly attribute EventTarget? currentTarget;
const unsigned short NONE = 0;
const unsigned short CAPTURING_PHASE = 1;
const unsigned short AT_TARGET = 2;
const unsigned short BUBBLING_PHASE = 3;
readonly attribute unsigned short eventPhase;
void stopPropagation();
void stopImmediatePropagation();
readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
void preventDefault();
readonly attribute boolean defaultPrevented;
[Unforgeable] readonly attribute boolean isTrusted;
readonly attribute /* DOMTimeStamp */ unsigned long long timeStamp;
void initEvent(DOMString type, boolean bubbles, boolean cancelable);
};
dictionary EventInit {
boolean bubbles = false;
boolean cancelable = false;
};
[Constructor(DOMString type, optional CustomEventInit eventInitDict)]
interface CustomEvent : Event {
readonly attribute any detail;
void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any details);
};
dictionary CustomEventInit : EventInit {
any detail = null;
};
interface EventTarget {
void addEventListener(DOMString type, EventListener? callback, optional boolean capture);
void removeEventListener(DOMString type, EventListener? callback, optional boolean capture);
boolean dispatchEvent(Event event);
};
[Callback]
interface EventListener {
void handleEvent(Event event);
};
[NoInterfaceObject]
interface ParentNode {
readonly attribute HTMLCollection children;
readonly attribute Element? firstElementChild;
readonly attribute Element? lastElementChild;
readonly attribute unsigned long childElementCount;
void prepend((Node or DOMString)... nodes);
void append((Node or DOMString)... nodes);
};
Document implements ParentNode;
DocumentFragment implements ParentNode;
Element implements ParentNode;
[NoInterfaceObject]
interface ChildNode {
void before((Node or DOMString)... nodes);
void after((Node or DOMString)... nodes);
void replace((Node or DOMString)... nodes);
void remove();
};
DocumentType implements ChildNode;
Element implements ChildNode;
CharacterData implements ChildNode;
[NoInterfaceObject]
interface NonDocumentTypeChildNode {
readonly attribute Element? previousElementSibling;
readonly attribute Element? nextElementSibling;
};
Element implements NonDocumentTypeChildNode;
CharacterData implements NonDocumentTypeChildNode;
[Constructor(MutationCallback callback)]
interface MutationObserver {
void observe(Node target, MutationObserverInit options);
void disconnect();
sequence<MutationRecord> takeRecords();
};
callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer);
dictionary MutationObserverInit {
boolean childList = false;
boolean attributes = false;
boolean characterData = false;
boolean subtree = false;
boolean attributeOldValue = false;
boolean characterDataOldValue = false;
sequence<DOMString> attributeFilter;
};
interface MutationRecord {
readonly attribute DOMString type;
readonly attribute Node target;
readonly attribute NodeList addedNodes;
readonly attribute NodeList removedNodes;
readonly attribute Node? previousSibling;
readonly attribute Node? nextSibling;
readonly attribute DOMString? attributeName;
readonly attribute DOMString? attributeNamespace;
readonly attribute DOMString? oldValue;
};
interface Node : EventTarget {
const unsigned short ELEMENT_NODE = 1;
const unsigned short ATTRIBUTE_NODE = 2; // historical
const unsigned short TEXT_NODE = 3;
const unsigned short CDATA_SECTION_NODE = 4; // historical
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
const unsigned short ENTITY_NODE = 6; // historical
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
const unsigned short COMMENT_NODE = 8;
const unsigned short DOCUMENT_NODE = 9;
const unsigned short DOCUMENT_TYPE_NODE = 10;
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
const unsigned short NOTATION_NODE = 12; // historical
readonly attribute unsigned short nodeType;
readonly attribute DOMString nodeName;
readonly attribute DOMString? baseURI;
readonly attribute Document? ownerDocument;
readonly attribute Node? parentNode;
readonly attribute Element? parentElement;
boolean hasChildNodes();
readonly attribute NodeList childNodes;
readonly attribute Node? firstChild;
readonly attribute Node? lastChild;
readonly attribute Node? previousSibling;
readonly attribute Node? nextSibling;
attribute DOMString? nodeValue;
attribute DOMString? textContent;
void normalize();
Node cloneNode(optional boolean deep);
boolean isEqualNode(Node? node);
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
unsigned short compareDocumentPosition(Node other);
boolean contains(Node? other);
DOMString? lookupPrefix(DOMString? namespace);
DOMString? lookupNamespaceURI(DOMString? prefix);
boolean isDefaultNamespace(DOMString? namespace);
Node insertBefore(Node node, Node? child);
Node appendChild(Node node);
Node replaceChild(Node node, Node child);
Node removeChild(Node child);
};
[Constructor]
interface Document : Node {
readonly attribute DOMImplementation implementation;
readonly attribute DOMString URL;
readonly attribute DOMString documentURI;
readonly attribute DOMString compatMode;
readonly attribute DOMString characterSet;
readonly attribute DOMString contentType;
readonly attribute DocumentType? doctype;
readonly attribute Element? documentElement;
HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);
Element? getElementById(DOMString elementId);
Element createElement(DOMString localName);
Element createElementNS(DOMString? namespace, DOMString qualifiedName);
DocumentFragment createDocumentFragment();
Text createTextNode(DOMString data);
Comment createComment(DOMString data);
ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
Node importNode(Node node, optional boolean deep);
Node adoptNode(Node node);
Event createEvent(DOMString interface);
Range createRange();
// NodeFilter.SHOW_ALL = 0xFFFFFFFF
NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow, optional NodeFilter? filter);
TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow, optional NodeFilter? filter);
};
interface XMLDocument : Document {};
interface DOMImplementation {
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
Document createHTMLDocument(optional DOMString title);
boolean hasFeature(DOMString feature, [TreatNullAs=EmptyString] DOMString version);
};
[Constructor]
interface DocumentFragment : Node {
};
interface DocumentType : Node {
readonly attribute DOMString name;
readonly attribute DOMString publicId;
readonly attribute DOMString systemId;
};
interface Element : Node {
readonly attribute DOMString? namespaceURI;
readonly attribute DOMString? prefix;
readonly attribute DOMString localName;
readonly attribute DOMString tagName;
attribute DOMString id;
attribute DOMString className;
[PutForwards=value]
readonly attribute DOMTokenList classList;
readonly attribute Attr[] attributes;
DOMString? getAttribute(DOMString name);
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
void setAttribute(DOMString name, DOMString value);
void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
void removeAttribute(DOMString name);
void removeAttributeNS(DOMString? namespace, DOMString localName);
boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);
};
interface Attr {
readonly attribute DOMString localName;
attribute DOMString value;
readonly attribute DOMString name;
readonly attribute DOMString? namespaceURI;
readonly attribute DOMString? prefix;
};
interface CharacterData : Node {
[TreatNullAs=EmptyString] attribute DOMString data;
readonly attribute unsigned long length;
DOMString substringData(unsigned long offset, unsigned long count);
void appendData(DOMString data);
void insertData(unsigned long offset, DOMString data);
void deleteData(unsigned long offset, unsigned long count);
void replaceData(unsigned long offset, unsigned long count, DOMString data);
};
[Constructor(optional DOMString data)]
interface Text : CharacterData {
Text splitText(unsigned long offset);
readonly attribute DOMString wholeText;
};
interface ProcessingInstruction : CharacterData {
readonly attribute DOMString target;
};
[Constructor(optional DOMString data)]
interface Comment : CharacterData {
};
[Constructor]
interface Range {
readonly attribute Node startContainer;
readonly attribute unsigned long startOffset;
readonly attribute Node endContainer;
readonly attribute unsigned long endOffset;
readonly attribute boolean collapsed;
readonly attribute Node commonAncestorContainer;
void setStart(Node refNode, unsigned long offset);
void setEnd(Node refNode, unsigned long offset);
void setStartBefore(Node refNode);
void setStartAfter(Node refNode);
void setEndBefore(Node refNode);
void setEndAfter(Node refNode);
void collapse(optional boolean toStart = false);
void selectNode(Node refNode);
void selectNodeContents(Node refNode);
const unsigned short START_TO_START = 0;
const unsigned short START_TO_END = 1;
const unsigned short END_TO_END = 2;
const unsigned short END_TO_START = 3;
short compareBoundaryPoints(unsigned short how, Range sourceRange);
void deleteContents();
DocumentFragment extractContents();
DocumentFragment cloneContents();
void insertNode(Node node);
void surroundContents(Node newParent);
Range cloneRange();
void detach();
boolean isPointInRange(Node node, unsigned long offset);
short comparePoint(Node node, unsigned long offset);
boolean intersectsNode(Node node);
stringifier;
};
interface NodeIterator {
readonly attribute Node root;
readonly attribute Node? referenceNode;
readonly attribute boolean pointerBeforeReferenceNode;
readonly attribute unsigned long whatToShow;
readonly attribute NodeFilter? filter;
Node? nextNode();
Node? previousNode();
void detach();
};
interface TreeWalker {
readonly attribute Node root;
readonly attribute unsigned long whatToShow;
readonly attribute NodeFilter? filter;
attribute Node currentNode;
Node? parentNode();
Node? firstChild();
Node? lastChild();
Node? previousSibling();
Node? nextSibling();
Node? previousNode();
Node? nextNode();
};
[Callback]
interface NodeFilter {
// Constants for acceptNode()
const unsigned short FILTER_ACCEPT = 1;
const unsigned short FILTER_REJECT = 2;
const unsigned short FILTER_SKIP = 3;
// Constants for whatToShow
const unsigned long SHOW_ALL = 0xFFFFFFFF;
const unsigned long SHOW_ELEMENT = 0x1;
const unsigned long SHOW_ATTRIBUTE = 0x2; // historical
const unsigned long SHOW_TEXT = 0x4;
const unsigned long SHOW_CDATA_SECTION = 0x8; // historical
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
const unsigned long SHOW_ENTITY = 0x20; // historical
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
const unsigned long SHOW_COMMENT = 0x80;
const unsigned long SHOW_DOCUMENT = 0x100;
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
const unsigned long SHOW_NOTATION = 0x800; // historical
unsigned short acceptNode(Node node);
};
[ArrayClass]
interface NodeList {
getter Node? item(unsigned long index);
readonly attribute unsigned long length;
};
interface HTMLCollection {
readonly attribute unsigned long length;
getter Element? item(unsigned long index);
getter object? namedItem(DOMString name); // only returns Element
};
interface DOMTokenList {
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);
boolean contains(DOMString token);
void add(DOMString... tokens);
void remove(DOMString... tokens);
boolean toggle(DOMString token, optional boolean force);
stringifier;
attribute DOMString value;
};
</script>
<script>
"use strict";
var xmlDoc, detachedRange, element;
var idlArray;
setup(function() {
xmlDoc = document.implementation.createDocument(null, "", null);
detachedRange = document.createRange();
detachedRange.detach();
element = xmlDoc.createElementNS(null, "test");
element.setAttribute("bar", "baz");
idlArray = new IdlArray();
idlArray.add_idls(document.querySelector("script[type=text\\/plain]").textContent);
idlArray.add_objects({
Event: ['document.createEvent("Event")', 'new Event("foo")'],
CustomEvent: ['new CustomEvent("foo")'],
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();
</script>

View file

@ -0,0 +1,69 @@
<!doctype html>
<meta charset=utf-8>
<title>Changes to named properties of the window object</title>
<link rel="author" title="Ms2ger" href="ms2ger@gmail.com">
<link rel="author" title="Boris Zbarsky" href="bzbarsky@mit.edu">
<link rel="help" href="http://www.whatwg.org/html/#window">
<link rel="help" href="http://www.whatwg.org/html/#dom-window-nameditem">
<link rel="help" href="http://dev.w3.org/2006/webapi/WebIDL/#named-properties-object">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<iframe name="bar"></iframe>
<iframe name="constructor"></iframe>
<script>
function assert_data_propdesc(pd, Writable, Enumerable, Configurable) {
assert_equals(typeof pd, "object");
assert_equals(pd.writable, Writable);
assert_equals(pd.enumerable, Enumerable);
assert_equals(pd.configurable, Configurable);
}
test(function() {
assert_true("bar" in window, "bar not in window");
assert_equals(window["bar"],
document.getElementsByTagName("iframe")[0].contentWindow);
}, "Static name");
test(function() {
assert_true("bar" in Window.prototype, "bar in Window.prototype");
assert_false(Window.prototype.hasOwnProperty("bar"), "Window.prototype.hasOwnProperty(\"bar\")");
var gsp = Object.getPrototypeOf(Object.getPrototypeOf(window));
assert_true("bar" in gsp, "bar in gsp");
assert_true(gsp.hasOwnProperty("bar"), "gsp.hasOwnProperty(\"bar\")");
assert_data_propdesc(Object.getOwnPropertyDescriptor(gsp, "bar"),
true, false, true);
}, "Static name on the prototype");
test(function() {
assert_equals(window.constructor, Window);
assert_false(window.hasOwnProperty("constructor"), "window.constructor should not be an own property.");
var proto = Object.getPrototypeOf(window);
assert_equals(proto.constructor, Window);
assert_true("constructor" in proto, "constructor in proto");
assert_data_propdesc(Object.getOwnPropertyDescriptor(proto, "constructor"),
true, false, true);
var gsp = Object.getPrototypeOf(proto);
assert_true("constructor" in gsp, "constructor in gsp");
assert_false(gsp.hasOwnProperty("constructor"), "gsp.hasOwnProperty(\"constructor\")");
assert_equals(Object.getOwnPropertyDescriptor(gsp, "constructor"), undefined)
}, "constructor");
var t = async_test("Dynamic name")
var t2 = async_test("Ghost name")
t.step(function() {
var iframe = document.getElementsByTagName("iframe")[0];
iframe.setAttribute("src", "data:text/html,<script>window.name='foo'<\/script>");
iframe.onload = function() {
t.step(function() {
assert_true("foo" in window, "foo not in window");
assert_equals(window["foo"], iframe.contentWindow);
});
t.done();
t2.step(function() {
assert_false("bar" in window, "bar still in window");
assert_equals(window["bar"], undefined);
});
t2.done();
};
});
</script>

View file

@ -0,0 +1,104 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Named items: imgs</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="http://www.whatwg.org/html/#dom-document-nameditem">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="test">
<img name=test1>
<img name=test2>
<img name=test2>
<img id=test3>
<img id=test4>
<img id=test4>
<img name=test5>
<img id=test5>
<img id=test6>
<img name=test6>
<img id=test7 name=fail>
<img name=test8 id=fail>
</div>
<script>
test(function() {
var img = document.getElementsByTagName("img")[0];
assert_equals(img.name, "test1");
assert_true("test1" in document, '"test1" in document should be true');
assert_equals(document.test1, img);
}, "If there is one img, it should be returned (name)");
test(function() {
var img1 = document.getElementsByTagName("img")[1];
assert_equals(img1.name, "test2");
var img2 = document.getElementsByTagName("img")[2];
assert_equals(img2.name, "test2");
assert_true("test2" in document, '"test2" in document should be true');
var collection = document.test2;
assert_class_string(collection, "HTMLCollection", "collection should be an HTMLCollection");
assert_array_equals(collection, [img1, img2]);
}, "If there are two imgs, a collection should be returned. (name)");
test(function() {
var img = document.getElementsByTagName("img")[3];
assert_equals(img.id, "test3");
assert_false("test3" in document, '"test3" in document should be false');
assert_equals(document.test3, undefined);
}, "If there is one img, it should not be returned (id)");
test(function() {
var img1 = document.getElementsByTagName("img")[4];
assert_equals(img1.id, "test4");
var img2 = document.getElementsByTagName("img")[5];
assert_equals(img2.id, "test4");
assert_false("test4" in document, '"test4" in document should be false');
assert_equals(document.test4, undefined);
}, "If there are two imgs, nothing should be returned. (id)");
test(function() {
var img1 = document.getElementsByTagName("img")[6];
assert_equals(img1.name, "test5");
var img2 = document.getElementsByTagName("img")[7];
assert_equals(img2.id, "test5");
assert_true("test5" in document, '"test5" in document should be true');
assert_equals(document.test5, img1);
}, "If there are two imgs, the one with a name should be returned. (name and id)");
test(function() {
var img1 = document.getElementsByTagName("img")[8];
assert_equals(img1.id, "test6");
var img2 = document.getElementsByTagName("img")[9];
assert_equals(img2.name, "test6");
assert_true("test6" in document, '"test6" in document should be true');
assert_equals(document.test6, img2);
}, "If there are two imgs, the one with a name should be returned. (id and name)");
test(function() {
var img = document.getElementsByTagName("img")[10];
assert_equals(img.id, "test7");
assert_true("test7" in document, '"test7" in document should be true');
assert_equals(document.test7, img);
}, "A name should affect getting an img by id");
test(function() {
var img = document.getElementsByTagName("img")[11];
assert_equals(img.name, "test8");
assert_true("test8" in document, '"test8" in document should be true');
assert_equals(document.test8, img);
}, "An id shouldn't affect getting an img by name");
</script>

View file

@ -0,0 +1,59 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
== dir_auto-contained-bdi-L.html dir_auto-contained-bdi-L.html
== dir_auto-contained-bdi-R.html dir_auto-contained-bdi-R.html
== dir_auto-contained-dir_auto-L.html dir_auto-contained-dir_auto-L.html
== dir_auto-contained-dir_auto-R.html dir_auto-contained-dir_auto-R.html
== dir_auto-contained-dir-L.html dir_auto-contained-dir-L.html
== dir_auto-contained-dir-R.html dir_auto-contained-dir-R.html
== dir_auto-contained-L.html dir_auto-contained-L.html
== dir_auto-contained-R.html dir_auto-contained-R.html
== dir_auto-contained-script-L.html dir_auto-contained-script-L.html
== dir_auto-contained-script-R.html dir_auto-contained-script-R.html
== dir_auto-contained-style-L.html dir_auto-contained-style-L.html
== dir_auto-contained-style-R.html dir_auto-contained-style-R.html
== dir_auto-contained-textarea-L.html dir_auto-contained-textarea-L.html
== dir_auto-contained-textarea-R.html dir_auto-contained-textarea-R.html
== dir_auto-EN-L.html dir_auto-EN-L.html
== dir_auto-EN-R.html dir_auto-EN-R.html
== dir_auto-input-EN-L.html dir_auto-input-EN-L.html
== dir_auto-input-EN-R.html dir_auto-input-EN-R.html
== dir_auto-input-L.html dir_auto-input-L.html
== dir_auto-input-N-EN.html dir_auto-input-N-EN.html
== dir_auto-input-N-EN-L.html dir_auto-input-N-EN-L.html
== dir_auto-input-N-EN-R.html dir_auto-input-N-EN-R.html
== dir_auto-input-N-L.html dir_auto-input-N-L.html
== dir_auto-input-N-R.html dir_auto-input-N-R.html
== dir_auto-input-R.html dir_auto-input-R.html
== dir_auto-input-script-EN-L.html dir_auto-input-script-EN-L.html
== dir_auto-input-script-EN-R.html dir_auto-input-script-EN-R.html
== dir_auto-input-script-L.html dir_auto-input-script-L.html
== dir_auto-input-script-N-EN.html dir_auto-input-script-N-EN.html
== dir_auto-input-script-N-EN-L.html dir_auto-input-script-N-EN-L.html
== dir_auto-input-script-N-EN-R.html dir_auto-input-script-N-EN-R.html
== dir_auto-input-script-N-L.html dir_auto-input-script-N-L.html
== dir_auto-input-script-N-R.html dir_auto-input-script-N-R.html
== dir_auto-input-script-R.html dir_auto-input-script-R.html
== dir_auto-isolate.html dir_auto-isolate.html
== dir_auto-L.html dir_auto-L.html
== dir_auto-N-EN.html dir_auto-N-EN.html
== dir_auto-N-EN-L.html dir_auto-N-EN-L.html
== dir_auto-N-EN-R.html dir_auto-N-EN-R.html
== dir_auto-N-L.html dir_auto-N-L.html
== dir_auto-N-R.html dir_auto-N-R.html
== dir_auto-pre-mixed.html dir_auto-pre-mixed.html
== dir_auto-pre-N-between-Rs.html dir_auto-pre-N-between-Rs.html
== dir_auto-pre-N-EN.html dir_auto-pre-N-EN.html
== dir_auto-R.html dir_auto-R.html
== dir_auto-textarea-mixed.html dir_auto-textarea-mixed.html
fails-if(B2G||Mulet||(Android&&asyncPan)) == dir_auto-textarea-N-between-Rs.html dir_auto-textarea-N-between-Rs.html
# B2G scrollbar on opposite side
== dir_auto-textarea-N-EN.html dir_auto-textarea-N-EN.html
== dir_auto-textarea-script-mixed.html dir_auto-textarea-script-mixed.html
fails-if(B2G||Mulet||(Android&&asyncPan)) == dir_auto-textarea-script-N-between-Rs.html dir_auto-textarea-script-N-between-Rs.html
# B2G scrollbar on reference only
== dir_auto-textarea-script-N-EN.html dir_auto-textarea-script-N-EN.html
== lang-xyzzy.html lang-xyzzy.html
== lang-xmllang-01.html lang-xmllang-01.html
== style-01.html style-01.html

View file

@ -0,0 +1,56 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
== dir_auto-contained-bdi-L.html dir_auto-contained-bdi-L-ref.html
== dir_auto-contained-bdi-R.html dir_auto-contained-bdi-R-ref.html
== dir_auto-contained-dir_auto-L.html dir_auto-contained-dir_auto-L-ref.html
== dir_auto-contained-dir_auto-R.html dir_auto-contained-dir_auto-R-ref.html
== dir_auto-contained-dir-L.html dir_auto-contained-dir-L-ref.html
== dir_auto-contained-dir-R.html dir_auto-contained-dir-R-ref.html
== dir_auto-contained-L.html dir_auto-contained-L-ref.html
== dir_auto-contained-R.html dir_auto-contained-R-ref.html
== dir_auto-contained-script-L.html dir_auto-contained-script-L-ref.html
== dir_auto-contained-script-R.html dir_auto-contained-script-R-ref.html
== dir_auto-contained-style-L.html dir_auto-contained-style-L-ref.html
== dir_auto-contained-style-R.html dir_auto-contained-style-R-ref.html
== dir_auto-contained-textarea-L.html dir_auto-contained-textarea-L-ref.html
== dir_auto-contained-textarea-R.html dir_auto-contained-textarea-R-ref.html
== dir_auto-EN-L.html dir_auto-EN-L-ref.html
== dir_auto-EN-R.html dir_auto-EN-R-ref.html
== dir_auto-input-EN-L.html dir_auto-input-EN-L-ref.html
== dir_auto-input-EN-R.html dir_auto-input-EN-R-ref.html
== dir_auto-input-L.html dir_auto-input-L-ref.html
== dir_auto-input-N-EN.html dir_auto-input-N-EN-ref.html
== dir_auto-input-N-EN-L.html dir_auto-input-N-EN-L-ref.html
== dir_auto-input-N-EN-R.html dir_auto-input-N-EN-R-ref.html
== dir_auto-input-N-L.html dir_auto-input-N-L-ref.html
== dir_auto-input-N-R.html dir_auto-input-N-R-ref.html
== dir_auto-input-R.html dir_auto-input-R-ref.html
== dir_auto-input-script-EN-L.html dir_auto-input-script-EN-L-ref.html
== dir_auto-input-script-EN-R.html dir_auto-input-script-EN-R-ref.html
== dir_auto-input-script-L.html dir_auto-input-script-L-ref.html
== dir_auto-input-script-N-EN.html dir_auto-input-script-N-EN-ref.html
== dir_auto-input-script-N-EN-L.html dir_auto-input-script-N-EN-L-ref.html
== dir_auto-input-script-N-EN-R.html dir_auto-input-script-N-EN-R-ref.html
== dir_auto-input-script-N-L.html dir_auto-input-script-N-L-ref.html
== dir_auto-input-script-N-R.html dir_auto-input-script-N-R-ref.html
== dir_auto-input-script-R.html dir_auto-input-script-R-ref.html
== dir_auto-isolate.html dir_auto-isolate-ref.html
== dir_auto-L.html dir_auto-L-ref.html
== dir_auto-N-EN.html dir_auto-N-EN-ref.html
== dir_auto-N-EN-L.html dir_auto-N-EN-L-ref.html
== dir_auto-N-EN-R.html dir_auto-N-EN-R-ref.html
== dir_auto-N-L.html dir_auto-N-L-ref.html
== dir_auto-N-R.html dir_auto-N-R-ref.html
== dir_auto-pre-mixed.html dir_auto-pre-mixed-ref.html
== dir_auto-pre-N-between-Rs.html dir_auto-pre-N-between-Rs-ref.html
== dir_auto-pre-N-EN.html dir_auto-pre-N-EN-ref.html
== dir_auto-R.html dir_auto-R-ref.html
== dir_auto-textarea-mixed.html dir_auto-textarea-mixed-ref.html
fails-if(Android&&asyncPan) == dir_auto-textarea-N-between-Rs.html dir_auto-textarea-N-between-Rs-ref.html
== dir_auto-textarea-N-EN.html dir_auto-textarea-N-EN-ref.html
== dir_auto-textarea-script-mixed.html dir_auto-textarea-script-mixed-ref.html
fails-if(Android&&asyncPan) == dir_auto-textarea-script-N-between-Rs.html dir_auto-textarea-script-N-between-Rs-ref.html
== dir_auto-textarea-script-N-EN.html dir_auto-textarea-script-N-EN-ref.html
== lang-xyzzy.html lang-xyzzy-ref.html
== lang-xmllang-01.html lang-xmllang-01-ref.html
== style-01.html style-01-ref.html

View file

@ -0,0 +1,103 @@
<!doctype html>
<title>WeakMap.prototype</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.15.5>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
function assert_propdesc(obj, prop, Writable, Enumerable, Configurable) {
var propdesc = Object.getOwnPropertyDescriptor(obj, prop);
assert_equals(typeof propdesc, "object");
assert_equals(propdesc.writable, Writable, "[[Writable]]");
assert_equals(propdesc.enumerable, Enumerable, "[[Enumerable]]");
assert_equals(propdesc.configurable, Configurable, "[[Configurable]]");
}
function test_length(fun, expected) {
test(function() {
assert_propdesc(WeakMap.prototype[fun], "length", false, false, false);
assert_equals(WeakMap.prototype[fun].length, expected);
}, "WeakMap.prototype." + fun + ".length")
}
function test_thisval(fun, args) {
// Step 1-2
test(function() {
assert_throws(new TypeError(), function() {
WeakMap.prototype[fun].apply(null, args);
});
assert_throws(new TypeError(), function() {
WeakMap.prototype[fun].apply(undefined, args);
});
}, "WeakMap.prototype." + fun + ": ToObject on this")
// Step 3
test(function() {
assert_throws(new TypeError(), function() {
WeakMap.prototype[fun].apply({}, args);
});
}, "WeakMap.prototype." + fun + ": this has no [[WeakMapData]] internal property")
}
// In every case, the length property of a built-in Function object described
// in this clause has the attributes { [[Writable]]: false, [[Enumerable]]:
// false, [[Configurable]]: false }. Every other property described in this
// clause has the attributes { [[Writable]]: true, [[Enumerable]]: false,
// [[Configurable]]: true } unless otherwise specified.
test(function() {
assert_equals(Object.getPrototypeOf(WeakMap.prototype), Object.prototype);
}, "The value of the [[Prototype]] internal property of the WeakMap prototype object is the standard built-in Object prototype object (15.2.4).")
// 15.15.5.1 WeakMap.prototype.constructor
test(function() {
assert_equals(WeakMap.prototype.constructor, WeakMap);
assert_propdesc(WeakMap.prototype, "constructor", true, false, true);
}, "The initial value of WeakMap.prototype.constructor is the built-in WeakMap constructor.")
// 15.15.5.2 WeakMap.prototype.delete ( key )
test(function() {
assert_propdesc(WeakMap.prototype, "delete", true, false, true);
test_length("delete", 1);
// Step 1-3
test_thisval("delete", [{}]);
}, "WeakMap.prototype.delete")
// 15.15.5.3 WeakMap.prototype.get ( key )
test(function() {
assert_propdesc(WeakMap.prototype, "get", true, false, true);
test_length("get", 1);
// Step 1-3
test_thisval("get", [{}]);
// Step 8
test(function() {
var wm = new WeakMap();
var key = {};
var res = wm.get({}, {});
assert_equals(res, undefined);
}, "WeakMap.prototype.get: return undefined");
}, "WeakMap.prototype.get")
// 15.14.5.4 Map.prototype.has ( key )
test(function() {
assert_propdesc(WeakMap.prototype, "has", true, false, true);
test_length("has", 1);
// Step 1-3
test_thisval("has", [{}]);
}, "WeakMap.prototype.has")
// 15.14.5.5 Map.prototype.set ( key , value )
test(function() {
assert_propdesc(WeakMap.prototype, "set", true, false, true);
test_length("set", 2);
// Step 1-3
test_thisval("set", [{}, {}]);
}, "WeakMap.prototype.set")
// 15.15.5.6 Map.prototype.@@toStringTag
test(function() {
assert_class_string(new WeakMap(), "WeakMap");
assert_class_string(WeakMap.prototype, "WeakMap");
}, "WeakMap.prototype.@@toStringTag")
</script>

View file

@ -0,0 +1,24 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
[DEFAULT]
support-files =
webgl/common.js
[typedarrays/test_constructors.html]
[webgl/test_bufferSubData.html]
subsuite = gpu
skip-if = toolkit == 'android' #android(WebGL)
[webgl/test_compressedTexImage2D.html]
subsuite = gpu
skip-if = toolkit == 'android' #android(WebGL)
[webgl/test_compressedTexSubImage2D.html]
subsuite = gpu
skip-if = true # Bug 1226336
[webgl/test_texImage2D.html]
subsuite = gpu
skip-if = toolkit == 'android' #android(WebGL)
[webgl/test_texSubImage2D.html]
subsuite = gpu
skip-if = toolkit == 'android' #android(WebGL)
[webgl/test_uniformMatrixNfv.html]
subsuite = gpu
skip-if = toolkit == 'android' #android(WebGL)

View file

@ -0,0 +1,48 @@
<!doctype html>
<title>Typed Array constructors</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/typedarray/specs/latest/#7>
<link rel=help href=http://dev.w3.org/2006/webapi/WebIDL/#dfn-overload-resolution-algorithm>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
var args = [
/* numbers */
[NaN, 0], [+Infinity, 0], [-Infinity, 0], [+0, 0], [-0, 0], // Step 2
[-0.4, 0], [-0.9, 0], [1.1, 1], [2.9, 2], // Step 3
[1, 1], [-0xF1000000, 0xF000000], // Step 4
/* strings */
["1", 1], ["1e2", 100],
/* null, undefined, booleans */
[undefined, 0], [null, 0], [false, 0], [true, 1],
/* objects */
[{}, 0], [{ length: 2, 0: 0, 1: 0 }, 0], [[0, 0], 2]
];
var interfaces = [
"Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array",
"Int32Array", "Uint32Array", "Float32Array", "Float64Array"
];
test(function() {
interfaces.concat(["ArrayBuffer", "DataView"]).forEach(function(i) {
test(function() {
// XXX The spec is wrong here.
assert_throws(new TypeError(), function() {
new window[i]();
});
}, "Constructing interface " + i + " with no arguments should throw.");
});
interfaces.forEach(function(i) {
args.forEach(function(arg, j) {
var input = arg[0], expected = arg[1];
test(function() {
var ta = new window[i](input);
assert_equals(ta.length, expected);
}, "The argument " + format_value(input) + " (" + j + ") should be interpreted as " +
expected + " for interface " + i + ".");
});
});
});
</script>

View file

@ -0,0 +1,13 @@
function getGl() {
var c = document.createElement("canvas");
var gl = c.getContext("experimental-webgl");
assert_true(!!gl, "Should be able to get a context.");
return gl;
}
function shouldGenerateGLError(cx, glError, fn) {
test(function() {
fn();
assert_equals(cx.getError(), glError);
}, "Calling " + fn + " should generate a " + glError + " error.");
}

View file

@ -0,0 +1,26 @@
<!doctype html>
<title>bufferSubData</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.5>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script>
test(function() {
var gl = getGl();
assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
var b = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, b);
var a = new Float32Array(1);
gl.bufferData(gl.ARRAY_BUFFER, a, gl.STATIC_DRAW);
var nan = 0 / 0;
gl.bufferSubData(gl.ARRAY_BUFFER, nan, a);
assert_equals(gl.getError(), WebGLRenderingContext.NO_ERROR);
});
</script>

View file

@ -0,0 +1,30 @@
<!doctype html>
<title>compressedTexImage2D</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script>
test(function() {
var COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
var gl = getGl();
var tex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, tex);
shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8));
});
shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0, new Uint8Array(8), null);
});
test(function() {
assert_throws(new TypeError(), function() {
gl.compressedTexImage2D(gl.TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 0);
});
}, "Should throw a TypeError when passing too few arguments.");
});
</script>

View file

@ -0,0 +1,30 @@
<!doctype html>
<title>compressedTexSubImage2D</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script>
test(function() {
var COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
var gl = getGl();
var tex = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, tex);
shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8));
});
shouldGenerateGLError(gl, gl.INVALID_ENUM, function() {
gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT, new Uint8Array(8), null);
});
test(function() {
assert_throws(new TypeError(), function() {
gl.compressedTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 10, 10, COMPRESSED_RGB_S3TC_DXT1_EXT);
});
}, "Should throw a TypeError when passing too few arguments.");
});
</script>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>texImage2D</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script>
test(function() {
var gl = getGl();
assert_throws(new TypeError(), function() {
gl.texImage2D(0, 0, 0, 0, 0, window);
});
assert_throws(new TypeError(), function() {
gl.texImage2D(0, 0, 0, 0, 0, { get width() { throw 7 }, get height() { throw 7 }, data: new Uint8ClampedArray(10) });
});
});
</script>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>texSubImage2D</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#5.14.8>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script>
test(function() {
var gl = getGl();
assert_throws(new TypeError(), function() {
gl.texSubImage2D(0, 0, 0, 0, 0, 0, window);
});
assert_throws(new TypeError(), function() {
gl.texSubImage2D(0, 0, 0, 0, 0, 0, { get width() { throw 7 }, get height() { throw 7 }, data: new Uint8ClampedArray(10) });
});
});
</script>

View file

@ -0,0 +1,33 @@
<!doctype html>
<title>uniformMatrix*fv</title>
<link rel=author href=mailto:Ms2ger@gmail.com title=Ms2ger>
<link rel=help href=https://www.khronos.org/registry/webgl/specs/latest/#WebGLRenderingContext>
<link rel=help href=http://dev.w3.org/2006/webapi/WebIDL/#es-boolean>
<link rel=help href=http://es5.github.com/#x9.2>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=common.js></script>
<div id=log></div>
<script id="vshader" type="x-shader/x-vertex">
uniform mat2 m2;
uniform mat3 m3;
uniform mat4 m4;
</script>
<script>
var floatArray = function(n) {
var a = [];
for (var i = 0; i < n; ++i) {
a.push(1);
}
return a;
};
[2, 3, 4].forEach(function(n) {
test(function() {
var gl = getGl();
var f = "uniformMatrix" + n + "fv";
var loc = gl.getUniformLocation(gl.createProgram(), "m" + n);
gl[f](loc, { valueOf: function() { throw "Error"; } }, floatArray(n));
}, "Should not throw for " + n);
});
</script>