Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2011-04-11 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Chris Fleizach. [GTK] Unskip accessibility/input-slider.html and accessibility/media-element.html https://bugs.webkit.org/show_bug.cgi?id=58040 Unskip passing tests and update expectations. * platform/gtk/Skipped: Unskip passing tests. * platform/gtk/accessibility/input-slider-expected.txt: Added. * platform/gtk/accessibility/input-slider.html: Copied from accessibility/input-slider.html and adjusted accordingly. * platform/gtk/accessibility/media-element-expected.txt: Added. * platform/mac/accessibility/input-slider.html: Moved from accessibility/input-slider.html, since it is platform-specific. * platform/win/Skipped: Unskipped accessibility/input-slider.html, as it's no longer a cross-platform test. 2011-04-11 Mario Sanchez Prada <msanchez@igalia.com> Reviewed by Chris Fleizach. [GTK] Unskip accessibility/input-slider.html and accessibility/media-element.html https://bugs.webkit.org/show_bug.cgi?id=58040 Don't expose objects of role SliderThumbRoles in GTK. * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::addChildren): Allow the platform make a final decision before including children in the hierarchy. (WebCore::AccessibilitySliderThumb::accessibilityIsIgnored): Implemented by relying on accessibilityPlatformIncludesObject(). * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore accessibility objects with role SliderThumbRole. Canonical link: https://commits.webkit.org/73247@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
11 changed files
with
291 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,40 @@ | ||
825 | ||
|
||
|
||
|
||
** Test slider accessibility attributes | ||
RUN(sliderAXObject = accessibilityController.focusedElement) | ||
EXPECTED (sliderAXObject.minValue == '0') OK | ||
EXPECTED (sliderAXObject.maxValue == '100') OK | ||
EXPECTED (sliderAXObject.childrenCount == '0') OK | ||
EXPECTED (sliderAXObject.role == 'AXRole: slider') OK | ||
|
||
** Increment the slider, test slider value and div set on 'update' event | ||
RUN(sliderAXObject.increment()) | ||
EXPECTED (sliderInput.value == '55') OK | ||
EXPECTED (valueDiv.innerText == '55') OK | ||
|
||
** Decrement the slider, test slider value and div set on 'update' event | ||
RUN(sliderInput.value = 22) | ||
RUN(sliderAXObject.decrement()) | ||
EXPECTED (sliderInput.value == '17') OK | ||
EXPECTED (valueDiv.innerText == '17') OK | ||
|
||
** Change slider range | ||
RUN(sliderInput.setAttribute('max', 1000)) | ||
RUN(sliderInput.setAttribute('min', 500)) | ||
EXPECTED (sliderAXObject.minValue == '500') OK | ||
EXPECTED (sliderAXObject.maxValue == '1000') OK | ||
|
||
** Re-test incrementing the slider | ||
RUN(sliderInput.value = 600) | ||
RUN(sliderAXObject.increment()) | ||
EXPECTED (sliderInput.value == '625') OK | ||
EXPECTED (valueDiv.innerText == '625') OK | ||
|
||
** Re-test decrementing the slider | ||
RUN(sliderInput.value = 850) | ||
RUN(sliderAXObject.decrement()) | ||
EXPECTED (sliderInput.value == '825') OK | ||
EXPECTED (valueDiv.innerText == '825') OK | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,145 @@ | ||
<html> | ||
<head> | ||
<script> | ||
var sliderAXObject; | ||
var thumbAXObject; | ||
var valueDiv; | ||
|
||
if (window.layoutTestController) | ||
{ | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
} | ||
|
||
function consoleWrite(text) | ||
{ | ||
document.getElementById("console").innerHTML += text + "<br>"; | ||
} | ||
|
||
function logResult(success, text) | ||
{ | ||
if (success) | ||
consoleWrite(text + " <span style='color:green'>OK<" + "/span>"); | ||
else | ||
consoleWrite(text + " <span style='color:red'>FAIL<" + "/span>"); | ||
} | ||
|
||
function testExpected(testFuncString, expected) | ||
{ | ||
try { | ||
var observed = eval(testFuncString); | ||
} catch (ex) { | ||
consoleWrite(ex); | ||
return; | ||
} | ||
|
||
var success = (observed == expected); | ||
var msg = msg = "EXPECTED (<em>" + testFuncString + " </em> == '<em>" + expected + "</em>')"; | ||
if (!success) | ||
msg += ", OBSERVED '<em>" + observed + "</em>'"; | ||
logResult(success, msg); | ||
} | ||
|
||
function run(testFuncString) | ||
{ | ||
consoleWrite("RUN(" + testFuncString + ")"); | ||
try { | ||
eval(testFuncString); | ||
} catch (ex) { | ||
consoleWrite(ex); | ||
} | ||
} | ||
|
||
function testRanges(min, max) | ||
{ | ||
testExpected("sliderAXObject.minValue", min); | ||
testExpected("sliderAXObject.maxValue", max); | ||
} | ||
|
||
function testValues(oldValue, direction) | ||
{ | ||
// increment and decrement change by 5% of the slider's range | ||
var range = sliderInput.getAttribute('max') - sliderInput.getAttribute('min'); | ||
var expected = direction * range * 0.05 + (oldValue * 1); | ||
testExpected("sliderInput.value", expected); | ||
testExpected("valueDiv.innerText", expected); | ||
} | ||
|
||
function testIncrement() | ||
{ | ||
var oldValue = sliderInput.value; | ||
run("sliderAXObject.increment()"); | ||
testValues(oldValue, 1) | ||
} | ||
|
||
function testDecrement() | ||
{ | ||
var oldValue = sliderInput.value; | ||
run("sliderAXObject.decrement()"); | ||
testValues(oldValue, -1) | ||
} | ||
|
||
function test() | ||
{ | ||
if (!window.accessibilityController) | ||
return; | ||
|
||
var oldValue; | ||
var newValue; | ||
|
||
valueDiv = document.getElementById("val"); | ||
sliderInput = document.getElementById("slider"); | ||
|
||
sliderInput.focus(); | ||
|
||
consoleWrite("** Test slider accessibility attributes"); | ||
run("sliderAXObject = accessibilityController.focusedElement"); | ||
testRanges(0, 100); | ||
testExpected("sliderAXObject.childrenCount", 0); | ||
testExpected("sliderAXObject.role", "AXRole: slider"); | ||
|
||
consoleWrite(""); | ||
consoleWrite("** Increment the slider, test slider value and div set on 'update' event"); | ||
testIncrement(); | ||
|
||
consoleWrite(""); | ||
consoleWrite("** Decrement the slider, test slider value and div set on 'update' event"); | ||
run("sliderInput.value = 22"); | ||
testDecrement(); | ||
|
||
consoleWrite(""); | ||
consoleWrite("** Change slider range"); | ||
run("sliderInput.setAttribute('max', 1000)"); | ||
run("sliderInput.setAttribute('min', 500)"); | ||
testRanges(500, 1000); | ||
|
||
consoleWrite(""); | ||
consoleWrite("** Re-test incrementing the slider"); | ||
run("sliderInput.value = 600"); | ||
testIncrement(); | ||
|
||
consoleWrite(""); | ||
consoleWrite("** Re-test decrementing the slider"); | ||
run("sliderInput.value = 850"); | ||
testDecrement(); | ||
|
||
layoutTestController.notifyDone(); | ||
} | ||
|
||
function update(obj) | ||
{ | ||
document.getElementById('val').innerText = obj.value; | ||
} | ||
</script> | ||
</head> | ||
|
||
<body onload="test()"> | ||
|
||
<input type=range min=0 max=100 value=50 id=slider onchange="update(this)" > | ||
<span id=val>50</span> | ||
|
||
<br><br><br><br> | ||
<div id=console></div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,39 @@ | ||
Dump <video> element controller accessibility object tree at 'canplaythrough' event. | ||
|
||
+++++++++++++++++++++++++++++++++++ | ||
|
||
State at 'canplaythrough' event: | ||
|
||
description: AXDescription: video element controller | ||
role: AXRole: tool bar | ||
|
||
|
||
description: AXDescription: play | ||
role: AXRole: push button | ||
|
||
|
||
description: AXDescription: | ||
role: AXRole: panel | ||
|
||
|
||
description: AXDescription: | ||
role: AXRole: slider | ||
|
||
|
||
description: AXDescription: fast reverse | ||
role: AXRole: push button | ||
|
||
|
||
description: AXDescription: fast forward | ||
role: AXRole: push button | ||
|
||
|
||
description: AXDescription: fullscreen | ||
role: AXRole: push button | ||
|
||
|
||
description: AXDescription: mute | ||
role: AXRole: push button | ||
|
||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters