summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html')
-rw-r--r--testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html b/testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html
new file mode 100644
index 000000000..85b71043e
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/editing-0/contenteditable/contentEditable-invalidvalue.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<title>contentEditable setter: invalid value</title>
+<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org">
+<link rel=help href="https://html.spec.whatwg.org/multipage/#contenteditable">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+ var el = document.createElement("div");
+ test(function(){
+ assert_throws("SyntaxError", function() {
+ el.contentEditable = "foobar";
+ });
+ }, "setting contentEditable to an invalid value throws a SyntaxError Exception");
+</script>