Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / contenteditable-notifications.html
blobacec61fefdb28a8c79222abcb0ca70c792e7e299
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
8 <div id="textbox" contentEditable="true">First<p>Second</p></div>
10 <div id="console"></div>
11 <script>
12 description("This test ensures that moving the cursor in a contentEditable sends a selected text change notification, and typing in a contentEditable sends both a value changed and selected text changed notification - both on the root element that's marked as contentEditable.");
13 window.jsTestIsAsync = true;
15 if (window.testRunner && window.accessibilityController) {
16 testRunner.dumpAsText();
18 // Focus the contenteditable text box and move the cursor to the end.
19 var textbox = document.getElementById("textbox");
20 textbox.focus();
21 eventSender.keyDown("downArrow", []);
22 eventSender.keyDown("downArrow", []);
24 var axTextBox = accessibilityController.focusedElement;
26 var valueChangedCount = 0;
27 var selectedTextChangedCount = 0;
29 // Defer the main part of the test so that the notification listener
30 // doesn't catch any notifications still in the queue from loading the
31 // page and initially setting focus.
32 window.setTimeout(function() {
33 axTextBox.addNotificationListener(function(notification) {
34 testPassed("Got notification: " + notification);
36 if (notification == "ValueChanged")
37 valueChangedCount++;
38 else if (notification == "SelectedTextChanged")
39 selectedTextChangedCount++;
41 if (valueChangedCount == 8 && selectedTextChangedCount == 6) {
42 textbox.style.display = "none";
43 finishJSTest();
45 });
47 eventSender.keyDown("leftArrow", []);
48 eventSender.keyDown("leftArrow", []);
49 eventSender.keyDown("w", []);
50 eventSender.keyDown("x", []);
51 eventSender.keyDown("y", []);
52 eventSender.keyDown("z", []);
54 }, 0);
57 </script>
59 </body>
60 </html>