Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API name to "get_platform_accessibility_node" #12

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core-aam/acacia/blockquote.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<script>
promise_test(async t => {
const node = await test_driver.get_accessibility_api_node('test');
const node = await test_driver.get_platform_accessibility_node('test');

if (node.API == 'atspi') {
assert_equals(node.role, 'block quote', 'Atspi role');
Expand Down
2 changes: 1 addition & 1 deletion core-aam/acacia/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<script>
promise_test(async t => {
const node = await test_driver.get_accessibility_api_node('test');
const node = await test_driver.get_platform_accessibility_node('test');

if (node.API == 'atspi') {
assert_equals(node.role, 'push button', 'Atspi role');
Expand Down
8 changes: 4 additions & 4 deletions resources/testdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,8 @@
* @returns {Promise} Fullfilled with object representing accessibilty node,
* rejected in the cases of failures.
*/
get_accessibility_api_node: async function(dom_id) {
return window.test_driver_internal.get_accessibility_api_node(dom_id, location.href)
get_platform_accessibility_node: async function(dom_id) {
return window.test_driver_internal.get_platform_accessibility_node(dom_id, location.href)
.then((jsonresult) => {
return JSON.parse(jsonresult);
});
Expand Down Expand Up @@ -1270,8 +1270,8 @@
throw new Error("clear_device_posture() is not implemented by testdriver-vendor.js");
},

async get_accessibility_api_node(dom_id, url) {
throw new Error("get_accessibility_api_node() is not available.");
async get_platform_accessibility_node(dom_id, url) {
throw new Error("get_platform_accessibility_node() is not available.");
}
};
})();
4 changes: 2 additions & 2 deletions tools/wptrunner/wptrunner/executors/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def __call__(self, payload):
return self.protocol.device_posture.clear_device_posture()

class GetAccessibilityAPINodeAction:
name = "get_accessibility_api_node"
name = "get_platform_accessibility_node"

def __init__(self, logger, protocol):
self.logger = logger
Expand All @@ -474,7 +474,7 @@ def __init__(self, logger, protocol):
def __call__(self, payload):
dom_id = payload["dom_id"]
url = payload["url"]
return self.protocol.platform_accessibility.get_accessibility_api_node(dom_id, url)
return self.protocol.platform_accessibility.get_platform_accessibility_node(dom_id, url)


actions = [ClickAction,
Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/executoratspi.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def setup(self, product_name, logger):
)


def get_accessibility_api_node(self, dom_id, url):
def get_platform_accessibility_node(self, dom_id, url):
if not self.root:
raise Exception(
f"Couldn't find browser {self.product_name} in accessibility API ATSPI. Did you turn on accessibility?"
Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/executoraxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def setup(self, product_name):
raise Exception(f"Couldn't find application: {product_name}")


def get_accessibility_api_node(self, dom_id, url):
def get_platform_accessibility_node(self, dom_id, url):
tab = find_active_tab(self.root)
node = find_node(tab, "AXDOMIdentifier", dom_id)
if not node:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ def setup(self):
self.impl = WindowsAccessibilityExecutorImpl()
self.impl.setup(self.product_name)

def get_accessibility_api_node(self, dom_id, url):
return self.impl.get_accessibility_api_node(dom_id, url)
def get_platform_accessibility_node(self, dom_id, url):
return self.impl.get_platform_accessibility_node(dom_id, url)
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class WindowsAccessibilityExecutorImpl:
def setup(self, product_name):
self.product_name = product_name

def get_accessibility_api_node(self, dom_id, url):
def get_platform_accessibility_node(self, dom_id, url):
self.root = find_browser(self.product_name)
if not self.root:
raise Exception(f"Couldn't find browser {self.product_name}.")
Expand Down
4 changes: 2 additions & 2 deletions tools/wptrunner/wptrunner/testdriver-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
return create_action("clear_device_posture", {context});
};

window.test_driver_internal.get_accessibility_api_node = function(dom_id, url) {
return create_action("get_accessibility_api_node", {dom_id, url});
window.test_driver_internal.get_platform_accessibility_node = function(dom_id, url) {
return create_action("get_platform_accessibility_node", {dom_id, url});
};
})();