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

Unified Diff: LayoutTests/accessibility/inline-text-word-boundary-causes-crash.html

Issue 542553002: Fix crash when trying to iterate over words in an inline text box of length zero. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: LayoutTests/accessibility/inline-text-word-boundary-causes-crash.html
diff --git a/LayoutTests/accessibility/inline-text-word-boundary-causes-crash.html b/LayoutTests/accessibility/inline-text-word-boundary-causes-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..785740a63e996ae067bfb61393d7fe7c4a695164
--- /dev/null
+++ b/LayoutTests/accessibility/inline-text-word-boundary-causes-crash.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+<style>
+ h1:first-letter {
+ text-transform:uppercase;
+ }
+</style>
+</head>
+<body>
+
+ <h1 id="heading">
+ heading
+ </h1>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+description("Makes sure that accessing the word boundaries of an AXStaticText object doesn't cause a crash when it has an inline text box of length zero.");
+if (window.accessibilityController) {
+ var axHeading = accessibilityController.accessibleElementById('heading');
+ var axStaticText = axHeading.childAtIndex(0);
+ debug('Word start for index -1: ' + axStaticText.wordStart(-1));
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698