| Index: third_party/WebKit/LayoutTests/accessibility/input-mixed.html
|
| diff --git a/third_party/WebKit/LayoutTests/accessibility/input-mixed.html b/third_party/WebKit/LayoutTests/accessibility/input-mixed.html
|
| index 5f451fd7f9880665cf0514b429eee564355f3d13..afd13aead1728584e88f1404dd57bc780a01e78c 100644
|
| --- a/third_party/WebKit/LayoutTests/accessibility/input-mixed.html
|
| +++ b/third_party/WebKit/LayoutTests/accessibility/input-mixed.html
|
| @@ -5,7 +5,7 @@
|
| <input id="element1" type="checkbox" />
|
| <script>
|
| // No way currently to do this via markup, must be via JS
|
| - document.getElementById('element1').indeterminate = true;
|
| + document.getElementById("element1").indeterminate = true;
|
| </script>
|
| <!-- Control-->
|
| <input id="element2" type="checkbox" />
|
| @@ -22,6 +22,19 @@
|
| <input id="element5" type="radio" checked name="radiogroup2" />
|
| </div>
|
|
|
| +<input id="input-button" type="button"/>
|
| +<input id="input-button-false" type="button" aria-pressed="false"/>
|
| +<input id="input-button-mixed" type="button" aria-pressed="mixed"/>
|
| +<input id="input-button-true" type="button" aria-pressed="true"/>
|
| +<div id="aria-button" role="button">button</div>
|
| +<div id="aria-button-false" role="button" aria-pressed="false">button</div>
|
| +<div id="aria-button-mixed" role="button" aria-pressed="mixed">button</div>
|
| +<div id="aria-button-true" role="button" aria-pressed="true">button</div>
|
| +<button id="button">button</button>
|
| +<button id="button-false" aria-pressed="false">button</button>
|
| +<button id="button-mixed" aria-pressed="mixed">button</button>
|
| +<button id="button-true" aria-pressed="true">button</button>
|
| +
|
| <script>
|
|
|
| function axElementById(id) {
|
| @@ -30,29 +43,130 @@
|
|
|
| test(function(t) {
|
| var ax = axElementById("element1");
|
| - assert_true(ax.isButtonStateMixed);
|
| + assert_true(ax.checkedState === "mixed");
|
| }, "A native indeterminate checkbox must have the mixed state");
|
|
|
| test(function(t) {
|
| var ax = axElementById("element2");
|
| - assert_false(ax.isButtonStateMixed);
|
| + assert_false(ax.checkedState === "mixed");
|
| }, "A native checkbox that is not indeterminate" +
|
| " must NOT have the mixed state");
|
|
|
| test(function(t) {
|
| var ax = axElementById("element3");
|
| - assert_true(ax.isButtonStateMixed);
|
| + assert_true(ax.checkedState === "mixed");
|
| }, "A native radio that in a group with nothing checked" +
|
| " must have the mixed state");
|
|
|
| test(function(t) {
|
| var ax = axElementById("element4");
|
| - assert_false(ax.isButtonStateMixed);
|
| + assert_false(ax.checkedState === "mixed");
|
| }, "A native radio that in a group with something checked" +
|
| " must NOT have the mixed state");
|
|
|
| test(function(t) {
|
| - var ax = axElementById("element4");
|
| - assert_false(ax.isButtonStateMixed);
|
| - }, "A checked native radio must NOT have the mixed state");
|
| + var ax = axElementById("input-button");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<input type=button> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-false");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<input type=button aria-pressed=false> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-false");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<input type=button aria-pressed=false> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-mixed");
|
| + assert_equals(ax.pressedState, "mixed");
|
| + }, "<input type=button aria-pressed=mixed> has pressed state of mixed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-mixed");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<input type=button aria-pressed=mixed> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-true");
|
| + assert_equals(ax.pressedState, "true");
|
| + }, "<input type=button aria-pressed=true> has pressed state of true");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("input-button-true");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<input type=button aria-pressed=true> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<div role=button> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-false");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<div role=button aria-pressed=false> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-false");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<div role=button aria-pressed=false> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-mixed");
|
| + assert_equals(ax.pressedState, "mixed");
|
| + }, "<div role=button aria-pressed=mixed> has pressed state of mixed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-mixed");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<div role=button aria-pressed=mixed> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-true");
|
| + assert_equals(ax.pressedState, "true");
|
| + }, "<div role=button aria-pressed=true> has pressed state of true");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("aria-button-true");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<div role=button aria-pressed=true> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<button> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-false");
|
| + assert_equals(ax.pressedState, "false");
|
| + }, "<button aria-pressed=false> is not pressed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-false");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<button aria-pressed=false> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-mixed");
|
| + assert_equals(ax.pressedState, "mixed");
|
| + }, "<button aria-pressed=mixed> has pressed state of mixed");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-mixed");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<button aria-pressed=mixed> is a toggle button");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-true");
|
| + assert_equals(ax.pressedState, "true");
|
| + }, "<button aria-pressed=true> has pressed state of true");
|
| +
|
| + test(function(t) {
|
| + var ax = axElementById("button-true");
|
| + assert_equals(ax.role, "AXRole: AXToggleButton");
|
| + }, "<button aria-pressed=true> is a toggle button");
|
| +
|
| </script>
|
|
|