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/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute | |
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/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute')
4 files changed, 99 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/original-id.json b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/original-id.json new file mode 100644 index 0000000000..8b7c4b838c --- /dev/null +++ b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/original-id.json @@ -0,0 +1 @@ +{"original_id":"making-entire-documents-editable:-the-designmode-idl-attribute"}
\ No newline at end of file diff --git a/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-svg.svg b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-svg.svg new file mode 100644 index 0000000000..fd2fde0fbe --- /dev/null +++ b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-svg.svg @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg:svg xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/1999/xhtml" + width="100%" height="100%" viewBox="0 0 800 600"> + <svg:title>Editing: designMode attribute test</svg:title> + <head> + <link rel="author" title="Baidu" href="mailto: guopengcheng@baidu.com"/> + <link rel="help" href="https://html.spec.whatwg.org/multipage/#making-entire-documents-editable:-the-designmode-idl-attribute"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <div id="log"></div> + </head> + <body> + <script type="text/javascript"><![CDATA[ + test(function() { + assert_equals(document.designMode, "off", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "initial designMode attribute"); + document.designMode="on"; + test(function() { + assert_equals(document.designMode, "on", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "set designMode = \"on\""); + document.designMode="off"; + test(function() { + assert_equals(document.designMode,"off", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "set designMode = \"off\""); + ]]></script> + </body> +</svg:svg> diff --git a/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-xml.xml b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-xml.xml new file mode 100644 index 0000000000..f26cd56453 --- /dev/null +++ b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-xml.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Editing: designMode attribute test</title> + <link rel="author" title="Baidu" href="mailto: guopengcheng@baidu.com"/> + <link rel="help" href="https://html.spec.whatwg.org/multipage/#making-entire-documents-editable:-the-designmode-idl-attribute"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <div id="log"></div> + </head> + <body> + <script type="text/javascript"><![CDATA[ + test(function() { + assert_equals(document.designMode, "off", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "initial designMode attribute"); + document.designMode="on"; + test(function() { + assert_equals(document.designMode, "on", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "set designMode = \"on\""); + document.designMode="off"; + test(function() { + assert_equals(document.designMode,"off", "check for designMode value"); + assert_throws_dom("InvalidStateError", function() { document.queryCommandSupported("delete") }); + assert_throws_dom("InvalidStateError", function() { document.queryCommandEnabled("delete") }); + }, "set designMode = \"off\""); + ]]></script> + </body> +</html> diff --git a/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode.html b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode.html new file mode 100644 index 0000000000..79d2dc8ba0 --- /dev/null +++ b/testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <title>Editing: designMode attribute test</title> + <link rel="author" title="Baidu" href="mailto: guopengcheng@baidu.com"/> + <link rel="help" href="https://html.spec.whatwg.org/multipage/#making-entire-documents-editable:-the-designmode-idl-attribute"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <div id="log"></div> + </head> + <body> + <script type="text/javascript"> + test(function() { + assert_equals(document.designMode, "off", "check for designMode value"); + assert_true(document.queryCommandSupported("delete")); + assert_false(document.queryCommandEnabled("delete")); + }, "initial designMode attribute"); + document.designMode="on"; + test(function() { + assert_equals(document.designMode, "on", "check for designMode value"); + assert_true(document.queryCommandSupported("delete")); + assert_true(document.queryCommandEnabled("delete")); + }, "set designMode = \"on\""); + document.designMode="off"; + test(function() { + assert_equals(document.designMode,"off", "check for designMode value"); + assert_true(document.queryCommandSupported("delete")); + assert_false(document.queryCommandEnabled("delete")); + }, "set designMode = \"off\""); + </script> + </body> +</html> |