diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/contenteditable | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/contenteditable')
4 files changed, 53 insertions, 0 deletions
diff --git a/testing/web-platform/tests/contenteditable/META.yml b/testing/web-platform/tests/contenteditable/META.yml new file mode 100644 index 0000000000..3618b8d29d --- /dev/null +++ b/testing/web-platform/tests/contenteditable/META.yml @@ -0,0 +1,3 @@ +spec: https://w3c.github.io/contentEditable/ +suggested_reviewers: + - marcoscaceres diff --git a/testing/web-platform/tests/contenteditable/plaintext-only.html b/testing/web-platform/tests/contenteditable/plaintext-only.html new file mode 100644 index 0000000000..cb8308edcc --- /dev/null +++ b/testing/web-platform/tests/contenteditable/plaintext-only.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>contenteditable="plaintext-only" should exist</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="txt" contenteditable="plaintext-only"></div> +<script> +test(function() { + const txt = document.getElementById('txt'); + assert_true(txt.isContentEditable); + assert_equals(txt.contentEditable, 'plaintext-only'); +}, 'plaintext-only is an accepted attribute value for contenteditable'); +test(function() { + const txt = document.createElement('div'); + assert_false(txt.isContentEditable); + txt.contentEditable = 'plaintext-only'; + assert_true(txt.isContentEditable); + assert_equals(txt.contentEditable, 'plaintext-only'); +}, 'plaintext-only can be assigned to contenteditable dynamically'); +</script> diff --git a/testing/web-platform/tests/contenteditable/synthetic-height-ref.html b/testing/web-platform/tests/contenteditable/synthetic-height-ref.html new file mode 100644 index 0000000000..a64b545f03 --- /dev/null +++ b/testing/web-platform/tests/contenteditable/synthetic-height-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<title>CSS test reference</title> +<style> + div { background: green; border: 1px solid; } +</style> +<div><br></div> +<div><br></div> +<div><br></div> +<div><br></div> diff --git a/testing/web-platform/tests/contenteditable/synthetic-height.tentative.html b/testing/web-platform/tests/contenteditable/synthetic-height.tentative.html new file mode 100644 index 0000000000..4d466bff41 --- /dev/null +++ b/testing/web-platform/tests/contenteditable/synthetic-height.tentative.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>contenteditable causes blocks to have a synthesized height</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1098151"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1634543"> +<link rel="help" href="https://github.com/w3c/editing/issues/70"> +<link rel="match" href="synthetic-height-ref.html"> +<style> + div { background: green; border: 1px solid; } + .pseudo::before { + content: ""; + } + .abspos-pseudo::before { + position: absolute; + } +</style> +<div contenteditable></div> +<div contenteditable><span style="position: absolute"></span></div> +<div contenteditable class="pseudo"></div> +<div contenteditable class="pseudo abspos-pseudo"></div> |