blob: ef660ad69bb020d633176637125d25452ad64f03 [file] [log] [blame]
function clearSelectionAndFocusOnWebArea() {
webArea = accessibilityController.rootElement.childAtIndex(0);
webArea.resetSelectedTextMarkerRange();
setCaretBrowsingEnabled(webArea, false);
shouldBe("webArea.role", "'AXRole: AXWebArea'");
shouldBe("caretBrowsingEnabled(webArea)", "false");
return webArea;
}
function elementAtStartMarkerOfSelectedTextMarkerRange(webArea) {
var range = webArea.selectedTextMarkerRange();
var start = webArea.startTextMarkerForTextMarkerRange(range);
var element = webArea.accessibilityElementForTextMarker(start);
return element;
}
function caretBrowsingEnabled(webArea) {
return webArea.boolAttributeValue("AXCaretBrowsingEnabled");
}
function setCaretBrowsingEnabled(webArea, value) {
webArea.setBoolAttributeValue("AXCaretBrowsingEnabled", value);
}