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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js

Issue 2514583002: Ensure fake alert window attached to AXAura tree and refine alert dialog output (Closed)
Patch Set: Fix test. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview ChromeVox predicates for the automation extension API. 6 * @fileoverview ChromeVox predicates for the automation extension API.
7 */ 7 */
8 8
9 goog.provide('AutomationPredicate'); 9 goog.provide('AutomationPredicate');
10 goog.provide('AutomationPredicate.Binary'); 10 goog.provide('AutomationPredicate.Binary');
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 })(node); 293 })(node);
294 }; 294 };
295 295
296 /** 296 /**
297 * Matches against nodes that contain interesting nodes, but should never be 297 * Matches against nodes that contain interesting nodes, but should never be
298 * visited. 298 * visited.
299 * @param {!AutomationNode} node 299 * @param {!AutomationNode} node
300 * @return {boolean} 300 * @return {boolean}
301 */ 301 */
302 AutomationPredicate.structuralContainer = AutomationPredicate.roles([ 302 AutomationPredicate.structuralContainer = AutomationPredicate.roles([
303 Role.alertDialog,
304 Role.dialog,
303 Role.rootWebArea, 305 Role.rootWebArea,
304 Role.webView, 306 Role.webView,
307 Role.window,
305 Role.embeddedObject, 308 Role.embeddedObject,
306 Role.iframe, 309 Role.iframe,
307 Role.iframePresentational]); 310 Role.iframePresentational]);
308 311
309 /** 312 /**
310 * Returns whether the given node should not be crossed when performing 313 * Returns whether the given node should not be crossed when performing
311 * traversals up the ancestry chain. 314 * traversals up the ancestry chain.
312 * @param {AutomationNode} node 315 * @param {AutomationNode} node
313 * @return {boolean} 316 * @return {boolean}
314 */ 317 */
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 355
353 // Ignore some roles. 356 // Ignore some roles.
354 return AutomationPredicate.leaf(node) && 357 return AutomationPredicate.leaf(node) &&
355 (AutomationPredicate.roles([Role.client, 358 (AutomationPredicate.roles([Role.client,
356 Role.column, 359 Role.column,
357 Role.div, 360 Role.div,
358 Role.group, 361 Role.group,
359 Role.image, 362 Role.image,
360 Role.staticText, 363 Role.staticText,
361 Role.svgRoot, 364 Role.svgRoot,
362 Role.tableHeaderContainer])(node)); 365 Role.tableHeaderContainer,
366 Role.unknown
367 ])(node));
363 }; 368 };
364 369
365 /** 370 /**
366 * Returns if the node has a meaningful checked state. 371 * Returns if the node has a meaningful checked state.
367 * @param {!AutomationNode} node 372 * @param {!AutomationNode} node
368 * @return {boolean} 373 * @return {boolean}
369 */ 374 */
370 AutomationPredicate.checkable = AutomationPredicate.roles([ 375 AutomationPredicate.checkable = AutomationPredicate.roles([
371 Role.checkBox, 376 Role.checkBox,
372 Role.radioButton, 377 Role.radioButton,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 * @param {number} level 1-6 466 * @param {number} level 1-6
462 * @return {AutomationPredicate.Unary} 467 * @return {AutomationPredicate.Unary}
463 */ 468 */
464 AutomationPredicate.makeHeadingPredicate = function(level) { 469 AutomationPredicate.makeHeadingPredicate = function(level) {
465 return function(node) { 470 return function(node) {
466 return node.role == Role.heading && node.hierarchicalLevel == level; 471 return node.role == Role.heading && node.hierarchicalLevel == level;
467 }; 472 };
468 }; 473 };
469 474
470 }); // goog.scope 475 }); // goog.scope
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698