зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1194860 - Remove dom/imptests; r=jgraham
This leaves the testharness files, because they are used in various mochitests. Differential Revision: https://phabricator.services.mozilla.com/D49132 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3eb8980f70
Коммит
30b4e2a534
1
.flake8
1
.flake8
|
@ -9,7 +9,6 @@ exclude =
|
|||
dom/browser-element,
|
||||
dom/canvas,
|
||||
dom/encoding,
|
||||
dom/imptests,
|
||||
dom/security,
|
||||
dom/websocket,
|
||||
gfx/tests,
|
||||
|
|
|
@ -1,6 +1 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
../../../../../dom/imptests/testharness.js
|
||||
../../../../../dom/imptests/testharnessreport.js
|
||||
|
||||
[test_bug1409973_date_time_format.html]
|
|
@ -1,106 +0,0 @@
|
|||
This directory contains tests imported from W3C test suites. In order to make it
|
||||
as easy as possible to update these tests, no changes are made to the imported
|
||||
files (names for scripted tests do get a test_ prefix to integrate with the test
|
||||
runner, however). The scripts to update tests are provided.
|
||||
|
||||
|
||||
=======================
|
||||
Files in this directory
|
||||
=======================
|
||||
|
||||
Source; Usage and purpose; License
|
||||
|
||||
* testharness.js / testharness.css
|
||||
Directly imported from the W3C repository (<http://dvcs.w3.org/hg/resources>),
|
||||
with the updateTestharness.py script.
|
||||
Provide the test harness.
|
||||
W3C Test Suite License / W3C 3-clause BSD License
|
||||
|
||||
* idlharness.js
|
||||
Directly imported from the W3C repository (<http://dvcs.w3.org/hg/resources>),
|
||||
with the updateTestharness.py script.
|
||||
Used to test WebIDL.
|
||||
W3C Test Suite License / W3C 3-clause BSD License
|
||||
|
||||
* WebIDLParser.js
|
||||
Directly imported from the W3C repository (<http://dvcs.w3.org/hg/resources>),
|
||||
with the updateTestharness.py script.
|
||||
Used by idlharness.js to parse IDL blocks.
|
||||
MIT License
|
||||
|
||||
* updateTestharness.py
|
||||
Used to update the above files.
|
||||
MPL
|
||||
|
||||
* parseManifest.py
|
||||
Imported from <https://bitbucket.org/ms2ger/test-runner>. Parses MANIFEST
|
||||
files (provided in the W3C repository) as documented at
|
||||
<https://bitbucket.org/ms2ger/test-runner/raw/tip/manifests.txt>.
|
||||
MIT License
|
||||
|
||||
* testharnessreport.js
|
||||
Glue between testharness.js and our Mochitest runner.
|
||||
MPL
|
||||
|
||||
* importTestsuite.py
|
||||
Imports a test suite from a remote repository. Takes one argument, a file in
|
||||
the format described under webapps.txt.
|
||||
Note: removes both source and destination directory before starting. Do not
|
||||
use with outstanding changes in either directory.
|
||||
MPL
|
||||
|
||||
* parseFailures.py
|
||||
Parses failures out of a mochitest log and writes out JSON files and Makefiles
|
||||
into the correct failures/ folder.
|
||||
The mochitest log should be produced by setting the 'dumpFailures' flag in
|
||||
testharnessreport.js; this will print out the encountered failures, marked
|
||||
by @ signs.
|
||||
MPL
|
||||
|
||||
* writeBuildFiles.py
|
||||
Helper functions to write out automatically generated build files.
|
||||
MPL
|
||||
|
||||
* Makefile.in
|
||||
Integration with our build system. Installs support files into /resources and
|
||||
includes a .mk file for each repository.
|
||||
MPL
|
||||
|
||||
* failures/
|
||||
Expected failures for tests in each repository. Each test's failures, if
|
||||
any, are in a file with the same path and name with .json appended. New
|
||||
expected fail files currently needed to be added manually to makefiles.
|
||||
|
||||
* html.mk / webapps.mk / ...
|
||||
Generated by importTestsuite.py from webapps.txt.
|
||||
Contains a list of the directories with tests. To be included in Makefile.in.
|
||||
|
||||
* html.txt / webapps.txt / ...
|
||||
Input to importTestsuite.py.
|
||||
Lists the URL of the repository and the destination directory (separated by a
|
||||
vertical bar), followed by a list of directories within the repository
|
||||
(separated by line feeds).
|
||||
|
||||
* html / webapps / ...
|
||||
Actual tests.
|
||||
W3C Test Suite License / W3C 3-clause BSD License
|
||||
|
||||
|
||||
=====================================================================
|
||||
Importing an additional directory from an already-imported repository
|
||||
=====================================================================
|
||||
|
||||
Add a line to the relevant data file (e.g. webapps.txt), with the path to the
|
||||
additional directory relative to the root of the remote repository, and then run
|
||||
the importTestsuite.py script, passing the data file as its argument.
|
||||
|
||||
|
||||
==========================
|
||||
Importing a new test suite
|
||||
==========================
|
||||
|
||||
Create a data file in the format documented above, and run the
|
||||
importTestsuite.py script, passing the data file as its argument.
|
||||
This will create a foo.mk file; include this file in dom/imptests/Makefile.in.
|
||||
|
||||
Add any necessary files in failures/.
|
|
@ -1,26 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
conformancetest/data.js
|
||||
css/reset.css
|
||||
implementation.js
|
||||
selecttest/common.js
|
||||
selecttest/test-iframe.html
|
||||
tests.js
|
||||
|
||||
[conformancetest/test_event.html]
|
||||
[conformancetest/test_runtest.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[selecttest/test_Document-open.html]
|
||||
[selecttest/test_addRange.html]
|
||||
skip-if = toolkit == 'android' #android(bug 775227)
|
||||
[selecttest/test_collapse.html]
|
||||
[selecttest/test_collapseToStartEnd.html]
|
||||
[selecttest/test_deleteFromDocument.html]
|
||||
[selecttest/test_extend.html]
|
||||
[selecttest/test_getRangeAt.html]
|
||||
[selecttest/test_getSelection.html]
|
||||
[selecttest/test_interfaces.html]
|
||||
[selecttest/test_isCollapsed.html]
|
||||
[selecttest/test_removeAllRanges.html]
|
||||
[selecttest/test_selectAllChildren.html]
|
|
@ -1,13 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_Document-createElement-namespace.html.json]
|
||||
[test_Document-createElementNS.html.json]
|
||||
[test_Document-getElementsByTagName.html.json]
|
||||
[test_Node-properties.html.json]
|
||||
[test_attributes.html.json]
|
||||
[test_case.html.json]
|
||||
[test_getElementsByClassName-10.xml.json]
|
||||
[test_getElementsByClassName-11.xml.json]
|
|
@ -1,7 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_Range-insertNode.html.json]
|
||||
[test_Range-surroundContents.html.json]
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"0,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0].firstChild": true,
|
||||
"4,2: resulting range position for range [paras[1].firstChild, 0, paras[1].firstChild, 0], node paras[1].firstChild": true,
|
||||
"6,6: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1.firstChild": true,
|
||||
"8,4: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1.firstChild": true
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"0,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0].firstChild": true,
|
||||
"1,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0].firstChild": true,
|
||||
"2,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0].firstChild": true,
|
||||
"3,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0].firstChild": true,
|
||||
"4,2: resulting range position for range [paras[1].firstChild, 0, paras[1].firstChild, 0], node paras[1].firstChild": true,
|
||||
"5,2: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[1].firstChild": true,
|
||||
"6,6: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1.firstChild": true,
|
||||
"7,6: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1.firstChild": true,
|
||||
"8,4: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1.firstChild": true,
|
||||
"9,4: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1.firstChild": true,
|
||||
"37,0: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0]": true,
|
||||
"37,0: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0]": true,
|
||||
"37,1: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild": true,
|
||||
"37,1: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild": true,
|
||||
"37,2: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild": true,
|
||||
"37,2: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild": true,
|
||||
"37,3: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1": true,
|
||||
"37,3: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1": true,
|
||||
"37,4: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild": true,
|
||||
"37,4: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild": true,
|
||||
"37,5: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1": true,
|
||||
"37,5: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1": true,
|
||||
"37,6: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild": true,
|
||||
"37,6: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild": true,
|
||||
"37,8: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv": true,
|
||||
"37,8: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv": true,
|
||||
"37,10: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2": true,
|
||||
"37,10: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2": true,
|
||||
"37,12: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node xmlElement": true,
|
||||
"37,12: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node xmlElement": true,
|
||||
"37,13: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode": true,
|
||||
"37,13: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode": true,
|
||||
"37,14: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode": true,
|
||||
"37,14: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode": true,
|
||||
"37,15: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction": true,
|
||||
"37,15: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction": true,
|
||||
"37,16: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedProcessingInstruction": true,
|
||||
"37,16: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedProcessingInstruction": true,
|
||||
"37,17: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node comment": true,
|
||||
"37,17: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node comment": true,
|
||||
"37,18: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedComment": true,
|
||||
"37,18: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedComment": true
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"Historical DOM features must be removed: CDATASection": true,
|
||||
"Historical DOM features must be removed: createCDATASection": true,
|
||||
"Historical DOM features must be removed: createAttribute": true,
|
||||
"Historical DOM features must be removed: createAttributeNS": true,
|
||||
"Historical DOM features must be removed: getAttributeNode": true,
|
||||
"Historical DOM features must be removed: getAttributeNodeNS": true,
|
||||
"Historical DOM features must be removed: setAttributeNode": true,
|
||||
"Historical DOM features must be removed: removeAttributeNode": true
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
{
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
"EventTarget method: addEventListener": true,
|
||||
"EventTarget method: removeEventListener": true,
|
||||
"EventTarget method: dispatchEvent": true,
|
||||
"Window readonly attribute: history": true,
|
||||
"Window readonly attribute: parent": true,
|
||||
"Window readonly attribute: frameElement": true,
|
||||
"Window readonly attribute: navigator": true,
|
||||
"Window readonly attribute: external": true,
|
||||
"Window readonly attribute: applicationCache": true,
|
||||
"Window readonly attribute: sessionStorage": true,
|
||||
"Window readonly attribute: localStorage": true,
|
||||
"Window readonly attribute: screen": true,
|
||||
"Window readonly attribute: innerWidth": true,
|
||||
"Window readonly attribute: innerHeight": true,
|
||||
"Window readonly attribute: scrollX": true,
|
||||
"Window readonly attribute: pageXOffset": true,
|
||||
"Window readonly attribute: scrollY": true,
|
||||
"Window readonly attribute: pageYOffset": true,
|
||||
"Window readonly attribute: screenX": true,
|
||||
"Window readonly attribute: screenY": true,
|
||||
"Window readonly attribute: outerWidth": true,
|
||||
"Window readonly attribute: outerHeight": true,
|
||||
"Window attribute: oncancel": true,
|
||||
"Window attribute: onclose": true,
|
||||
"Window attribute: oncuechange": true,
|
||||
"Window attribute: onmousewheel": true,
|
||||
"Window unforgeable attribute: window": true,
|
||||
"Window unforgeable attribute: document": true,
|
||||
"Window unforgeable attribute: top": true
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_document.title-06.html.json]
|
||||
[test_nameditem-02.html.json]
|
||||
[test_nameditem-03.html.json]
|
||||
[test_nameditem-04.html.json]
|
||||
[test_nameditem-05.html.json]
|
||||
[test_nameditem-06.html.json]
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"If there are two imgs, a collection should be returned. (name)": true
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
|
||||
|
||||
[test_constructors.html.json]
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"Constructing interface Int8Array with no arguments should throw.": true,
|
||||
"Constructing interface Uint8Array with no arguments should throw.": true,
|
||||
"Constructing interface Uint8ClampedArray with no arguments should throw.": true,
|
||||
"Constructing interface Int16Array with no arguments should throw.": true,
|
||||
"Constructing interface Uint16Array with no arguments should throw.": true,
|
||||
"Constructing interface Int32Array with no arguments should throw.": true,
|
||||
"Constructing interface Uint32Array with no arguments should throw.": true,
|
||||
"Constructing interface Float32Array with no arguments should throw.": true,
|
||||
"Constructing interface Float64Array with no arguments should throw.": true,
|
||||
"Constructing interface ArrayBuffer with no arguments should throw.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Int8Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Int8Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Int8Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Int8Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Uint8Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Uint8Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Uint8Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Uint8Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Uint8ClampedArray.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Uint8ClampedArray.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Uint8ClampedArray.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Uint8ClampedArray.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Int16Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Int16Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Int16Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Int16Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Uint16Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Uint16Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Uint16Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Uint16Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Int32Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Int32Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Int32Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Int32Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Uint32Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Uint32Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Uint32Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Uint32Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Float32Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Float32Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Float32Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Float32Array.": true,
|
||||
"The argument Infinity (1) should be interpreted as 0 for interface Float64Array.": true,
|
||||
"The argument -Infinity (2) should be interpreted as 0 for interface Float64Array.": true,
|
||||
"The argument -4043309056 (10) should be interpreted as 251658240 for interface Float64Array.": true,
|
||||
"The argument object \"[object Object]\" (18) should be interpreted as 0 for interface Float64Array.": true
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
git|git://github.com/w3c/web-platform-tests.git|html
|
||||
typedarrays
|
||||
webgl
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,45 +0,0 @@
|
|||
<!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>
|
|
@ -1,455 +0,0 @@
|
|||
<!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 {
|
||||
attribute [TreatNullAs=EmptyString] 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>
|
|
@ -1,69 +0,0 @@
|
|||
<!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>
|
|
@ -1,104 +0,0 @@
|
|||
<!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>
|
|
@ -1,56 +0,0 @@
|
|||
# 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
|
|
@ -1,103 +0,0 @@
|
|||
<!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>
|
|
@ -1,24 +0,0 @@
|
|||
# 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)
|
|
@ -1,48 +0,0 @@
|
|||
<!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>
|
|
@ -1,13 +0,0 @@
|
|||
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.");
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
<!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>
|
|
@ -1,30 +0,0 @@
|
|||
<!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>
|
|
@ -1,30 +0,0 @@
|
|||
<!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>
|
|
@ -1,20 +0,0 @@
|
|||
<!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>
|
|
@ -1,20 +0,0 @@
|
|||
<!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>
|
|
@ -1,33 +0,0 @@
|
|||
<!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>
|
|
@ -1,189 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
"""
|
||||
Imports a test suite from a remote repository. Takes one argument, a file in
|
||||
the format described in README.
|
||||
Note: removes both source and destination directory before starting. Do not
|
||||
use with outstanding changes in either directory.
|
||||
"""
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import parseManifest
|
||||
import writeBuildFiles
|
||||
|
||||
def readManifests(iden, dirs):
|
||||
def parseManifestFile(iden, path):
|
||||
pathstr = "hg-%s/%s/MANIFEST" % (iden, path)
|
||||
subdirs, mochitests, reftests, _, supportfiles = parseManifest.parseManifestFile(pathstr)
|
||||
return subdirs, mochitests, reftests, supportfiles
|
||||
|
||||
data = []
|
||||
for path in dirs:
|
||||
subdirs, mochitests, reftests, supportfiles = parseManifestFile(iden, path)
|
||||
data.append({
|
||||
"path": path,
|
||||
"mochitests": mochitests,
|
||||
"reftests": reftests,
|
||||
"supportfiles": supportfiles,
|
||||
})
|
||||
data.extend(readManifests(iden, ["%s/%s" % (path, d) for d in subdirs]))
|
||||
return data
|
||||
|
||||
|
||||
def getData(confFile):
|
||||
"""This function parses a file of the form
|
||||
(hg or git)|URL of remote repository|identifier for the local directory
|
||||
First directory of tests
|
||||
...
|
||||
Last directory of tests"""
|
||||
vcs = ""
|
||||
url = ""
|
||||
iden = ""
|
||||
directories = []
|
||||
try:
|
||||
with open(confFile, 'r') as fp:
|
||||
first = True
|
||||
for line in fp:
|
||||
if first:
|
||||
vcs, url, iden = line.strip().split("|")
|
||||
first = False
|
||||
else:
|
||||
directories.append(line.strip())
|
||||
finally:
|
||||
return vcs, url, iden, directories
|
||||
|
||||
|
||||
def makePathInternal(a, b):
|
||||
if not b:
|
||||
# Empty directory, i.e., the repository root.
|
||||
return a
|
||||
return "%s/%s" % (a, b)
|
||||
|
||||
|
||||
def makeSourcePath(a, b):
|
||||
"""Make a path in the source (upstream) directory."""
|
||||
return makePathInternal("hg-%s" % a, b)
|
||||
|
||||
|
||||
def makeDestPath(a, b):
|
||||
"""Make a path in the destination (mozilla-central) directory, shortening as
|
||||
appropriate."""
|
||||
def shorten(path):
|
||||
path = path.replace('dom-tree-accessors', 'dta')
|
||||
path = path.replace('document.getElementsByName', 'doc.gEBN')
|
||||
path = path.replace('requirements-for-implementations', 'implreq')
|
||||
path = path.replace('other-elements-attributes-and-apis', 'oeaaa')
|
||||
return path
|
||||
|
||||
return shorten(makePathInternal(a, b))
|
||||
|
||||
|
||||
def extractReftestFiles(reftests):
|
||||
"""Returns the set of files referenced in the reftests argument"""
|
||||
files = set()
|
||||
for line in reftests:
|
||||
files.update([line[1], line[2]])
|
||||
return files
|
||||
|
||||
|
||||
def copy(dest, directories):
|
||||
"""Copy mochitests and support files from the external HG directory to their
|
||||
place in mozilla-central.
|
||||
"""
|
||||
print("Copying tests...")
|
||||
for d in directories:
|
||||
sourcedir = makeSourcePath(dest, d["path"])
|
||||
destdir = makeDestPath(dest, d["path"])
|
||||
os.makedirs(destdir)
|
||||
|
||||
reftestfiles = extractReftestFiles(d["reftests"])
|
||||
|
||||
for mochitest in d["mochitests"]:
|
||||
shutil.copy("%s/%s" % (sourcedir, mochitest), "%s/test_%s" % (destdir, mochitest))
|
||||
for reftest in sorted(reftestfiles):
|
||||
shutil.copy("%s/%s" % (sourcedir, reftest), "%s/%s" % (destdir, reftest))
|
||||
for support in d["supportfiles"]:
|
||||
shutil.copy("%s/%s" % (sourcedir, support), "%s/%s" % (destdir, support))
|
||||
|
||||
def printBuildFiles(dest, directories):
|
||||
"""Create a mochitest.ini that all the contains tests we import.
|
||||
"""
|
||||
print("Creating manifest...")
|
||||
all_mochitests = set()
|
||||
all_support = set()
|
||||
|
||||
for d in directories:
|
||||
path = makeDestPath(dest, d["path"])
|
||||
|
||||
all_mochitests |= set('%s/test_%s' % (d['path'], mochitest)
|
||||
for mochitest in d['mochitests'])
|
||||
all_support |= set('%s/%s' % (d['path'], p) for p in d['supportfiles'])
|
||||
|
||||
if d["reftests"]:
|
||||
with open(path + "/reftest.list", "w") as fh:
|
||||
result = writeBuildFiles.substReftestList("importTestsuite.py",
|
||||
d["reftests"])
|
||||
fh.write(result)
|
||||
|
||||
manifest_path = dest + '/mochitest.ini'
|
||||
with open(manifest_path, 'w') as fh:
|
||||
result = writeBuildFiles.substManifest('importTestsuite.py',
|
||||
all_mochitests, all_support)
|
||||
fh.write(result)
|
||||
subprocess.check_call(["hg", "add", manifest_path])
|
||||
|
||||
def hgadd(dest, directories):
|
||||
"""Inform hg of the files in |directories|."""
|
||||
print("hg addremoving...")
|
||||
for d in directories:
|
||||
subprocess.check_call(["hg", "addremove", makeDestPath(dest, d)])
|
||||
|
||||
def removeAndCloneRepo(vcs, url, dest):
|
||||
"""Replaces the repo at dest by a fresh clone from url using vcs"""
|
||||
assert vcs in ('hg', 'git')
|
||||
|
||||
print("Removing %s..." % dest)
|
||||
subprocess.check_call(["rm", "-rf", dest])
|
||||
|
||||
print("Cloning %s to %s with %s..." % (url, dest, vcs))
|
||||
subprocess.check_call([vcs, "clone", url, dest])
|
||||
|
||||
def importRepo(confFile):
|
||||
try:
|
||||
vcs, url, iden, directories = getData(confFile)
|
||||
dest = iden
|
||||
hgdest = "hg-%s" % iden
|
||||
|
||||
print("Removing %s..." % dest)
|
||||
subprocess.check_call(["rm", "-rf", dest])
|
||||
|
||||
removeAndCloneRepo(vcs, url, hgdest)
|
||||
|
||||
data = readManifests(iden, directories)
|
||||
print("Going to import %s..." % [d["path"] for d in data])
|
||||
|
||||
copy(dest, data)
|
||||
printBuildFiles(dest, data)
|
||||
hgadd(dest, directories)
|
||||
print("Removing %s again..." % hgdest)
|
||||
subprocess.check_call(["rm", "-rf", hgdest])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(e.returncode)
|
||||
finally:
|
||||
print("Done")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Need one argument.")
|
||||
else:
|
||||
importRepo(sys.argv[1])
|
||||
|
|
@ -7,27 +7,6 @@
|
|||
with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "DOM: Core & HTML")
|
||||
|
||||
with Files("html/webgl/**"):
|
||||
BUG_COMPONENT = ("Core", "Canvas: 2D")
|
||||
|
||||
with Files("html/typedarrays/**"):
|
||||
BUG_COMPONENT = ("Core", "JavaScript: Standard Library")
|
||||
|
||||
with Files("html/js/**"):
|
||||
BUG_COMPONENT = ("Core", "JavaScript: Standard Library")
|
||||
|
||||
with Files("html/html/**"):
|
||||
BUG_COMPONENT = ("Core", "DOM: Core & HTML")
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
'html/mochitest.ini',
|
||||
'webapps/mochitest.ini',
|
||||
]
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
'failures/html/typedarrays/mochitest.ini',
|
||||
]
|
||||
|
||||
TEST_HARNESS_FILES.testing.mochitest.resources += [
|
||||
'idlharness.js',
|
||||
'testharness.css',
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import collections
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
import writeBuildFiles
|
||||
|
||||
def extractLines(fp):
|
||||
lines = []
|
||||
watch = False
|
||||
for line in fp:
|
||||
line = line.decode('utf-8')
|
||||
if line == '@@@ @@@ Failures\n':
|
||||
watch = True
|
||||
elif watch:
|
||||
watch = False
|
||||
idx = line.index('@@@')
|
||||
lines.append((line[:idx], line[idx + 3:]))
|
||||
return lines
|
||||
|
||||
def ensuredir(path):
|
||||
dir = path[:path.rfind('/')]
|
||||
if not os.path.exists(dir):
|
||||
os.makedirs(dir)
|
||||
|
||||
def dumpFailures(lines):
|
||||
files = []
|
||||
for url, objstr in lines:
|
||||
if objstr == '{}\n':
|
||||
continue
|
||||
|
||||
# Avoid overly large diffs.
|
||||
if 'editing/' in url:
|
||||
sep = ':'
|
||||
else:
|
||||
sep = ': '
|
||||
|
||||
jsonpath = 'failures/' + url + '.json'
|
||||
files.append(jsonpath)
|
||||
ensuredir(jsonpath)
|
||||
obj = json.loads(objstr, object_pairs_hook=collections.OrderedDict)
|
||||
formattedobjstr = json.dumps(obj, indent=2, separators=(',', sep)) + '\n'
|
||||
formattedobj = formattedobjstr.encode('utf-8')
|
||||
fp = open(jsonpath, 'wb')
|
||||
fp.write(formattedobj)
|
||||
fp.close()
|
||||
return files
|
||||
|
||||
def writeFiles(files):
|
||||
pathmap = {}
|
||||
for path in files:
|
||||
dirp, leaf = path.rsplit('/', 1)
|
||||
pathmap.setdefault(dirp, []).append(leaf)
|
||||
|
||||
for k, v in pathmap.items():
|
||||
with open(k + '/mochitest.ini', 'w') as fh:
|
||||
result = writeBuildFiles.substManifest('parseFailures.py', v, [])
|
||||
fh.write(result)
|
||||
|
||||
|
||||
def main(logPath):
|
||||
fp = open(logPath, 'rb')
|
||||
lines = extractLines(fp)
|
||||
fp.close()
|
||||
|
||||
files = dumpFailures(lines)
|
||||
writeFiles(files)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) < 2:
|
||||
print("Please pass the path to the logfile from which failures should be extracted.")
|
||||
main(sys.argv[1])
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
# Copyright (C) 2011-2013 Ms2ger
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
|
||||
def parseManifest(fd):
|
||||
def parseReftestLine(chunks):
|
||||
assert len(chunks) % 2 == 0
|
||||
reftests = []
|
||||
for i in range(2, len(chunks), 2):
|
||||
if not chunks[i] in ["==", "!="]:
|
||||
raise Exception("Misformatted reftest line " + line)
|
||||
reftests.append([chunks[i], chunks[1], chunks[i + 1]])
|
||||
return reftests
|
||||
|
||||
dirs = []
|
||||
autotests = []
|
||||
reftests = []
|
||||
othertests = []
|
||||
supportfiles = []
|
||||
for fullline in fd:
|
||||
line = fullline.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
chunks = line.split(" ")
|
||||
|
||||
if chunks[0] == "MANIFEST":
|
||||
raise Exception("MANIFEST listed on line " + line)
|
||||
|
||||
if chunks[0] == "dir":
|
||||
dirs.append(chunks[1])
|
||||
elif chunks[0] == "support" and chunks[1] == "dir":
|
||||
dirs.append(chunks[1])
|
||||
elif chunks[0] == "ref":
|
||||
if len(chunks) % 2:
|
||||
raise Exception("Missing chunk in line " + line)
|
||||
reftests.extend(parseReftestLine(chunks))
|
||||
elif chunks[0] == "support":
|
||||
supportfiles.append(chunks[1])
|
||||
elif chunks[0] in ["manual", "parser", "http"]:
|
||||
othertests.append(chunks[1])
|
||||
else:
|
||||
# automated
|
||||
autotests.append(chunks[0])
|
||||
return dirs, autotests, reftests, othertests, supportfiles
|
||||
|
||||
|
||||
def parseManifestFile(path):
|
||||
fp = open(path)
|
||||
dirs, autotests, reftests, othertests, supportfiles = parseManifest(fp)
|
||||
fp.close()
|
||||
return dirs, autotests, reftests, othertests, supportfiles
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import subprocess
|
||||
|
||||
repo = "https://github.com/w3c/testharness.js"
|
||||
dest = "resources-upstream"
|
||||
files = [{"f":"testharness.js"},
|
||||
{"f":"testharness.css"},
|
||||
{"f":"idlharness.js"},
|
||||
{"d":"webidl2/lib/webidl2.js", "f":"WebIDLParser.js"}]
|
||||
|
||||
subprocess.check_call(["git", "clone", repo, dest])
|
||||
subprocess.check_call(["git", "submodule", "init"], cwd=dest)
|
||||
subprocess.check_call(["git", "submodule", "update"], cwd=dest)
|
||||
for f in files:
|
||||
path = f["d"] if "d" in f else f["f"]
|
||||
subprocess.check_call(["cp", "%s/%s" % (dest, path), f["f"]])
|
||||
subprocess.check_call(["hg", "add", f["f"]])
|
||||
subprocess.check_call(["rm", "-rf", dest])
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
hg|https://dvcs.w3.org/hg/webapps|webapps
|
||||
XMLHttpRequest/tests/submissions/Ms2ger
|
|
@ -1,14 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>FormData.append</title>
|
||||
<link rel=help href=http://xhr.spec.whatwg.org/#dom-formdata-append>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var fd = new FormData();
|
||||
fd.append("name", new String("value"));
|
||||
// TODO: test that it actually worked.
|
||||
}, "Passing a String object to FormData.append should work.");
|
||||
</script>
|
|
@ -1,102 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>XMLHttpRequest IDL tests</title>
|
||||
<div id=log></div>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script src=/resources/WebIDLParser.js></script>
|
||||
<script src=/resources/idlharness.js></script>
|
||||
<script type=text/plain class=untested>
|
||||
interface EventTarget {
|
||||
void addEventListener(DOMString type, EventListener? callback, optional boolean capture /* = false */);
|
||||
void removeEventListener(DOMString type, EventListener? callback, optional boolean capture /* = false */);
|
||||
boolean dispatchEvent(Event event);
|
||||
};
|
||||
</script>
|
||||
<script type=text/plain>
|
||||
[NoInterfaceObject]
|
||||
interface XMLHttpRequestEventTarget : EventTarget {
|
||||
// event handlers
|
||||
[TreatNonCallableAsNull] attribute Function? onloadstart;
|
||||
[TreatNonCallableAsNull] attribute Function? onprogress;
|
||||
[TreatNonCallableAsNull] attribute Function? onabort;
|
||||
[TreatNonCallableAsNull] attribute Function? onerror;
|
||||
[TreatNonCallableAsNull] attribute Function? onload;
|
||||
[TreatNonCallableAsNull] attribute Function? ontimeout;
|
||||
[TreatNonCallableAsNull] attribute Function? onloadend;
|
||||
};
|
||||
|
||||
interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
enum XMLHttpRequestResponseType {
|
||||
"",
|
||||
"arraybuffer",
|
||||
"blob",
|
||||
"document",
|
||||
"json",
|
||||
"text"
|
||||
};
|
||||
*/
|
||||
|
||||
[Constructor]
|
||||
interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
// event handler
|
||||
[TreatNonCallableAsNull] attribute Function? onreadystatechange;
|
||||
|
||||
// states
|
||||
const unsigned short UNSENT = 0;
|
||||
const unsigned short OPENED = 1;
|
||||
const unsigned short HEADERS_RECEIVED = 2;
|
||||
const unsigned short LOADING = 3;
|
||||
const unsigned short DONE = 4;
|
||||
readonly attribute unsigned short readyState;
|
||||
|
||||
// request
|
||||
void open(DOMString method, DOMString url, optional boolean async/* = true*/, optional DOMString? user, optional DOMString? password);
|
||||
void setRequestHeader(DOMString header, DOMString value);
|
||||
attribute unsigned long timeout;
|
||||
attribute boolean withCredentials;
|
||||
readonly attribute XMLHttpRequestUpload upload;
|
||||
void send(optional (ArrayBufferView or Blob or Document or DOMString or FormData)? data/* = null*/);
|
||||
void abort();
|
||||
|
||||
// response
|
||||
readonly attribute unsigned short status;
|
||||
readonly attribute DOMString statusText;
|
||||
DOMString? getResponseHeader(DOMString header);
|
||||
DOMString getAllResponseHeaders();
|
||||
void overrideMimeType(DOMString mime);
|
||||
/* attribute XMLHttpRequestResponseType responseType; */
|
||||
readonly attribute any response;
|
||||
readonly attribute DOMString responseText;
|
||||
readonly attribute Document? responseXML;
|
||||
};
|
||||
|
||||
[Constructor,
|
||||
Constructor(HTMLFormElement form)]
|
||||
interface FormData {
|
||||
void append(DOMString name, Blob value, optional DOMString filename);
|
||||
void append(DOMString name, DOMString value);
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
"use strict";
|
||||
var form = document.createElement("form");
|
||||
var idlArray = new IdlArray();
|
||||
[].forEach.call(document.querySelectorAll("script[type=text\\/plain]"), function(node) {
|
||||
if (node.className == "untested") {
|
||||
idlArray.add_untested_idls(node.textContent);
|
||||
} else {
|
||||
idlArray.add_idls(node.textContent);
|
||||
}
|
||||
});
|
||||
idlArray.add_objects({
|
||||
XMLHttpRequest: ['new XMLHttpRequest()'],
|
||||
XMLHttpRequestUpload: ['(new XMLHttpRequest()).upload'],
|
||||
FormData: ['new FormData()', 'new FormData(form)']
|
||||
});
|
||||
idlArray.test();
|
||||
</script>
|
|
@ -1,42 +0,0 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>XMLHttpRequest: setRequestHeader() with invalid arguments</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<!--
|
||||
CHAR = <any US-ASCII character (octets 0 - 127)>
|
||||
CTL = <any US-ASCII control character
|
||||
(octets 0 - 31) and DEL (127)>
|
||||
SP = <US-ASCII SP, space (32)>
|
||||
HT = <US-ASCII HT, horizontal-tab (9)>
|
||||
token = 1*<any CHAR except CTLs or separators>
|
||||
separators = "(" | ")" | "<" | ">" | "@"
|
||||
| "," | ";" | ":" | "\" | <">
|
||||
| "/" | "[" | "]" | "?" | "="
|
||||
| "{" | "}" | SP | HT
|
||||
field-name = token
|
||||
-->
|
||||
<script>
|
||||
var invalid_headers = ["(", ")", "<", ">", "@", ",", ";", ":", "\\",
|
||||
"\"", "/", "[", "]", "?", "=", "{", "}", " ",
|
||||
"\u0009", "\u007f"]
|
||||
for (var i = 0; i < 32; ++i) {
|
||||
invalid_headers.push(String.fromCharCode(i))
|
||||
}
|
||||
for (var i = 0; i < invalid_headers.length; ++i) {
|
||||
test(function() {
|
||||
assert_throws("SYNTAX_ERR", function() {
|
||||
var client = new XMLHttpRequest()
|
||||
client.open("GET", "../resources/delay.php?ms=0")
|
||||
client.setRequestHeader(invalid_headers[i], "test")
|
||||
}, "setRequestHeader should throw with header " +
|
||||
format_value(invalid_headers[i]) +".")
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +0,0 @@
|
|||
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
|
||||
[XMLHttpRequest/tests/submissions/Ms2ger/test_FormData-append.html]
|
||||
[XMLHttpRequest/tests/submissions/Ms2ger/test_interfaces.html]
|
||||
[XMLHttpRequest/tests/submissions/Ms2ger/test_setrequestheader-invalid-arguments.htm]
|
|
@ -1,43 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import string
|
||||
|
||||
manifest_template = """# THIS FILE IS AUTOGENERATED BY ${caller} - DO NOT EDIT
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
${supportfiles}
|
||||
|
||||
${tests}
|
||||
"""
|
||||
|
||||
reftest_template = """# THIS FILE IS AUTOGENERATED BY ${caller} - DO NOT EDIT
|
||||
|
||||
${reftests}
|
||||
"""
|
||||
|
||||
|
||||
|
||||
def substManifest(caller, test_files, support_files):
|
||||
test_files = [f.lstrip('/') for f in test_files]
|
||||
support_files = [f.lstrip('/') for f in support_files]
|
||||
|
||||
return string.Template(manifest_template).substitute({
|
||||
'caller': caller,
|
||||
'supportfiles': '\n'.join(' %s' % f for f in sorted(support_files)),
|
||||
'tests': '\n'.join('[%s]' % f for f in sorted(test_files))
|
||||
})
|
||||
|
||||
|
||||
def substReftestList(caller, tests):
|
||||
def reftests(tests):
|
||||
return "\n".join(" ".join(line) for line in tests)
|
||||
|
||||
return string.Template(reftest_template).substitute({
|
||||
"caller": caller,
|
||||
"reftests": reftests(tests),
|
||||
})
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
dom/imptests Makefile.in's are autogenerated. See
|
||||
dom/imptests/writeMakefile.py and bug 782651. We will need to update
|
||||
writeMakefile.py to produce mozbuild files.
|
|
@ -1437,17 +1437,7 @@ toolbar#nav-bar {
|
|||
|
||||
info = mozinfo.info
|
||||
|
||||
# Bug 1089034 - imptest failure expectations are encoded as
|
||||
# test manifests, even though they aren't tests. This gross
|
||||
# hack causes several problems in automation including
|
||||
# throwing off the chunking numbers. Remove them manually
|
||||
# until bug 1089034 is fixed.
|
||||
def remove_imptest_failure_expectations(tests, values):
|
||||
return (t for t in tests
|
||||
if 'imptests/failures' not in t['path'])
|
||||
|
||||
filters = [
|
||||
remove_imptest_failure_expectations,
|
||||
subsuite(options.subsuite),
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче