diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-select-element/resources/show-picker-child-iframe.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/the-select-element/resources/show-picker-child-iframe.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-select-element/resources/show-picker-child-iframe.html b/testing/web-platform/tests/html/semantics/forms/the-select-element/resources/show-picker-child-iframe.html new file mode 100644 index 0000000000..bba3989824 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-select-element/resources/show-picker-child-iframe.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Test showPicker() in an iframe</title> +<script type=module> + const urlParams = new URLSearchParams(location.search); + const documentDomain = urlParams.get('documentDomain'); + if (documentDomain) { + document.domain = documentDomain; + } + + let securityErrors = []; + const select = document.createElement("select"); + try { + select.showPicker(); + } catch (error) { + if (error instanceof DOMException && error.name == 'SecurityError') { + securityErrors.push("select"); + } + } + parent.postMessage(securityErrors.join(','), "*"); +</script>
\ No newline at end of file |