Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: LayoutTests/editing/execCommand/non-html-document.html

Issue 1155353002: Throw DOMException when invoked Document::execCommand on non-{X,}HTML documents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert accidental edit Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/non-html-document-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/execCommand/non-html-document.html
diff --git a/LayoutTests/editing/execCommand/non-html-document.html b/LayoutTests/editing/execCommand/non-html-document.html
new file mode 100644
index 0000000000000000000000000000000000000000..d7940484ffbb9394afee7ca38bab1eaf2f64102c
--- /dev/null
+++ b/LayoutTests/editing/execCommand/non-html-document.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<script src='../../resources/js-test.js'></script>
+<script>
+description("Non HTMLDocument such as XMLDocument shouldn't support execCommand");
+
+var xmldoc = window.document.implementation.createDocument('http://www.w3.org/1999/xlink', 'html', null);
+shouldThrow("xmldoc.execCommand('bold')");
+shouldThrow("xmldoc.queryCommandEnabled('bold')");
+shouldThrow("xmldoc.queryCommandIndeterm('bold')");
+shouldThrow("xmldoc.queryCommandState('bold')");
+shouldThrow("xmldoc.queryCommandSupported('bold')");
+shouldThrow("xmldoc.queryCommandValue('bold')");
+</script>
« no previous file with comments | « no previous file | LayoutTests/editing/execCommand/non-html-document-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698