diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html new file mode 100644 index 0000000000..e29f2b0fbc --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html @@ -0,0 +1,60 @@ +<!doctype html> +<title>HTMLMediaElement.crossOrigin</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id=log></div> +<script> +test(function(){ + var video = document.createElement('video'); + assert_true('crossOrigin' in video); +}); +test(function(){ + var video = document.createElement('video'); + assert_equals(video.crossOrigin, null); +}, document.title+', content attribute missing'); +test(function(){ + var video = document.createElement('video'); + video.setAttribute('crossorigin', 'foo'); + assert_equals(video.crossOrigin, 'anonymous'); +}, document.title+', content attribute invalid value'); +test(function(){ + var video = document.createElement('video'); + video.setAttribute('crossorigin', ''); + assert_equals(video.crossOrigin, 'anonymous'); +}, document.title+', content attribute empty string'); +test(function(){ + var video = document.createElement('video'); + video.setAttribute('crossorigin', 'ANONYMOUS'); + assert_equals(video.crossOrigin, 'anonymous'); +}, document.title+', content attribute uppercase ANONYMOUS'); +test(function(){ + var video = document.createElement('video'); + video.setAttribute('crossorigin', 'use-credentials'); + assert_equals(video.crossOrigin, 'use-credentials'); +}, document.title+', content attribute use-credentials'); +test(function(){ + var video = document.createElement('video'); + video.crossOrigin = ''; + assert_equals(video.getAttribute('crossorigin'), ''); +}, document.title+', setting to empty string'); +test(function(){ + var video = document.createElement('video'); + video.crossOrigin = null; + assert_false(video.hasAttribute('crossorigin')); +}, document.title+', setting to null'); +test(function(){ + var video = document.createElement('video'); + video.crossOrigin = 'foo'; + assert_equals(video.getAttribute('crossorigin'), 'foo'); +}, document.title+', setting to invalid value'); +test(function(){ + var video = document.createElement('video'); + video.crossOrigin = 'ANONYMOUS'; + assert_equals(video.getAttribute('crossorigin'), 'ANONYMOUS'); +}, document.title+', setting to uppercase ANONYMOUS'); +test(function(){ + var video = document.createElement('video'); + video.crossOrigin = 'use-credentials'; + assert_equals(video.getAttribute('crossorigin'), 'use-credentials'); +}, document.title+', setting to use-credentials'); +</script> |