Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion custom/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,6 @@ api:
return instance.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "*").length > 0;
requestFullscreen:
__additional:
options_navigationUI_parameter: return bcd.testOptionParam(instance, 'requestFullscreen', 'navigationUI', false);
returns_promise: |-
if (!(instance && instance.requestFullscreen)) {
return {result: false, message: 'instance.requestFullscreen is not defined'};
Expand Down Expand Up @@ -2252,6 +2251,16 @@ api:
throw e;
}
}
Headers:
__additional:
lexicographical_sorting: |-
if (!('Headers' in self)) {
return {result: false, message: 'Headers is not defined'}
}
var h = new Headers({'X-Framework': 'web2py', 'Content-Type': 'text/xml'});
var entry = h.entries().next().value;
// If the headers are sorted, the first entry should be 'Content-Type'
return entry[0].toLowerCase() === 'content-type';
History:
__base: var instance = history;
HTMLAllCollection:
Expand Down Expand Up @@ -3402,6 +3411,18 @@ api:
__base: var instance = document.body.attributes;
Navigator:
__base: var instance = navigator;
canShare:
__additional:
data_files_parameter: return bcd.testOptionParam(instance, 'canShare', 'files', [new File(['foo bar'], 'foo.txt')]);
data_text_parameter: return bcd.testOptionParam(instance, 'canShare', 'text', 'foo bar');
share:
__additional:
data_files_parameter: |-
// If `canShare` supports the parameter, `share` does
return bcd.testOptionParam(instance, 'canShare', 'files', [new File(['foo bar'], 'foo.txt')]);
data_text_parameter: |-
// If `canShare` supports the parameter, `share` does
return bcd.testOptionParam(instance, 'canShare', 'text', 'foo bar');
Node:
__base: var instance = document;
NodeList:
Expand Down Expand Up @@ -4780,6 +4801,35 @@ api:
return {result: false, message: 'crypto is not defined'};
};
var instance = crypto.subtle || crypto.webkitSubtle;
deriveKey:
__additional:
derivedKeyAlgorithm_option_aes: |-
return instance.generateKey(
{
name: "ECDH",
namedCurve: "P-384",
},
true,
["deriveKey"],
).then(function(keys) {
return instance.deriveKey(
{
name: "ECDH",
public: keys.publicKey,
},
keys.privateKey,
{
name: "AES-GCM",
length: 256
},
true,
["encrypt", "decrypt"],
);
}).then(function() {
return true;
}).catch(function(e) {
return {result: false, message: e.message};
});
SVGAElement:
__base: var instance = document.createElementNS('http://www.w3.org/2000/svg', 'a');
__test: return bcd.testObjectName(instance, 'SVGAElement');
Expand Down
19 changes: 19 additions & 0 deletions untestable-features.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"api.ExtendableEvent.waitUntil.async_waitUntil",
"api.Request.mode.navigate_mode",
"api.PerformanceResourceTiming.deliveryType.navigational-prefetch",
"api.IDBRequest.error.DOMException",
"api.IDBTransaction.error.DOMException",
"api.FileSystemSyncAccessHandle.close.sync_version",
"api.FileSystemSyncAccessHandle.flush.sync_version",
"api.FileSystemSyncAccessHandle.getSize.sync_version",
"api.FileSystemSyncAccessHandle.truncate.sync_version",

/* Effect can be seen, but not programmatically tested */
"api.console.substitution_strings",
Expand Down Expand Up @@ -191,6 +197,9 @@
"css.properties.text-transform.uppercase_eszett",
"css.selectors.first-letter.dutch_ij_digraph",

/* Firefox-only and removed */
"api.IDBFactory.open.options_parameter",

// Testable with an overhaul
/* Worker support; technically already tested, but update-bcd doesn't know how to update these */
"api.Cache.worker_support",
Expand Down Expand Up @@ -320,13 +329,23 @@
"api.Document.execCommand.cut",
"api.Document.execCommand.defaultParagraphSeparator",
"api.Document.execCommand.insertBrOnReturn",
"api.Element.requestFullscreen.options_navigationUI_parameter",
"api.Element.requestFullscreen.options_screen_parameter",

/* Requires creating a new worker */
"api.SharedWorker.SharedWorker.options_name_parameter",
"api.SharedWorker.SharedWorker.mime_checks",
"api.Worker.Worker.mime_checks",
"api.Worker.Worker.options_name_parameter",
"api.Worker.Worker.options_type_parameter",

/* Testing for serializable/transferable objects requires using a worker, which is only available if and when worker tests start */
"api.RTCDataChannel.transferable",
"api.ReadableStream.transferable",
"api.TransformStream.transferable",
"api.WritableStream.transferable",
"api.DOMException.serializable_object",
"api.Window.postMessage.transfer_parameter",

/* Requires an active registration, which is only available if and when service worker tests start */
"api.ServiceWorkerRegistration.showNotification.options_actions_parameter",
Expand Down