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

Unified Diff: chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js

Issue 517853002: ChromeVox should not speak live regions that aren't in the document. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/common/dom_util.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js
diff --git a/chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js b/chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js
index dd387984de215449d4c93e9d91f5dd248a6e7547..32b0c26b957fd1bf983e37526390fa77343ea991 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/dom_util_test.js
@@ -141,6 +141,12 @@ TEST_F('CvoxDomUtilUnitTest', 'IsVisible', function() {
node = $('nested_visibility_hide');
assertEquals(false,
cvox.DomUtil.isVisible(node, {checkDescendants: false}));
+
+ // Test that an element not part of the DOM is treated as invisible.
+ var div = document.createElement('div');
+ assertEquals(false, cvox.DomUtil.isVisible(div));
+ document.body.appendChild(div);
+ assertEquals(true, cvox.DomUtil.isVisible(div));
});
/** Test determining if a node is a leaf node or not. @export */
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/common/dom_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698