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

Unified Diff: LayoutTests/accessibility/element-role-mapping-focusable.html

Issue 1012383002: Removes direct checking node on AXLayoutObject::determineAccessibilityRole. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update TC Created 5 years, 8 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 | LayoutTests/accessibility/element-role-mapping-focusable-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/element-role-mapping-focusable.html
diff --git a/LayoutTests/accessibility/element-role-mapping-focusable.html b/LayoutTests/accessibility/element-role-mapping-focusable.html
new file mode 100644
index 0000000000000000000000000000000000000000..b2721f7411025ccf4dc6d853fdb46d2fddff1a2e
--- /dev/null
+++ b/LayoutTests/accessibility/element-role-mapping-focusable.html
@@ -0,0 +1,169 @@
+<script src="../resources/js-test.js"></script>
+<a id="element1" href="http://www.chromium.org">chromium</a>
+<a id="element2" onmousedown="mouseDown()">Mouse Down</a>
+<button id="element3" type="button">Button</button>
+<details id="element4">
+ <summary id="element5">Copyright 2015.</summary>
+ <p>The Chromium Authors. All rights reserved.</p>
+</details>
+<input id="element6" list="fruits">
+<datalist id="fruits">
+ <option value="Apple">
+ <option value="Banana">
+</datalist>
+<input id="element7" type="button" value="Click input button">
+<input id="element8" type="checkbox" value="CheckBox"> I have a checkbox
+<input id="element9" type="radio" value="Radio"> Radio
+<input id="element10" type="radio" value="Button"> Button
+<menu>
+ <input id="element11" type="button" value="Click menuitem">
+ <input id="element12" type="checkbox" name="vehicle" value="menuItemCheckbox"> I have a menuItem
+ <input id="element13" type="radio" name="gender" value="Menu"> Menu
+ <input id="element14" type="radio" name="gender" value="ItemRadio"> ItemRadio
+</menu>
+Birthday: <input id="element15" type="date" name="bday">
+Birthday (date and time): <input id="element16" type="datetime" name="bdaytime">
+Birthday (date and time-local): <input id="element17" type="datetime-local" name="bdaytime">
+Birthday (month and year): <input id="element18" type="month" name="bdaymonth">
+Select a week: <input id="element19" type="week" name="week_year">
+Select a file: <input id="element20" type="file" name="img">
+Min-Max: <input id="element21" type="number" min="1" max="5">
+<input id="element22" type="range" name="points" min="0" max="10">Color: <input id="element23" type="color" name="color">Select a time: <input id="element24" type="time" name="time">
+<input id="element25" type="reset">
+<select id="element26">
+ <option value="Pacific">Pacific</option>
+ <option value="Atlantic">Atlantic</option>
+ <option value="Indian">Indian</option>
+ <option value="Southern">Southern</option>
+ <option value="Arctic">Arctic</option>
+</select>
+<select id="element27"multiple>
+ <option id="element28" value="Milk">Milk</option>
+ <option value="Soda">Soda</option>
+ <option value="Coffee">Coffee</option>
+ <option value="Water">Water</option>
+</select>
+<textarea id="element29" rows="2" cols="10">TextArea</textarea>
+<meter id="element30" value="0.6">60%</meter>
+<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
+ <input type="range" id="a" value="50">100 +<input type="number" id="b" value="50"> =<output id="element31" name="x" for="a b"></output>
+</form>
+<form>
+ <label for="blue">Blue</label>
+ <input id="element32" type="radio" name="color" id="blue" value="blue">
+ <label for="red">Red</label>
+ <input type="radio" name="color" id="red" value="red">
+</form>
+<fieldset>
+ <legend id="element33">Text Input Controls</legend>
+ Text: <input id="element34" type="text" name="texttest"><br>
+ Password: <input id="element35" type="password" name="passtest"><br>
+</fieldset>
+<p>End of test</p>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This test make sure that focusable elements are mapped implicitly to AX roles.");
+
+if (window.testRunner && window.accessibilityController) {
+ window.testRunner.dumpAsText();
+ for (var i = 1; i <= 36; i++) {
+ var axElement = accessibilityController.accessibleElementById("element" + i);
+ switch(i) {
+ case 1:
+ case 2:
+ shouldBe("axElement.role", "'AXRole: AXLink'");
dmazzoni 2015/04/06 06:05:45 If this were to fail and I was trying to debug it,
+ break;
+ case 3:
+ shouldBe("axElement.role", "'AXRole: AXButton'");
+ break;
+ case 4:
+ shouldBe("axElement.role", "'AXRole: AXDetails'");
+ break;
+ case 5:
+ shouldBe("axElement.role", "'AXRole: AXDisclosureTriangle'");
+ break;
+ case 6:
+ shouldBe("axElement.role", "'AXRole: AXComboBox'");
+ break;
+ case 7:
+ shouldBe("axElement.role", "'AXRole: AXButton'");
+ break;
+ case 8:
+ shouldBe("axElement.role", "'AXRole: AXCheckBox'");
+ break;
+ case 9:
+ case 10:
+ shouldBe("axElement.role", "'AXRole: AXRadioButton'");
+ break;
+ case 11:
+ shouldBe("axElement.role", "'AXRole: AXMenuItem'");
+ break;
+ case 12:
+ shouldBe("axElement.role", "'AXRole: AXMenuItemCheckBox'");
+ break;
+ case 13:
+ case 14:
+ shouldBe("axElement.role", "'AXRole: AXMenuItemRadio'");
+ break;
+ case 15:
+ shouldBe("axElement.role", "'AXRole: AXDateField'");
+ break;
+ case 16:
+ shouldBe("axElement.role", "'AXRole: AXTextField'");
+ break;
+ case 17:
dmazzoni 2015/04/06 06:05:45 I'm assuming the missing ones are the ones that di
+ case 18:
+ case 19:
+ shouldBe("axElement.role", "'AXRole: AXDateTimeField'");
+ break;
+ case 20:
+ shouldBe("axElement.role", "'AXRole: AXButton'");
+ break;
+ case 21:
+ shouldBe("axElement.role", "'AXRole: AXSpinButton'");
+ break;
+ case 22:
+ shouldBe("axElement.role", "'AXRole: AXSlider'");
+ break;
+ case 23:
+ shouldBe("axElement.role", "'AXRole: AXColorWell'");
+ break;
+ case 24:
+ shouldBe("axElement.role", "'AXRole: AXTime'");
+ break;
+ case 25:
+ shouldBe("axElement.role", "'AXRole: AXButton'");
+ break;
+ case 26:
+ shouldBe("axElement.role", "'AXRole: AXPopUpButton'");
+ break;
+ case 27:
+ shouldBe("axElement.role", "'AXRole: AXListBox'");
+ break;
+ case 28:
+ shouldBe("axElement.role", "'AXRole: AXListBoxOption'");
+ break;
+ case 29:
+ shouldBe("axElement.role", "'AXRole: AXTextArea'");
+ break;
+ case 30:
+ shouldBe("axElement.role", "'AXRole: AXMeter'");
+ break;
+ case 31:
+ shouldBe("axElement.role", "'AXRole: AXStatus'");
+ break;
+ case 32:
+ shouldBe("axElement.role", "'AXRole: AXRadioButton'");
+ break;
+ case 33:
+ shouldBe("axElement.role", "'AXRole: AXLegend'");
+ break;
+ case 34:
+ case 35:
+ shouldBe("axElement.role", "'AXRole: AXTextField'");
+ break;
+ }
+ }
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/accessibility/element-role-mapping-focusable-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698