summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/contenteditable
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/contenteditable
parentInitial commit. (diff)
downloadfirefox-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/contenteditable')
-rw-r--r--testing/web-platform/tests/contenteditable/META.yml3
-rw-r--r--testing/web-platform/tests/contenteditable/plaintext-only.html20
-rw-r--r--testing/web-platform/tests/contenteditable/synthetic-height-ref.html9
-rw-r--r--testing/web-platform/tests/contenteditable/synthetic-height.tentative.html21
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>