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

Unified Diff: third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html

Issue 1960553002: Do not ignore the text style properties when checking styles in EditingStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move the test case Created 4 years, 7 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 | third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html
diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html b/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html
new file mode 100644
index 0000000000000000000000000000000000000000..c5315e48699c862dd9bb275357199c3c0abad7c3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03.html
@@ -0,0 +1,44 @@
+<html>
yosin_UTC9 2016/05/09 03:43:50 Could you use w3c test harness? Here is an example
+<body>
+This tests queryCommandState.
+<p>
+<a href="https://bugs.chromium.org/p/chromium/issues/detail?id=584939">Bug 584939</a>
+</p>
+<div contenteditable="true">
+<img src="../resources/abe.png">
+</div>
+<ul id="console"></ul>
+
+<script type="text/javascript">
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+}
+
+document.getSelection().removeAllRanges();
+var range = document.createRange();
+range.selectNode(document.querySelector('img'));
+document.getSelection().addRange(range);
+
+assert(!document.queryCommandState('bold'));
+assert(!document.queryCommandState('italic'));
+assert(!document.queryCommandState('underline'));
+assert(!document.queryCommandState('strikethrough'));
+
+function log(str) {
+ var li = document.createElement("li");
+ li.appendChild(document.createTextNode(str));
+ var console = document.getElementById("console");
+ console.appendChild(li);
+}
+
+function assert(bool) {
+ if (!bool)
+ log("Failure");
+ else
+ log("Success");
+}
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/execCommand/queryCommandState-03-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698