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

Unified Diff: chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js

Issue 2301833005: Get rid of AX_LINE_BREAKS attribute to improve performance. (Closed)
Patch Set: Fixed line length issue. Created 4 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: chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js
new file mode 100644
index 0000000000000000000000000000000000000000..994241967c67f6cc05351ae8d0143734d9e11e5c
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var allTests = [
+ function testInput() {
+ var input = rootNode.firstChild.firstChild;
dmazzoni 2016/09/13 17:29:38 This is fragile, anytime we change what nodes are
+ rootNode.addEventListener(
+ EventType.childrenChanged, function(e) {
dmazzoni 2016/09/13 17:29:38 Why are you running this on childrenChanged? Is th
+ var line_starts = input.lineStartOffsets();
+ assertNotNull(lineStarts);
+ assertEq(1, line_starts.length());
+ assertEq(0, line_starts[i]);
+ });
+ },
+
+ function testTextarea() {
+ var input = rootNode.firstChild.firstChild;
+ rootNode.addEventListener(
+ EventType.childrenChanged, function(e) {
+ var line_starts = textarea.lineStartOffsets();
+ assertNotNull(lineStarts);
+ assertEq(3, line_starts.length());
+ assertEq(0, line_starts[i]);
+ });
+ }
+];
+
+setUpAndRunTests(allTests);

Powered by Google App Engine
This is Rietveld 408576698