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

Side by Side Diff: LayoutTests/accessibility/is-richly-editable.html

Issue 1149293009: Added tests for issue 1156353003, ability to distinguish between rich and plain text editable eleme… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed property name from isContentRichlyEditable to isRichlyEditable. Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/accessibility/is-richly-editable-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html> <head>
2 <script src="../resources/js-test.js"></script>
3
4 <!-- Richly editable elements. -->
5 <div id="richly_editable1" contentEditable></div>
6 <div id="richly_editable2" contentEditable="true"></div>
7 <div contentEditable>
8 <p id="richly_editable3">Some text.</p>
9 </div>
10 <div contentEditable="true">
11 <p id="richly_editable4">Some text.</p>
12 </div>
13 <iframe id="richly_editable5"
14 src="data:text/html,<html><body><p>Some text.</p></body></html>">
15 </iframe>
16
17 <!-- Non-richly editable elements. -->
18 <input id="non_richly_editable1" type="text" value="Some text.">
19 <textarea id="non_richly_editable2">
20 Some text.</textarea>
21 <div id="non_richly_editable3" contentEditable="plaintext-only"></div>
22 <div id="non_richly_editable4" contentEditable style="-webkit-user-modify: read- only;"></div>
23 <div contentEditable="plaintext-only">
24 <p id="non_richly_editable5">Some text.</p>
25 </div>
26 <p id="non_richly_editable6" tabindex="0">Some text.</p>
27 <button id="non_richly_editable7">Button</button>
28
29 <script>
30 description("This tests that only elements that allow the user to edit rich text in them are recognized as being richly editable.");
31
32 var iframeId = "richly_editable5";
33 var iframeDocument = document.getElementById(iframeId).contentDocument;
34 iframeDocument.designMode = "on";
35
36 if (window.accessibilityController) {
37
38 for (var i = 1; i <= 5; ++i) {
39 var elementId = "richly_editable" + i;
40 var element = document.getElementById(elementId);
41 element.focus();
42 var axElement = accessibilityController.focusedElement;
43 shouldBeTrue("axElement.isRichlyEditable");
44 }
45
46 iframeDocument.body.focus();
47 var axElement = accessibilityController.focusedElement;
48 shouldBeTrue("axElement.isRichlyEditable");
49
50
51 for (var i = 1; i <= 7; ++i) {
52 var elementId = "non_richly_editable" + i;
53 var element = document.getElementById(elementId);
54 element.focus();
55 var axElement = accessibilityController.focusedElement;
56 shouldBeFalse("axElement.isRichlyEditable");
57 }
58
59 }
60 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/accessibility/is-richly-editable-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698