Skip to content
Permalink
Browse files
Update LayoutTests/resources/testharness.js to 2021-6-24 version
https://bugs.webkit.org/show_bug.cgi?id=235398
<rdar://problem/88126222>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-30
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update tests to accommodate the API change:
 - assert_throws_js check that the exception is of a particular JS
   exception type
 - assert_throws_dom check that the exception is of a particular
   DOMException type from a particular global object.
 - assert_throws_exactly check that the exception is a specific
   object.

* IndexedDB-private-browsing/close-in-upgradeneeded.html:
* IndexedDB-private-browsing/idbcursor-advance-invalid.html:
* IndexedDB-private-browsing/idbcursor_advance_index2.html:
* IndexedDB-private-browsing/idbcursor_advance_index3.html:
* IndexedDB-private-browsing/idbcursor_advance_index6.html:
* IndexedDB-private-browsing/idbcursor_advance_index7.html:
* IndexedDB-private-browsing/idbcursor_advance_index8.html:
* IndexedDB-private-browsing/idbcursor_advance_index9.html:
* IndexedDB-private-browsing/idbcursor_advance_objectstore2.html:
* IndexedDB-private-browsing/idbcursor_advance_objectstore3.html:
* IndexedDB-private-browsing/idbcursor_advance_objectstore4.html:
* IndexedDB-private-browsing/idbcursor_advance_objectstore5.html:
* IndexedDB-private-browsing/idbcursor_continue_index2.html:
* IndexedDB-private-browsing/idbcursor_continue_index3.html:
* IndexedDB-private-browsing/idbcursor_continue_index4.html:
* IndexedDB-private-browsing/idbcursor_continue_index7.html:
* IndexedDB-private-browsing/idbcursor_continue_index8.html:
* IndexedDB-private-browsing/idbcursor_continue_invalid.html:
* IndexedDB-private-browsing/idbcursor_continue_objectstore2.html:
* IndexedDB-private-browsing/idbcursor_continue_objectstore3.html:
* IndexedDB-private-browsing/idbcursor_continue_objectstore4.html:
* IndexedDB-private-browsing/idbcursor_continue_objectstore5.html:
* IndexedDB-private-browsing/idbcursor_continue_objectstore6.html:
* IndexedDB-private-browsing/idbcursor_delete_index2.html:
* IndexedDB-private-browsing/idbcursor_delete_index3.html:
* IndexedDB-private-browsing/idbcursor_delete_index4.html:
* IndexedDB-private-browsing/idbcursor_delete_index5.html:
* IndexedDB-private-browsing/idbcursor_delete_objectstore2.html:
* IndexedDB-private-browsing/idbcursor_delete_objectstore3.html:
* IndexedDB-private-browsing/idbcursor_delete_objectstore4.html:
* IndexedDB-private-browsing/idbcursor_delete_objectstore5.html:
* IndexedDB-private-browsing/idbcursor_update_index2.html:
* IndexedDB-private-browsing/idbcursor_update_index3.html:
* IndexedDB-private-browsing/idbcursor_update_index4.html:
* IndexedDB-private-browsing/idbcursor_update_index5.html:
* IndexedDB-private-browsing/idbcursor_update_index6.html:
* IndexedDB-private-browsing/idbcursor_update_index7.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore2.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore3.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore5.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore6.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore7.html:
* IndexedDB-private-browsing/idbcursor_update_objectstore8.html:
* IndexedDB-private-browsing/idbdatabase_createObjectStore11.html:
* IndexedDB-private-browsing/idbdatabase_createObjectStore3.html:
* IndexedDB-private-browsing/idbdatabase_createObjectStore4.html:
* IndexedDB-private-browsing/idbdatabase_createObjectStore6.html:
* IndexedDB-private-browsing/idbdatabase_createObjectStore9-invalidparameters.html:
* IndexedDB-private-browsing/idbdatabase_deleteObjectStore2.html:
* IndexedDB-private-browsing/idbdatabase_deleteObjectStore3.html:
* IndexedDB-private-browsing/idbdatabase_deleteObjectStore4-not_reused.html:
* IndexedDB-private-browsing/idbdatabase_transaction.html:
* IndexedDB-private-browsing/idbdatabase_transaction3.html:
* IndexedDB-private-browsing/idbdatabase_transaction4.html:
* IndexedDB-private-browsing/idbdatabase_transaction5.html:
* IndexedDB-private-browsing/idbfactory_cmp2.html:
* IndexedDB-private-browsing/idbfactory_open9.html:
* IndexedDB-private-browsing/idbindex-multientry-arraykeypath.html:
* IndexedDB-private-browsing/idbindex_count4.html:
* IndexedDB-private-browsing/idbindex_get5.html:
* IndexedDB-private-browsing/idbindex_get6.html:
* IndexedDB-private-browsing/idbindex_get7.html:
* IndexedDB-private-browsing/idbindex_getKey5.html:
* IndexedDB-private-browsing/idbindex_getKey6.html:
* IndexedDB-private-browsing/idbindex_getKey7.html:
* IndexedDB-private-browsing/idbindex_openCursor.html:
* IndexedDB-private-browsing/idbindex_openCursor2.html:
* IndexedDB-private-browsing/idbindex_openKeyCursor.html:
* IndexedDB-private-browsing/idbindex_openKeyCursor2.html:
* IndexedDB-private-browsing/idbindex_openKeyCursor3.html:
* IndexedDB-private-browsing/idbkeyrange_incorrect.html:
* IndexedDB-private-browsing/idbobjectstore_add10.html:
* IndexedDB-private-browsing/idbobjectstore_add11.html:
* IndexedDB-private-browsing/idbobjectstore_add12.html:
* IndexedDB-private-browsing/idbobjectstore_add13.html:
* IndexedDB-private-browsing/idbobjectstore_add15.html:
* IndexedDB-private-browsing/idbobjectstore_add16.html:
* IndexedDB-private-browsing/idbobjectstore_add9.html:
* IndexedDB-private-browsing/idbobjectstore_clear3.html:
* IndexedDB-private-browsing/idbobjectstore_clear4.html:
* IndexedDB-private-browsing/idbobjectstore_count4.html:
* IndexedDB-private-browsing/idbobjectstore_createIndex10.html:
* IndexedDB-private-browsing/idbobjectstore_createIndex11.html:
* IndexedDB-private-browsing/idbobjectstore_createIndex12.html:
* IndexedDB-private-browsing/idbobjectstore_createIndex13.html:
* IndexedDB-private-browsing/idbobjectstore_delete6.html:
* IndexedDB-private-browsing/idbobjectstore_delete7.html:
* IndexedDB-private-browsing/idbobjectstore_deleteIndex.html:
* IndexedDB-private-browsing/idbobjectstore_deleted.html:
* IndexedDB-private-browsing/idbobjectstore_get6.html:
* IndexedDB-private-browsing/idbobjectstore_get7.html:
* IndexedDB-private-browsing/idbobjectstore_openCursor_invalid.html:
* IndexedDB-private-browsing/idbobjectstore_put10.html:
* IndexedDB-private-browsing/idbobjectstore_put11.html:
* IndexedDB-private-browsing/idbobjectstore_put12.html:
* IndexedDB-private-browsing/idbobjectstore_put13.html:
* IndexedDB-private-browsing/idbobjectstore_put15.html:
* IndexedDB-private-browsing/idbobjectstore_put16.html:
* IndexedDB-private-browsing/idbobjectstore_put9.html:
* IndexedDB-private-browsing/key_invalid.html:
* IndexedDB-private-browsing/keypath_invalid.html:
* IndexedDB-private-browsing/transaction-create_in_versionchange.html:

LayoutTests:

Copy testharness.js from imported/w3c/web-platform-tests

Copy idlharness.js from imported/w3c/web-platform-tests because it uses
the new testharness.js APIs.

Copy webidl2.js from imported/w3c/web-platform-tests to resources/WebIDLParser.js
because idlharness uses new webidl2.js logic.

Delete testharness.css, it is now bundled in testharness.js.

Update tests to accommodate the API change:
 - assert_throws_js check that the exception is of a particular JS
   exception type
 - assert_throws_dom check that the exception is of a particular
   DOMException type from a particular global object.
 - assert_throws_exactly check that the exception is a specific
   object.

Previously assert_throws was used and it hid unexpected exception errors.

Same for promise_rejects_*

async_test(f) now warns if f is not a normal function.

Singl page tests need a setup function.

* animations/animation-direction-normal.html:
* animations/animation-direction-reverse.html:
* animations/change-keyframes-name.html:
* animations/play-state-paused.html:
async_test(async function {...}) is incorrect (async test expects normal
function that has asynchronous logic, not a function returning a promise.
Use correct form:
promise_test(async function { ... });

* css-custom-properties-api/registerProperty.html:
Update exception expectation functions.

* editing/pasteboard/datatransfer-idl-expected.txt:
* editing/pasteboard/datatransfer-idl.html:
Update the datatransfer related idls from source, otherwise
tests fail (harness now tests for constructor).
Update the results.

* editing/text-iterator/count-matches-in-frames.html:
* editing/text-iterator/hidden-textarea-selection-quirk.html:
* fast/canvas/webgl/webgl2/bindings.html:
* fast/custom-elements/defined-pseudo-class.html:
* fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html:
* fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html:
* fast/dom/document-all.html:
* fast/dom/elementFromPoint-parameters.html:
* fast/dom/replaceable-setter-throws-if-defineownproperty-fails.html:
* fast/dom/window-opener-setter-throws-if-defineownproperty-fails-1.html:
* fast/dom/window-opener-setter-throws-if-defineownproperty-fails-2.html:
* fast/events/clipboard-event-constructor.html:
* fast/files/workers/resources/worker-file-reader-sync-bad-parameter.js:
* fast/files/xhr-blob-request.html:
* fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions.html:
* fast/mediasession/metadata/artworkdownload.html:
* fast/mediastream/screencapture-user-gesture.html:
* fetch/fetch-url-serialization.html:
* http/tests/fetch/fetching-same-resource-with-different-options.html:
* http/tests/fetch/redirectmode-and-preload.html:
* http/tests/navigation/pushstate-at-unique-origin-denied.py:
* http/tests/notifications/notification.html:
* http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
* http/tests/paymentrequest/payment-is-showing.https.html:
* http/tests/paymentrequest/payment-request-abort-method.https.html:
* http/tests/paymentrequest/payment-request-canmakepayment-method.https.html:
* http/tests/paymentrequest/payment-request-merchant-validation.https.html:
* http/tests/paymentrequest/payment-request-show-method.https.html:
* http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* http/tests/paymentrequest/payment-response-retry-method.https.html:
* http/tests/paymentrequest/rejects_if_not_active.https.html:
* http/tests/paymentrequest/updateWith-method-pmi-handling.https.html:
* http/tests/security/bypassing-cors-checks-for-extension-urls.html:
* http/tests/security/clean-origin-css-exposed-resource-timing.html:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-xfo.html:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-default-src.html:
* http/tests/security/contentSecurityPolicy/1.1/stylehash-default-src.html:
* http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
* http/tests/security/cross-origin-clean-css-resource-timing.html:
* http/tests/security/cross-origin-css-resource-timing.html:
* http/tests/subresource-integrity/sri-fetch.js:
* http/tests/workers/service/service-worker-crossorigin-fetch.html:
* http/tests/xmlhttprequest/set-bad-headervalue.html:
* intersection-observer/intersection-observer-interface.html:
* js/dom/dom-getters-type-check.html:
* js/dom/legacy-platform-object-defineOwnProperty.html:
* js/dom/post-message-symbol.html:
* js/dom/queue-microtask-window.html:
* media/track/opera/interfaces/TextTrackCue/vertical.html:
* media/track/opera/resources/idlharness.js:
* media/track/texttrackcue/texttrackcue-constructor.html:
* media/track/w3c/interfaces/TextTrackCue/align.html:
* pointerevents/ios/pointer-events-implicit-capture-release-exception.html:
* pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html:
* pointerevents/pointer-id-crash.html:
* resources/WebIDLParser.js:
* resources/idlharness.js:
Update from wpt.
* resources/testharness.css: Removed.
* resources/testharness.js:
Update from wpt.
* storage/websql/openDatabase-deprecation.html:
* streams/readable-byte-stream-controller.js:
* streams/readable-stream-byob-reader.js:
* streams/readable-stream-byob-request.js:
* streams/readable-stream-getReader.html:
* streams/reference-implementation/bad-strategies.html:
* streams/reference-implementation/bad-underlying-sinks.html:
* streams/reference-implementation/transform-stream-expected.txt:
* streams/reference-implementation/transform-stream.html:
* webanimations/accelerated-animation-single-keyframe.html:
* webanimations/frame-rate/animation-frame-rate.html:
* webanimations/scheduling-of-animation-with-steps-timing-function-on-effect.html:
* webanimations/scheduling-of-animation-with-steps-timing-function-on-keyframe.html:
* webanimations/scheduling-of-css-animation-with-explicit-steps-timing-function-on-some-keyframes.html:
* webanimations/scheduling-of-css-animation-with-implicit-steps-timing-function.html:
* webaudio/webaudio-gc.html:
* webrtc/calling-peerconnection-once-closed.html:
* webrtc/certificates-indexeddb.html:
* webrtc/datachannel/creation.html:
* webrtc/datachannel/datachannel-event.html:
* webrtc/datachannel/getStats-no-prflx-remote-candidate.html:
* webrtc/disable-encryption.html:
* webrtc/legacy-api-expected.txt:
* webrtc/pc-detached-document.html:
* webrtc/stun-server-filtering.html:


Canonical link: https://commits.webkit.org/246582@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
kkinnunen-apple authored and webkit-commit-queue committed Jan 31, 2022
1 parent dd0bc72 commit 3e631739e295a4f82140d130f26236c7721cbc8b
Showing 195 changed files with 7,459 additions and 2,421 deletions.
@@ -1,3 +1,142 @@
2022-01-30 Kimmo Kinnunen <kkinnunen@apple.com>

Update LayoutTests/resources/testharness.js to 2021-6-24 version
https://bugs.webkit.org/show_bug.cgi?id=235398
<rdar://problem/88126222>

Reviewed by Youenn Fablet.

Copy testharness.js from imported/w3c/web-platform-tests

Copy idlharness.js from imported/w3c/web-platform-tests because it uses
the new testharness.js APIs.

Copy webidl2.js from imported/w3c/web-platform-tests to resources/WebIDLParser.js
because idlharness uses new webidl2.js logic.

Delete testharness.css, it is now bundled in testharness.js.

Update tests to accommodate the API change:
- assert_throws_js check that the exception is of a particular JS
exception type
- assert_throws_dom check that the exception is of a particular
DOMException type from a particular global object.
- assert_throws_exactly check that the exception is a specific
object.

Previously assert_throws was used and it hid unexpected exception errors.

Same for promise_rejects_*

async_test(f) now warns if f is not a normal function.

Singl page tests need a setup function.

* animations/animation-direction-normal.html:
* animations/animation-direction-reverse.html:
* animations/change-keyframes-name.html:
* animations/play-state-paused.html:
async_test(async function {...}) is incorrect (async test expects normal
function that has asynchronous logic, not a function returning a promise.
Use correct form:
promise_test(async function { ... });

* css-custom-properties-api/registerProperty.html:
Update exception expectation functions.

* editing/pasteboard/datatransfer-idl-expected.txt:
* editing/pasteboard/datatransfer-idl.html:
Update the datatransfer related idls from source, otherwise
tests fail (harness now tests for constructor).
Update the results.

* editing/text-iterator/count-matches-in-frames.html:
* editing/text-iterator/hidden-textarea-selection-quirk.html:
* fast/canvas/webgl/webgl2/bindings.html:
* fast/custom-elements/defined-pseudo-class.html:
* fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html:
* fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html:
* fast/dom/document-all.html:
* fast/dom/elementFromPoint-parameters.html:
* fast/dom/replaceable-setter-throws-if-defineownproperty-fails.html:
* fast/dom/window-opener-setter-throws-if-defineownproperty-fails-1.html:
* fast/dom/window-opener-setter-throws-if-defineownproperty-fails-2.html:
* fast/events/clipboard-event-constructor.html:
* fast/files/workers/resources/worker-file-reader-sync-bad-parameter.js:
* fast/files/xhr-blob-request.html:
* fast/mediacapturefromelement/CanvasCaptureMediaStream-exceptions.html:
* fast/mediasession/metadata/artworkdownload.html:
* fast/mediastream/screencapture-user-gesture.html:
* fetch/fetch-url-serialization.html:
* http/tests/fetch/fetching-same-resource-with-different-options.html:
* http/tests/fetch/redirectmode-and-preload.html:
* http/tests/navigation/pushstate-at-unique-origin-denied.py:
* http/tests/notifications/notification.html:
* http/tests/paymentrequest/payment-address-attributes-and-toJSON-method.https.html:
* http/tests/paymentrequest/payment-is-showing.https.html:
* http/tests/paymentrequest/payment-request-abort-method.https.html:
* http/tests/paymentrequest/payment-request-canmakepayment-method.https.html:
* http/tests/paymentrequest/payment-request-merchant-validation.https.html:
* http/tests/paymentrequest/payment-request-show-method.https.html:
* http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html:
* http/tests/paymentrequest/payment-response-retry-method.https.html:
* http/tests/paymentrequest/rejects_if_not_active.https.html:
* http/tests/paymentrequest/updateWith-method-pmi-handling.https.html:
* http/tests/security/bypassing-cors-checks-for-extension-urls.html:
* http/tests/security/clean-origin-css-exposed-resource-timing.html:
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-overrides-xfo.html:
* http/tests/security/contentSecurityPolicy/1.1/scripthash-default-src.html:
* http/tests/security/contentSecurityPolicy/1.1/stylehash-default-src.html:
* http/tests/security/contentSecurityPolicy/script-src-blocked-error-event.html:
* http/tests/security/cross-origin-clean-css-resource-timing.html:
* http/tests/security/cross-origin-css-resource-timing.html:
* http/tests/subresource-integrity/sri-fetch.js:
* http/tests/workers/service/service-worker-crossorigin-fetch.html:
* http/tests/xmlhttprequest/set-bad-headervalue.html:
* intersection-observer/intersection-observer-interface.html:
* js/dom/dom-getters-type-check.html:
* js/dom/legacy-platform-object-defineOwnProperty.html:
* js/dom/post-message-symbol.html:
* js/dom/queue-microtask-window.html:
* media/track/opera/interfaces/TextTrackCue/vertical.html:
* media/track/opera/resources/idlharness.js:
* media/track/texttrackcue/texttrackcue-constructor.html:
* media/track/w3c/interfaces/TextTrackCue/align.html:
* pointerevents/ios/pointer-events-implicit-capture-release-exception.html:
* pointerevents/ios/pointer-events-set-pointer-capture-exceptions.html:
* pointerevents/pointer-id-crash.html:
* resources/WebIDLParser.js:
* resources/idlharness.js:
Update from wpt.
* resources/testharness.css: Removed.
* resources/testharness.js:
Update from wpt.
* storage/websql/openDatabase-deprecation.html:
* streams/readable-byte-stream-controller.js:
* streams/readable-stream-byob-reader.js:
* streams/readable-stream-byob-request.js:
* streams/readable-stream-getReader.html:
* streams/reference-implementation/bad-strategies.html:
* streams/reference-implementation/bad-underlying-sinks.html:
* streams/reference-implementation/transform-stream-expected.txt:
* streams/reference-implementation/transform-stream.html:
* webanimations/accelerated-animation-single-keyframe.html:
* webanimations/frame-rate/animation-frame-rate.html:
* webanimations/scheduling-of-animation-with-steps-timing-function-on-effect.html:
* webanimations/scheduling-of-animation-with-steps-timing-function-on-keyframe.html:
* webanimations/scheduling-of-css-animation-with-explicit-steps-timing-function-on-some-keyframes.html:
* webanimations/scheduling-of-css-animation-with-implicit-steps-timing-function.html:
* webaudio/webaudio-gc.html:
* webrtc/calling-peerconnection-once-closed.html:
* webrtc/certificates-indexeddb.html:
* webrtc/datachannel/creation.html:
* webrtc/datachannel/datachannel-event.html:
* webrtc/datachannel/getStats-no-prflx-remote-candidate.html:
* webrtc/disable-encryption.html:
* webrtc/legacy-api-expected.txt:
* webrtc/pc-detached-document.html:
* webrtc/stun-server-filtering.html:

2022-01-30 Ryosuke Niwa <rniwa@webkit.org>

Delete code for keygen element
@@ -34,7 +34,7 @@
<body>
<div id="box"></div>
<script>
async_test(async t => {
promise_test(async t => {
const delay = 100;

const test = new AnimationTest({
@@ -56,8 +56,6 @@

// Finally, check the values recorded earlier in the test.
test.checkRecordedValues();

t.done();
}, `Pausing an animation using the animation-play-state property stops animating styles.`);
</script>
</body>
@@ -34,7 +34,7 @@
<body>
<div id="box"></div>
<script>
async_test(async t => {
promise_test(async t => {
const delay = 100;

const test = new AnimationTest({
@@ -56,8 +56,6 @@

// Finally, check the values recorded earlier in the test.
test.checkRecordedValues();

t.done();
}, `Pausing an animation using the animation-play-state property stops animating styles with animation-direction: reverse.`);
</script>
</body>
@@ -45,7 +45,7 @@
return null;
}

async_test(async t => {
promise_test(async t => {
const delay = 100;
const box = document.getElementById("box");
const previousAnimationName = "foo";
@@ -74,10 +74,7 @@

// Now, check the recorded values were correct.
test.checkRecordedValues();

t.done();
}, `Test that dynamically changing the name of a @keyframes rule starts animations using that name.`);

</script>
</body>
</html>
@@ -35,7 +35,7 @@
<div id="box"></div>
<script>

async_test(async t => {
promise_test(async t => {
const delay = 100;

const test = new AnimationTest({
@@ -57,8 +57,6 @@

// Finally, check the values recorded earlier in the test.
test.checkRecordedValues();

t.done();
}, `Pausing an animation using the animation-play-state property stops animating styles.`);

</script>
@@ -6,32 +6,32 @@
<script>
// Tests for error checking during property registration
test(function() {
assert_throws(new TypeError(), () => CSS.registerProperty());
assert_throws(new TypeError(), () => CSS.registerProperty(undefined));
assert_throws(new TypeError(), () => CSS.registerProperty(true));
assert_throws(new TypeError(), () => CSS.registerProperty(2));
assert_throws(new TypeError(), () => CSS.registerProperty("css"));
assert_throws(new TypeError(), () => CSS.registerProperty(null));
assert_throws_js(TypeError, () => CSS.registerProperty());
assert_throws_js(TypeError, () => CSS.registerProperty(undefined));
assert_throws_js(TypeError, () => CSS.registerProperty(true));
assert_throws_js(TypeError, () => CSS.registerProperty(2));
assert_throws_js(TypeError, () => CSS.registerProperty("css"));
assert_throws_js(TypeError, () => CSS.registerProperty(null));
}, "registerProperty requires a Dictionary type");
test(function() {
// Valid property names, shouldn't throw
CSS.registerProperty({name: '--name1', inherits: false});
CSS.registerProperty({name: '--name2, no need for escapes', inherits: false});
CSS.registerProperty({name: ['--name', 3], inherits: false});
// Invalid property names
assert_throws(new SyntaxError(), () => CSS.registerProperty({name: 'no-leading-dash', inherits: false}));
assert_throws(new SyntaxError(), () => CSS.registerProperty({name: '', inherits: false}));
assert_throws(new SyntaxError(), () => CSS.registerProperty({name: '\\--name', inherits: false}));
assert_throws_dom('SyntaxError', () => CSS.registerProperty({name: 'no-leading-dash', inherits: false}));
assert_throws_dom('SyntaxError', () => CSS.registerProperty({name: '', inherits: false}));
assert_throws_dom('SyntaxError', () => CSS.registerProperty({name: '\\--name', inherits: false}));
}, "registerProperty requires a name matching <custom-property-name>");
test(function() {
CSS.registerProperty({name: '--syntax-test-1', inherits: false, syntax: '*'});
CSS.registerProperty({name: '--syntax-test-2', inherits: false, syntax: ' * '});
CSS.registerProperty({name: '--syntax-test-3', inherits: false, initialValue: '500px'});
assert_throws(new TypeError(), () => CSS.registerProperty({}));
assert_throws(new TypeError(), () => CSS.registerProperty({name: '--no-inherits'}));
assert_throws(new TypeError(), () => CSS.registerProperty({inherits: false}));
assert_throws_js(TypeError, () => CSS.registerProperty({}));
assert_throws_js(TypeError, () => CSS.registerProperty({name: '--no-inherits'}));
assert_throws_js(TypeError, () => CSS.registerProperty({inherits: false}));
// Repeated name
assert_throws(DOMException.INVALID_MODIFICATION_ERR,
assert_throws_dom(DOMException.INVALID_MODIFICATION_ERR,
() => CSS.registerProperty({name: '--syntax-test-3', inherits: false, initialValue: '500px'}));
}, "registerProperty always allows omitting initialValue and syntax, requires name and inherits");
test(function() {
@@ -42,11 +42,11 @@
CSS.registerProperty({name: '--initialvalue-test-0', inherits: false, syntax: '<length>', initialValue: 'calc(10px + 10in)'});
assert_equals(window.getComputedStyle(el).getPropertyValue('--initialvalue-test-0').toString(), '970px');

assert_throws(new SyntaxError(),
assert_throws_dom('SyntaxError',
() => CSS.registerProperty({name: '--initialvalue-test-1', inherits: false, syntax: '<length>', initialValue: '10em'}));
assert_throws(new SyntaxError(),
assert_throws_dom('SyntaxError',
() => CSS.registerProperty({name: '--initialvalue-test-2', inherits: false, syntax: '<length>', initialValue: 'calc(10px + 10em)'}));
assert_throws(new SyntaxError(),
assert_throws_dom('SyntaxError',
() => CSS.registerProperty({name: '--initialvalue-test-3', inherits: false, syntax: '<length>', initialValue: 'calc(10px + 10%)'}));
}, "registerProperty requires initialValue to be computationally independent");
</script>
@@ -1,26 +1,27 @@
CONSOLE MESSAGE: callback not yet supported

PASS DataTransfer interface: existence and properties of interface object
PASS DataTransfer interface object length
PASS DataTransfer interface object name
PASS DataTransfer interface: existence and properties of interface prototype object
PASS DataTransfer interface: existence and properties of interface prototype object's "constructor" property
PASS DataTransfer interface: existence and properties of interface prototype object's @@unscopables property
PASS DataTransfer interface: attribute dropEffect
PASS DataTransfer interface: attribute effectAllowed
PASS DataTransfer interface: attribute items
PASS DataTransfer interface: operation setDragImage(Element,long,long)
PASS DataTransfer interface: operation setDragImage(Element, long, long)
PASS DataTransfer interface: attribute types
PASS DataTransfer interface: operation getData(DOMString)
PASS DataTransfer interface: operation setData(DOMString,DOMString)
PASS DataTransfer interface: operation clearData(DOMString)
PASS DataTransfer interface: operation setData(DOMString, DOMString)
PASS DataTransfer interface: operation clearData(optional DOMString)
PASS DataTransfer interface: attribute files
PASS DataTransferItemList interface: existence and properties of interface object
PASS DataTransferItemList interface object length
PASS DataTransferItemList interface object name
PASS DataTransferItemList interface: existence and properties of interface prototype object
PASS DataTransferItemList interface: existence and properties of interface prototype object's "constructor" property
PASS DataTransferItemList interface: existence and properties of interface prototype object's @@unscopables property
PASS DataTransferItemList interface: attribute length
PASS DataTransferItemList interface: operation add(DOMString,DOMString)
PASS DataTransferItemList interface: operation add(DOMString, DOMString)
PASS DataTransferItemList interface: operation add(File)
PASS DataTransferItemList interface: operation remove(unsigned long)
PASS DataTransferItemList interface: operation clear()
@@ -29,8 +30,10 @@ PASS DataTransferItem interface object length
PASS DataTransferItem interface object name
PASS DataTransferItem interface: existence and properties of interface prototype object
PASS DataTransferItem interface: existence and properties of interface prototype object's "constructor" property
PASS DataTransferItem interface: existence and properties of interface prototype object's @@unscopables property
PASS DataTransferItem interface: attribute kind
PASS DataTransferItem interface: attribute type
PASS DataTransferItem interface: operation getAsString(FunctionStringCallback)
PASS DataTransferItem interface: operation getAsString(StringCallback?)
PASS DataTransferItem interface: operation getAsFile()
PASS DataTransferItem interface: operation webkitGetAsEntry()

@@ -8,20 +8,21 @@
</head>
<body>
<script id="datatransfer-idl" type="text/plain">
[Constructor, Exposed=(Window)]
[Exposed=Window]
interface DataTransfer {
constructor();

attribute DOMString dropEffect;
attribute DOMString effectAllowed;

[SameObject] readonly attribute DataTransferItemList items;

void setDragImage(Element image, long x, long y);
undefined setDragImage(Element image, long x, long y);

/* old interface */
readonly attribute FrozenArray<DOMString> types;
DOMString getData(DOMString format);
void setData(DOMString format, DOMString data);
void clearData(optional DOMString format);
undefined setData(DOMString format, DOMString data);
undefined clearData(optional DOMString format);
[SameObject] readonly attribute FileList files;
};
</script>
@@ -36,14 +37,19 @@