| Index: third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-04.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-04.html b/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-04.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9d0eb25135e66cbe4a335f72ed291f15e9ba28a9
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-04.html
|
| @@ -0,0 +1,26 @@
|
| +<!doctype HTML>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<div contenteditable="true">
|
| +<sub><i>1. Make text subscript and italic</i></sub>
|
| +<sup><i>2. Make text superscript and italic</i></sup>
|
| +</div>
|
| +<div id="log"></div>
|
| +<script>
|
| +test(function() {
|
| + document.getSelection().removeAllRanges();
|
| + var range = document.createRange();
|
| + range.selectNode(document.querySelector('i'));
|
| + document.getSelection().addRange(range);
|
| +
|
| + assert_equals(document.queryCommandState('subscript'), true);
|
| +}, '1. run queryCommandState(subscript) on <i> tag under <sub> tag');
|
| +test(function() {
|
| + document.getSelection().removeAllRanges();
|
| + var range = document.createRange();
|
| + range.selectNode(document.querySelectorAll('i')[1]);
|
| + document.getSelection().addRange(range);
|
| +
|
| + assert_equals(document.queryCommandState('superscript'), true);
|
| +}, '2. run queryCommandState(superscript) on <i> tag under <sup> tag');
|
| +</script>
|
|
|