Bug 1119174 - Update web-platform-tests to revision a84b794c43954b4465eb9b967cc934875952fc40, a=testonly

--HG--
rename : testing/web-platform/tests/dom/errors/DOMException-constants.html => testing/web-platform/tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html
extra : rebase_source : 72190ccd4d3f69e55d0a0cc33268acb2db008079
This commit is contained in:
James Graham 2015-01-08 10:34:01 +00:00
parent a36507bcdf
commit e1c0fc8743
12 changed files with 638 additions and 317 deletions

View File

@ -898,6 +898,9 @@
{
"url": "/XMLHttpRequest/resources/image.gif"
},
{
"url": "/XMLHttpRequest/resources/img.jpg"
},
{
"url": "/XMLHttpRequest/resources/infinite-redirects.py"
},
@ -1072,15 +1075,45 @@
{
"url": "/content-security-policy/generic/wildcardPortTestSuceeds.js"
},
{
"url": "/content-security-policy/img-src/img-src-4_1.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_1.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_1_2.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_2.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_2_2.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_3.html.sub.headers"
},
{
"url": "/content-security-policy/media-src/media-src-7_3_2.html.sub.headers"
},
{
"url": "/content-security-policy/object-src/object-src-2_1.html.sub.headers"
},
{
"url": "/content-security-policy/object-src/object-src-2_2.html.sub.headers"
},
{
"url": "/content-security-policy/script-src/10_1_support_1.js"
},
{
"url": "/content-security-policy/script-src/10_1_support_2.js"
},
{
"url": "/content-security-policy/script-src/addInlineTestsWithDOMManipulation.js"
},
{
"url": "/content-security-policy/script-src/buildInlineWorker.js"
},
{
"url": "/content-security-policy/script-src/inlineSuccessTest.js"
},
@ -1090,6 +1123,12 @@
{
"url": "/content-security-policy/script-src/script-src-1_1.html.sub.headers"
},
{
"url": "/content-security-policy/script-src/script-src-1_10.html.sub.headers"
},
{
"url": "/content-security-policy/script-src/script-src-1_10_1.html.sub.headers"
},
{
"url": "/content-security-policy/script-src/script-src-1_2_1.html.sub.headers"
},
@ -1099,12 +1138,21 @@
{
"url": "/content-security-policy/script-src/script-src-1_4.html.sub.headers"
},
{
"url": "/content-security-policy/script-src/script-src-1_9.html.sub.headers"
},
{
"url": "/content-security-policy/style-src/3_3.css"
},
{
"url": "/content-security-policy/style-src/style-src-3_1.html.sub.headers"
},
{
"url": "/content-security-policy/style-src/style-src-3_2.html.sub.headers"
},
{
"url": "/content-security-policy/style-src/style-src-3_3.html.sub.headers"
},
{
"url": "/content-security-policy/style-src/style-src-3_4-import.css"
},
@ -1117,9 +1165,15 @@
{
"url": "/content-security-policy/support/checkReport.sub.js"
},
{
"url": "/content-security-policy/support/fail.png"
},
{
"url": "/content-security-policy/support/media/flash.swf"
},
{
"url": "/content-security-policy/support/pass.png"
},
{
"url": "/content-security-policy/support/report.py"
},
@ -1216,6 +1270,12 @@
{
"url": "/dom/nodes/DOMImplementation-createHTMLDocument.js"
},
{
"url": "/dom/nodes/Document-Element-getElementsByTagName.js"
},
{
"url": "/dom/nodes/Document-Element-getElementsByTagNameNS.js"
},
{
"url": "/dom/nodes/Document-contentType/resources/blob.txt"
},
@ -1894,6 +1954,9 @@
{
"url": "/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/original-id.json"
},
{
"url": "/html/rendering/bindings/the-select-element-0/option-label-ref.html"
},
{
"url": "/html/rendering/interactive-media/links-forms-and-navigation/original-id.json"
},
@ -1912,6 +1975,9 @@
{
"url": "/html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html"
},
{
"url": "/html/rendering/non-replaced-elements/the-page/body_text_00ffff-ref.html"
},
{
"url": "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border-ref.xhtml"
},
@ -1951,6 +2017,9 @@
{
"url": "/html/semantics/document-metadata/the-meta-element/contains.json"
},
{
"url": "/html/semantics/document-metadata/the-style-element/html_style_in_comment-ref.html"
},
{
"url": "/html/semantics/embedded-content/image-maps/contains.json"
},
@ -2659,6 +2728,12 @@
{
"url": "/media/A4.ogv"
},
{
"url": "/media/foo.vtt"
},
{
"url": "/media/foo.vtt.headers"
},
{
"url": "/media/green-at-15.mp4"
},
@ -2830,9 +2905,6 @@
{
"url": "/pointerevents/pointerevent_support.js"
},
{
"url": "/progress-events/tests/submissions/Samsung/resources/img.jpg"
},
{
"url": "/progress-events/tests/submissions/Samsung/resources/no-content-length.py"
},
@ -2923,6 +2995,33 @@
{
"url": "/shadow-dom/testcommon.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-base64-encoded-sha-digests.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-correct-content-type.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-improper-integrity-uri-scheme.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-incorrect-content-type.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-matching-digest.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-non-matching-digest.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-unhyphenated-digest-name.js"
},
{
"url": "/subresource-integrity/loads-scripts-with-weak-digest-algorithms.js"
},
{
"url": "/subresource-integrity/tools/generate_javascript.py"
},
{
"url": "/touch-events/multi-touch-interactions.js"
},
@ -4338,6 +4437,18 @@
{
"url": "/battery-status/battery-unplugged-manual.html"
},
{
"url": "/gamepad/events-manual.html"
},
{
"url": "/gamepad/getgamepads-polling-manual.html"
},
{
"url": "/gamepad/idlharness-manual.html"
},
{
"url": "/gamepad/timestamp-manual.html"
},
{
"url": "/geolocation-API/getCurrentPosition_permission-manual.html"
},
@ -4986,6 +5097,9 @@
{
"url": "/pointerevents/pointerevent_touch-action-table-test_touch-manual.html"
},
{
"url": "/quirks-mode/active-and-hover-manual.html"
},
{
"url": "/touch-events/multi-touch-interactions-manual.html"
},
@ -5362,6 +5476,11 @@
"ref_url": "/html/editing/the-hidden-attribute/hidden-2-ref.svg",
"url": "/html/editing/the-hidden-attribute/hidden-2.svg"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/bindings/the-select-element-0/option-label-ref.html",
"url": "/html/rendering/bindings/the-select-element-0/option-label.html"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/non-replaced-elements/flow-content-0/figure-ref.html",
@ -5387,6 +5506,11 @@
"ref_url": "/html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html",
"url": "/html/rendering/non-replaced-elements/tables/table-width-150percent.html"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/non-replaced-elements/the-page/body_text_00ffff-ref.html",
"url": "/html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml"
},
{
"ref_type": "==",
"ref_url": "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border-ref.xhtml",
@ -5407,6 +5531,11 @@
"ref_url": "/html/rendering/replaced-elements/images/space-ref.html",
"url": "/html/rendering/replaced-elements/images/space.html"
},
{
"ref_type": "==",
"ref_url": "/html/semantics/document-metadata/the-style-element/html_style_in_comment-ref.html",
"url": "/html/semantics/document-metadata/the-style-element/html_style_in_comment.xhtml"
},
{
"ref_type": "==",
"ref_url": "/html/semantics/embedded-content/the-audio-element/audio_content-ref.htm",
@ -5657,6 +5786,26 @@
"ref_url": "/html/semantics/text-level-semantics/the-wbr-element/wbr-element-ref.html",
"url": "/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html"
},
{
"ref_type": "==",
"ref_url": "/quirks-mode/font-element-text-decoration-color/001-ref.html",
"url": "/quirks-mode/font-element-text-decoration-color/001-a.html"
},
{
"ref_type": "==",
"ref_url": "/quirks-mode/font-element-text-decoration-color/001-ref.html",
"url": "/quirks-mode/font-element-text-decoration-color/001-q.html"
},
{
"ref_type": "==",
"ref_url": "/quirks-mode/font-element-text-decoration-color/001-ref.html",
"url": "/quirks-mode/font-element-text-decoration-color/001-s.html"
},
{
"ref_type": "==",
"ref_url": "/quirks-mode/font-element-text-decoration-color/001-ref.html",
"url": "/quirks-mode/font-element-text-decoration-color/001-x.xhtml"
},
{
"ref_type": "==",
"ref_url": "/shadow-dom/shadow-trees/hosting-multiple-shadow-trees-002-ref.html",
@ -9170,9 +9319,6 @@
{
"url": "/DOMEvents/tests/approved/Determined.candidate.EventListeners.html"
},
{
"url": "/DOMEvents/tests/approved/Event.bubbles.false.html"
},
{
"url": "/DOMEvents/tests/approved/EventListener.dispatch.new.event.html"
},
@ -9215,9 +9361,6 @@
{
"url": "/DOMEvents/tests/submissions/Microsoft/converted/Determined.candidate.EventListeners.html"
},
{
"url": "/DOMEvents/tests/submissions/Microsoft/converted/Event.bubbles.false.html"
},
{
"url": "/DOMEvents/tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html"
},
@ -9899,6 +10042,12 @@
{
"url": "/IndexedDB/idbobjectstore_get5.htm"
},
{
"url": "/IndexedDB/idbobjectstore_get6.htm"
},
{
"url": "/IndexedDB/idbobjectstore_get7.htm"
},
{
"url": "/IndexedDB/idbobjectstore_index.htm"
},
@ -10034,6 +10183,15 @@
{
"url": "/IndexedDB/value_recursive.htm"
},
{
"url": "/WebIDL/ecmascript-binding/es-exceptions/DOMException-constants.html"
},
{
"url": "/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html"
},
{
"url": "/WebIDL/ecmascript-binding/es-exceptions/exceptions.html"
},
{
"url": "/XMLHttpRequest/FormData-append.html"
},
@ -10298,6 +10456,9 @@
{
"url": "/XMLHttpRequest/responsexml-non-well-formed.htm"
},
{
"url": "/XMLHttpRequest/security-consideration.sub.html"
},
{
"url": "/XMLHttpRequest/send-accept-language.htm"
},
@ -10571,6 +10732,9 @@
{
"url": "/battery-status/battery-interface.html"
},
{
"url": "/battery-status/battery-promise.html"
},
{
"url": "/content-security-policy/generic/generic-0_10.html"
},
@ -10595,6 +10759,27 @@
{
"url": "/content-security-policy/generic/generic-0_9.sub.html"
},
{
"url": "/content-security-policy/img-src/img-src-4_1.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_1.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_1_2.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_2.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_2_2.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_3.html"
},
{
"url": "/content-security-policy/media-src/media-src-7_3_2.html"
},
{
"url": "/content-security-policy/object-src/object-src-2_1.html"
},
@ -10604,6 +10789,12 @@
{
"url": "/content-security-policy/script-src/script-src-1_1.html"
},
{
"url": "/content-security-policy/script-src/script-src-1_10.html"
},
{
"url": "/content-security-policy/script-src/script-src-1_10_1.html"
},
{
"url": "/content-security-policy/script-src/script-src-1_2_1.html"
},
@ -10613,12 +10804,18 @@
{
"url": "/content-security-policy/script-src/script-src-1_4.html"
},
{
"url": "/content-security-policy/script-src/script-src-1_9.html"
},
{
"url": "/content-security-policy/style-src/style-src-3_1.html"
},
{
"url": "/content-security-policy/style-src/style-src-3_2.html"
},
{
"url": "/content-security-policy/style-src/style-src-3_3.html"
},
{
"url": "/content-security-policy/style-src/style-src-3_4.html"
},
@ -10844,12 +11041,6 @@
{
"url": "/dom/collections/HTMLCollection-empty-name.html"
},
{
"url": "/dom/errors/DOMException-constants.html"
},
{
"url": "/dom/errors/exceptions.html"
},
{
"url": "/dom/events/Event-constants.html"
},
@ -10859,6 +11050,9 @@
{
"url": "/dom/events/Event-defaultPrevented.html"
},
{
"url": "/dom/events/Event-dispatch-bubbles-false.html"
},
{
"url": "/dom/events/Event-dispatch-omitted-capture.html"
},
@ -10931,6 +11125,9 @@
{
"url": "/dom/nodes/DOMImplementation-hasFeature.html"
},
{
"url": "/dom/nodes/Document-URL.sub.html"
},
{
"url": "/dom/nodes/Document-adoptNode.html"
},
@ -11129,6 +11326,12 @@
{
"url": "/dom/nodes/Element-getElementsByClassName.html"
},
{
"url": "/dom/nodes/Element-getElementsByTagName.html"
},
{
"url": "/dom/nodes/Element-getElementsByTagNameNS.html"
},
{
"url": "/dom/nodes/Element-lastElementChild.html"
},
@ -11393,6 +11596,9 @@
{
"url": "/dom/traversal/TreeWalker-walking-outside-a-tree.html"
},
{
"url": "/domparsing/DOMParser-parseFromString-html.html"
},
{
"url": "/domparsing/insert-adjacent.html"
},
@ -11417,9 +11623,6 @@
{
"url": "/encoding/iso-2022-jp-encoder.html"
},
{
"url": "/encoding/single-byte-decoder.html"
},
{
"url": "/eventsource/dedicated-worker/eventsource-close.htm"
},
@ -11588,6 +11791,9 @@
{
"url": "/ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents/xhtml-pubid-1.html"
},
{
"url": "/gamepad/idlharness.html"
},
{
"url": "/geolocation-API/PositionOptions.html"
},
@ -12242,6 +12448,9 @@
{
"url": "/html/dom/elements/global-attributes/classlist-nonstring.html"
},
{
"url": "/html/dom/elements/global-attributes/custom-attrs.html"
},
{
"url": "/html/dom/elements/global-attributes/data_unicode_attr.html"
},
@ -13472,6 +13681,9 @@
{
"url": "/html/semantics/forms/constraints/inputwillvalidate.html"
},
{
"url": "/html/semantics/forms/form-control-infrastructure/form.html"
},
{
"url": "/html/semantics/forms/resetting-a-form/reset-form.html"
},
@ -15050,9 +15262,6 @@
{
"url": "/progress-events/tests/submissions/Samsung/firing-events-http-no-content-length.html"
},
{
"url": "/progress-events/tests/submissions/Samsung/security-consideration.sub.html"
},
{
"url": "/proximity/DeviceProximityEvent_tests.html"
},
@ -15509,6 +15718,9 @@
{
"url": "/shadow-dom/user-interaction/ranges-and-selections/test-002.html"
},
{
"url": "/subresource-integrity/subresource-integrity.html"
},
{
"url": "/touch-events/create-touch-touchlist.html"
},
@ -15596,6 +15808,15 @@
{
"url": "/web-animations/animation-node/animation-node-before.html"
},
{
"url": "/web-animations/animation-node/animation-node-next-sibling.html"
},
{
"url": "/web-animations/animation-node/animation-node-parent.html"
},
{
"url": "/web-animations/animation-node/animation-node-previous-sibling.html"
},
{
"url": "/web-animations/animation-node/animation-node-remove.html"
},
@ -15605,6 +15826,12 @@
{
"url": "/web-animations/animation-node/idlharness.html"
},
{
"url": "/web-animations/animation-timeline/animation-timeline.html"
},
{
"url": "/web-animations/animation-timeline/idlharness.html"
},
{
"url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html"
},
@ -15896,6 +16123,9 @@
{
"url": "/webmessaging/without-ports/028.html"
},
{
"url": "/webmessaging/without-ports/029.html"
},
{
"url": "/webrtc/simplecall.html"
},
@ -17259,6 +17489,10 @@
"timeout": "long",
"url": "/dom/traversal/NodeIterator.html"
},
{
"timeout": "long",
"url": "/encoding/single-byte-decoder.html"
},
{
"timeout": "long",
"url": "/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm"
@ -17694,6 +17928,6 @@
"deleted": [],
"items": {}
},
"rev": "fdbdabd4c8adb385e19f541cd03f1832b1aea468",
"rev": "a84b794c43954b4465eb9b967cc934875952fc40",
"url_base": "/"
}

View File

@ -1,64 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title> Event.bubbles attribute is set to false </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<table id="table" border="1" style="display: none">
<tbody id="table-body">
<tr id="table-row">
<td id="table-cell">Shady Grove</td>
<td>Aeolian</td>
</tr>
<tr id="parent">
<td id="target">Over the river, Charlie</td>
<td>Dorian</td>
</tr>
</tbody>
</table>
<script>
var EVENT = "click";
var TARGET = document.getElementById("target");
var PARENT = document.getElementById("parent");
var TBODY = document.getElementById("table-body");
var TABLE = document.getElementById("table");
var BODY = document.body;
var HTML = document.documentElement;
var CurrentTargets = [window, document, HTML, BODY, TABLE, TBODY, PARENT, TARGET];
var ExpectResult = CurrentTargets.concat(TARGET);
var ActualResult = [];
var ExpectPhases = [1,1,1,1,1,1,1,2,2];
var ActualPhases = [];
var description = "Test Description: If the Event.bubbles attribute is set to false, the bubble phase shall be skipped.";
test(function()
{
for (var i=0; i < CurrentTargets.length; i++)
{
CurrentTargets[i].addEventListener(EVENT, TestEvent, true);
CurrentTargets[i].addEventListener(EVENT, TestEvent, false);
}
var evt = document.createEvent("Event");
evt.initEvent(EVENT, false, true);
TARGET.dispatchEvent(evt);
assert_array_equals(ActualResult, ExpectResult, "ActualResult");
assert_array_equals(ActualPhases, ExpectPhases, "ActualPhases");
}, description);
function TestEvent(evt)
{
ActualResult.push(evt.currentTarget);
ActualPhases.push(evt.eventPhase);
}
</script>
</body>
</html>

View File

@ -1,65 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title> Event.bubbles attribute is set to false </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<table id="table" border="1" style="display: none">
<tbody id="table-body">
<tr id="table-row">
<td id="table-cell">Shady Grove</td>
<td>Aeolian</td>
</tr>
<tr id="parent">
<td id="target">Over the river, Charlie</td>
<td>Dorian</td>
</tr>
</tbody>
</table>
<script>
var EVENT = "click";
var TARGET = document.getElementById("target");
var PARENT = document.getElementById("parent");
var TBODY = document.getElementById("table-body");
var TABLE = document.getElementById("table");
var BODY = document.body;
var HTML = document.documentElement;
var CurrentTargets = [window, document, HTML, BODY, TABLE, TBODY, PARENT, TARGET];
var ExpectResult = CurrentTargets.concat(TARGET);
var ActualResult = [];
var ExpectPhases = [1,1,1,1,1,1,1,2,2];
var ActualPhases = [];
var description = "Test Description: If the Event.bubbles attribute is set to false, the bubble phase shall be skipped.";
test(function()
{
for (var i=0; i < CurrentTargets.length; i++)
{
CurrentTargets[i].addEventListener(EVENT, TestEvent, true);
CurrentTargets[i].addEventListener(EVENT, TestEvent, false);
}
var evt = document.createEvent("Event");
evt.initEvent(EVENT, false, true);
TARGET.dispatchEvent(evt);
assert_array_equals(ActualResult, ExpectResult, "ActualResult");
assert_array_equals(ActualPhases, ExpectPhases, "ActualPhases");
}, description);
function TestEvent(evt)
{
ActualResult.push(evt.currentTarget);
ActualPhases.push(evt.eventPhase);
}
</script>
</body>
</html>

View File

@ -1,13 +1,14 @@
<!doctype html>
<meta charset=utf-8>
<title>DOMException constants</title>
<link rel=help href="https://dom.spec.whatwg.org/#domexception">
<link rel=help href="https://heycam.github.io/webidl/#es-exception-constants">
<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-constructor-object">
<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-prototype-object">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=27732
var constants = [
"INDEX_SIZE_ERR",
"DOMSTRING_SIZE_ERR",
@ -35,14 +36,21 @@ test(function() {
"INVALID_NODE_TYPE_ERR",
"DATA_CLONE_ERR"
]
var objects = [
[DOMException, "DOMException constructor object"],
[DOMException.prototype, "DOMException prototype object"]
]
constants.forEach(function(name, i) {
test(function() {
assert_equals(DOMException[name], i + 1, name)
var pd = Object.getOwnPropertyDescriptor(DOMException, name)
assert_equals(pd.writable, false, "not writable")
assert_equals(pd.enumerable, true, "enumerable")
assert_equals(pd.configurable, false, "not configurable")
}, "Constant: " + name)
objects.forEach(function(o) {
var object = o[0], description = o[1];
test(function() {
assert_equals(object[name], i + 1, name)
var pd = Object.getOwnPropertyDescriptor(object, name)
assert_equals(pd.writable, false, "not writable")
assert_equals(pd.enumerable, true, "enumerable")
assert_equals(pd.configurable, false, "not configurable")
}, "Constant " + name + " on " + description)
})
})
})
</script>

View File

@ -0,0 +1,73 @@
<!doctype html>
<meta charset=utf-8>
<title>DOMException constructor</title>
<link rel=help href="https://heycam.github.io/webidl/#es-DOMException-constructor-object">
<link rel=help href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-error.prototype.message">
<link rel=help href="https://people.mozilla.org/~jorendorff/es6-draft.html#sec-error.prototype.name">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
var ex = new DOMException();
assert_equals(ex.name, "Error",
"Not passing a name should end up with 'Error' as the name");
assert_equals(ex.message, "",
"Not passing a message should end up with empty string as the message");
}, 'new DOMException()');
test(function() {
var ex = new DOMException();
assert_false(ex.hasOwnProperty("name"),
"The name property should be inherited");
assert_false(ex.hasOwnProperty("message"),
"The message property should be inherited");
}, 'new DOMException(): own-ness');
test(function() {
var ex = new DOMException(undefined);
assert_equals(ex.name, "Error",
"Not passing a name should end up with 'Error' as the name");
assert_equals(ex.message, "",
"Not passing a message should end up with empty string as the message");
}, 'new DOMException(undefined)');
test(function() {
var ex = new DOMException(undefined);
assert_false(ex.hasOwnProperty("name"),
"The name property should be inherited");
assert_false(ex.hasOwnProperty("message"),
"The message property should be inherited");
}, 'new DOMException(undefined): own-ness');
test(function() {
var ex = new DOMException("foo");
assert_equals(ex.name, "Error",
"Not passing a name should still end up with 'Error' as the name");
assert_equals(ex.message, "foo", "Should be using passed-in message");
}, 'new DOMException("foo")');
test(function() {
var ex = new DOMException("foo");
assert_false(ex.hasOwnProperty("name"),
"The name property should be inherited");
assert_true(ex.hasOwnProperty("message"),
"The message property should be own");
}, 'new DOMException("foo"): own-ness');
test(function() {
var ex = new DOMException("bar", "NotSupportedError");
assert_equals(ex.name, "NotSupportedError", "Should be using the passed-in name");
assert_equals(ex.message, "bar", "Should still be using passed-in message");
assert_equals(ex.code, DOMException.NOT_SUPPORTED_ERR,
"Should have the right exception code");
}, 'new DOMException("bar", "NotSupportedError")');
test(function() {
var ex = new DOMException("bar", "NotSupportedError");
assert_true(ex.hasOwnProperty("name"),
"The name property should be own");
assert_true(ex.hasOwnProperty("message"),
"The message property should be own");
}, 'new DOMException("bar", "NotSupportedError"): own-ness');
</script>

View File

@ -0,0 +1,136 @@
<!doctype html>
<title>DOMException-throwing tests</title>
<link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
/**
* This file just picks one case where browsers are supposed to throw an
* exception, and tests the heck out of whether it meets the spec. In the
* future, all these checks should be in assert_throws(), but we don't want
* every browser failing every assert_throws() check until they fix every
* single bug in their exception-throwing.
*
* We don't go out of our way to test everything that's already tested by
* interfaces.html, like whether all constants are present on the object, but
* some things are duplicated.
*/
setup({explicit_done: true});
function testException(exception, global, desc) {
// https://heycam.github.io/webidl/#es-exception-objects
// (as of 2015-01-03): "The value of the internal [[Prototype]] property of a
// DOMException object MUST be the DOMException prototype object from the
// global environment the exception object is associated with."
test(function() {
assert_equals(global.Object.getPrototypeOf(exception),
global.DOMException.prototype);
}, desc + "Object.getPrototypeOf(exception) === DOMException.prototype");
// https://heycam.github.io/webidl/#es-creating-throwing-exceptions
// (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
// passing “name”, Property Descriptor { [[Value]]: /N/, [[Writable]]: true,
// [[Enumerable]]: true, [[Configurable]]: true }, and false as arguments."
test(function() {
assert_true(exception.hasOwnProperty("name"));
}, desc + "exception.hasOwnProperty(\"name\")");
test(function() {
assert_equals(exception.name, "HierarchyRequestError");
}, desc + "exception.name === \"HierarchyRequestError\"");
test(function() {
var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
assert_true(desc.writable, "must be writable");
assert_true(desc.enumerable, "must be enumerable");
assert_true(desc.configurable, "must be configurable");
}, desc + "Object.getOwnPropertyDescriptor(exception, \"name\")");
// https://heycam.github.io/webidl/#es-creating-throwing-exceptions
// (as of 2015-01-03): "If the optional user agent-defined message /M/ was
// specified, then this list has a single element whose value is the result
// of converting /M/ to a String value. Otherwise, the list is empty."
//
// https://heycam.github.io/webidl/#es-DOMException-constructor-object
// (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
// passing “message”, Property Descriptor { [[Value]]: /S/,
// [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }, and
// false as arguments."
test(function() {
if (exception.hasOwnProperty("message")) {
var desc = global.Object.getOwnPropertyDescriptor(exception, "message");
assert_true(desc.writable, "must be writable");
assert_false(desc.enumerable, "must not be enumerable");
assert_true(desc.configurable, "must be configurable");
}
}, desc + "Object.getOwnPropertyDescriptor(exception, \"message\")");
test(function() {
if (exception.hasOwnProperty("message")) {
// Can't test anything more specific, since it's implementation-defined :(
assert_equals(typeof exception.message, "string");
} else {
// Error.prototype.message
assert_equals(exception.message, "");
}
}, desc + "typeof exception.message === \"string\"");
// https://heycam.github.io/webidl/#es-exception-objects
// (as of 2015-01-03): "The class string of a DOMException object MUST be
// “DOMException”."
test(function() {
assert_equals(global.Object.prototype.toString.call(exception),
"[object DOMException]");
}, desc + "Object.prototype.toString.call(exception) === \"[object DOMException]\"");
// https://heycam.github.io/webidl/#es-creating-throwing-exceptions
// (as of 2015-01-03): "Call the [[DefineOwnProperty]] internal method of /O/
// passing “code”, Property Descriptor { [[Value]]: /code/,
// [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true }, and
// false as arguments."
test(function() {
assert_equals(exception.code, global.DOMException.HIERARCHY_REQUEST_ERR);
}, desc + "exception.code === DOMException.HIERARCHY_REQUEST_ERR");
test(function() {
var desc = global.Object.getOwnPropertyDescriptor(exception, "name");
assert_true(desc.writable, "must be writable");
assert_true(desc.enumerable, "must be enumerable");
assert_true(desc.configurable, "must be configurable");
}, desc + "Object.getOwnPropertyDescriptor(exception, \"code\")");
}
// Test in current window
var exception = null;
try {
// This should throw a HierarchyRequestError in every browser since the
// Stone Age, so we're really only testing exception-throwing details.
document.documentElement.appendChild(document);
} catch(e) {
exception = e;
}
testException(exception, window, "");
// Test in iframe
var iframe = document.createElement("iframe");
iframe.src = "about:blank";
iframe.onload = function() {
var exception = null;
try {
iframe.contentDocument.documentElement.appendChild(iframe.contentDocument);
} catch(e) {
exception = e;
}
testException(exception, iframe.contentWindow, "In iframe: ");
document.body.removeChild(iframe);
done();
};
document.body.appendChild(iframe);
</script>

View File

@ -1,100 +0,0 @@
<!doctype html>
<title>DOMException-throwing tests</title>
<link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
/**
* This file just picks one case where browsers are supposed to throw an
* exception, and tests the heck out of whether it meets the spec. In the
* future, all these checks should be in assert_throws(), but we don't want
* every browser failing every assert_throws() check until they fix every
* single bug in their exception-throwing.
*
* We don't go out of our way to test everything that's already tested by
* interfaces.html, like whether all constants are present on the object, but
* some things are duplicated.
*/
setup({explicit_done: true});
function testException(exception, global, desc) {
test(function() {
assert_equals(global.Object.getPrototypeOf(exception),
global.DOMException.prototype);
}, desc + "Object.getPrototypeOf(exception) === DOMException.prototype");
test(function() {
// WebIDL 4.9.2 as of September 28, 2012: "There must be a property named
// “name” on the exception interface prototype object with attributes {
// [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } and
// whose value is the identifier of the exception." Thus, this is
// inherited, not own.
assert_false(exception.hasOwnProperty("name"));
}, desc + "!exception.hasOwnProperty(\"name\")");
test(function() {
assert_equals(exception.name, "HierarchyRequestError");
}, desc + "exception.name === \"HierarchyRequestError\"");
test(function() {
// WebIDL 4.9.1.1 as of September 28, 2012: "Call the [[DefineOwnProperty]]
// internal method of O passing “message”, Property Descriptor { [[Value]]:
// S, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true },
// and false as arguments." Thus, this is an own property.
assert_true(exception.hasOwnProperty("message"));
}, desc + "exception.hasOwnProperty(\"message\")");
test(function() {
var desc = global.Object.getOwnPropertyDescriptor(exception, "message");
assert_true(desc.writable, "must be writable");
assert_false(desc.enumerable, "must not be enumerable");
assert_true(desc.configurable, "must be configurable");
}, desc + "Object.getOwnPropertyDescriptor(exception, \"message\")");
test(function() {
// Can't test anything more specific, since it's implementation-defined :(
assert_equals(typeof exception.message, "string");
}, desc + "typeof exception.message === \"string\"");
test(function() {
// WebIDL: "The class string of the exception object must be the identifier
// of the exception."
assert_equals(global.Object.prototype.toString.call(exception),
"[object DOMException]");
}, desc + "Object.prototype.toString.call(exception) === \"[object DOMException]\"");
test(function() {
assert_equals(exception.code, global.DOMException.HIERARCHY_REQUEST_ERR);
}, desc + "exception.code === DOMException.HIERARCHY_REQUEST_ERR");
}
// Test in current window
var exception = null;
try {
// This should throw a HierarchyRequestError in every browser since the
// Stone Age, so we're really only testing exception-throwing details.
document.documentElement.appendChild(document);
} catch(e) {
exception = e;
}
testException(exception, window, "");
// Test in iframe
var iframe = document.createElement("iframe");
iframe.src = "about:blank";
iframe.onload = function() {
var exception = null;
try {
iframe.contentDocument.documentElement.appendChild(iframe.contentDocument);
} catch(e) {
exception = e;
}
testException(exception, iframe.contentWindow, "In iframe: ");
document.body.removeChild(iframe);
done();
};
document.body.appendChild(iframe);
</script>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title> Event.bubbles attribute is set to false </title>
<link rel="help" href="https://dom.spec.whatwg.org/#dom-event-initevent">
<link rel="help" href="https://dom.spec.whatwg.org/#concept-event-dispatch">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<table id="table" border="1" style="display: none">
<tbody id="table-body">
<tr id="table-row">
<td id="table-cell">Shady Grove</td>
<td>Aeolian</td>
</tr>
<tr id="parent">
<td id="target">Over the river, Charlie</td>
<td>Dorian</td>
</tr>
</tbody>
</table>
<script>
test(function() {
var event_type = "click";
var target = document.getElementById("target");
var targets = [
window,
document,
document.documentElement,
document.body,
document.getElementById("table"),
document.getElementById("table-body"),
document.getElementById("parent"),
target,
];
var expected_targets = targets.concat(target);
var phases = [
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.CAPTURING_PHASE,
Event.AT_TARGET,
Event.AT_TARGET,
];
var actual_targets = [], actual_phases = [];
var test_event = function(evt) {
actual_targets.push(evt.currentTarget);
actual_phases.push(evt.eventPhase);
}
for (var i = 0; i < targets.length; i++) {
targets[i].addEventListener(event_type, test_event, true);
targets[i].addEventListener(event_type, test_event, false);
}
var evt = document.createEvent("Event");
evt.initEvent(event_type, false, true);
target.dispatchEvent(evt);
assert_array_equals(actual_targets, expected_targets, "targets");
assert_array_equals(actual_phases, phases, "phases");
}, "Event.dispatchEvent with Event.bubbles set to false.");
</script>

View File

@ -207,7 +207,8 @@
{input:'outline-width:1', prop:'outline-width'},
];
var other_template = "#test{position:relative;outline-style:solid;{test}}";
var other_template = "#test{position:relative;outline-style:solid;{test}}" +
"#ref{outline-style:solid}";
other_tests.forEach(function(t) {
test(function() {

View File

@ -20,55 +20,28 @@
</header>
<div class="container">
<h2>Running Tests</h2>
<p>
This <em>Test Runner</em> runs some set of
<a href="https://github.com/w3c/web-platform-tests/blob/master/README.md">web-platform-tests</a>
tests. The set of tests run is configurable via the <em>path</em> field below. Some examples
path values are:
<ul>
<li><code>/</code> - runs all of the tests from the root down</li>
<li><code>/websockets</code> - runs all of the
<a href="http://w3c-test.org/websockets/">websockets</a> tests</li>
<li><code>/websockets/constructor</code> - runs all of the
<a href="http://w3c-test.org/websockets/constructor/">websockets/constructor</a> tests</li>
<li><code>/html/syntax/parsing</code> - runs all of the HTML syntax parsing tests
<a href="http://w3c-test.org/html/syntax/parsing/">html/syntax/parsing</a> tests</li>
</ul>
<p>
If the test runner is run online, the set of tests available to run can be found in the
<a href="http://w3c-test.org/">w3c-test.org</a> test repository.
<p>
Tests will run in a new window. For reftests and manual tests it is recommended to have that
window and this window side by side.
<div id="testControl" class="panel panel-default">
<div class='panel-heading'>
<h2 class='panel-title'>Runner Options</h2>
</div>
<div class="panel-body">
<form id='options' class='horizontal-form' onsubmit='return false;'>
<p>Include test types:</p>
<div class="form-group">
<label for="th" class="col-sm-3 control-label">JavaScript tests</label>
<label class="col-sm-3 control-label">Test types to include</label>
<div class="col-sm-9">
<input type=checkbox checked value="testharness" id='th' class='test-type'>
</div>
</div>
<div class="form-group">
<label for="ref" class="col-sm-3 control-label">Reference tests</label>
<div class="col-sm-9">
<input type=checkbox checked value="reftest" id='ref' class='test-type'>
</div>
</div>
<div class="form-group">
<label for="man" class="col-sm-3 control-label">Manual tests</label>
<div class="col-sm-9">
<input type=checkbox checked value="manual" id='man' class='test-type'>
<label>
<input type=checkbox checked value="testharness" id='th' class='test-type'>
JavaScript tests
</label>
<label>
<input type=checkbox checked value="reftest" id='ref' class='test-type'>
Reftests
</label>
<label>
<input type=checkbox checked value="manual" id='man' class='test-type'>
Manual tests
</label>
</div>
</div>
<div class="form-group">
<label for="path" class="col-sm-3 control-label">Run tests under path</label>
<div class="col-sm-9">
@ -77,27 +50,27 @@
</div>
<div class="form-group">
<label for="timeout_multiplier" class="col-sm-3 control-label">Timeout Multiplier</label>
<label for="timeout_multiplier" class="col-sm-3 control-label">Timeout multiplier</label>
<div class="col-sm-9">
<input type=number value="1" id='timeout_multiplier' class='timeout_multiplier form-control'>
</div>
</div>
<div class="form-group">
<label for="render" class="col-sm-3 control-label">Show output (debug)</label>
<label class="col-sm-3 control-label">Debug options</label>
<div class="col-sm-9">
<input type=checkbox id='render' value='render' class='render'>
<label>
<input type=checkbox id='render' value='render' class='render'>
Show output
</label>
<label>
<input type=checkbox id='dumpit'>
Dump JSON
</label>
</div>
</div>
<div class="form-group">
<label for="dumpit" class="col-sm-3 control-label">Dump JSON (debug)</label>
<div class="col-sm-9">
<input type=checkbox id='dumpit'>
</div>
</div>
<div class="form-group" style='padding-top: 20px'>
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-success toggleStart" disabled>Start</button>
<button type='submit' class="btn btn-info togglePause" disabled>Pause</button>
@ -107,10 +80,33 @@
</div>
</div>
<div class="instructions">
<p>
To run a set of
<a href="https://github.com/w3c/web-platform-tests/blob/master/README.md">web-platform-tests</a>
tests, specify a path value in the <b>Run tests under path</b> field above. Example paths:
<ul>
<li><code>/</code> - runs all of the tests from the root down</li>
<li><code>/websockets</code> - runs all of the
<a href="http://w3c-test.org/websockets/">websockets</a> tests</li>
<li><code>/websockets/constructor</code> - runs all of the
<a href="http://w3c-test.org/websockets/constructor/">websockets/constructor</a> tests</li>
<li><code>/html/syntax/parsing</code> - runs all of the
<a href="http://w3c-test.org/html/syntax/parsing/">html/syntax/parsing</a> tests</li>
</ul>
<p>
If the test runner is run online, the set of tests available to run can be found in the
<a href="http://w3c-test.org/">w3c-test.org</a> test repository.
<p>
Tests will run in a new window. For reftests and manual tests its best
to put that window side-by-side with this one.
</div>
<div id="output">
<div class="summary clearfix">
<h4>Progress</h4>
<div id="manifest">Updating and loading test manifest</div>
<h4>Progress
<span id="manifest">updating and loading test manifest; this may take several minutes</span>
</h4>
<div class="progress">
<div class="progress-bar" role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="0" style="width: 0">

View File

@ -130,7 +130,7 @@ body {
}
.horizontal-form .form-group {
padding-bottom: 15px;
padding: 6px;
}
header.navbar-inverse {
@ -160,3 +160,34 @@ td.ERROR {
.stopped {
background-image: linear-gradient(to bottom, #fc0000 0, #770000 100%);
}
.col-sm-9 label {
margin-right: 20px;
}
.instructions {
padding-left: 8px;
padding-right: 8px;
}
@keyframes alert_updating {
from {
background-color: inherit;
}
to {
background-color: #ffc;
}
}
#manifest {
padding-left: 6px;
padding-right: 6px;
font-size: 80%;
font-weight: normal;
font-style: italic;
color: #999;
animation-duration: 1.5s;
animation-name: alert_updating;
animation-iteration-count: infinite;
animation-direction: alternate;
}

View File

@ -131,6 +131,7 @@ function VisualOutput(elem, runner) {
this.meter = this.progress.querySelector(".progress-bar");
this.result_count = null;
this.json_results_area = this.elem.querySelector("textarea");
this.instructions = document.querySelector(".instructions");
this.elem.style.display = "none";
this.runner.manifest_wait_callbacks.push(this.on_manifest_wait.bind(this));
@ -163,12 +164,14 @@ VisualOutput.prototype = {
on_manifest_wait: function() {
this.clear();
this.instructions.style.display = "none";
this.elem.style.display = "block";
this.manifest_status.style.display = "block";
this.manifest_status.style.display = "inline";
},
on_start: function() {
this.clear();
this.instructions.style.display = "none";
this.elem.style.display = "block";
this.meter.classList.remove("stopped");
this.meter.classList.add("progress-striped", "active");