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> |