| 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..bd20ed72c2070febd3b38181a97676f342d34c63
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js
|
| @@ -0,0 +1,27 @@
|
| +// 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.find({ id: 'input' });
|
| + assertTrue('lineStartOffsets' in input);
|
| + var line_starts = input.lineStartOffsets;
|
| + assertEq(1, line_starts.length());
|
| + assertEq(0, line_starts[i]);
|
| + chrome.test.succeed();
|
| + },
|
| +
|
| + function testTextarea() {
|
| + var textarea = rootNode.find({ id: 'textarea' });
|
| + assertTrue('lineStartOffsets' in textarea);
|
| + var line_starts = textarea.lineStartOffsets;
|
| + assertEq(3, line_starts.length());
|
| + assertEq(0, line_starts[0]);
|
| + assertEq(7, line_starts[1]);
|
| + assertEq(15, line_starts[2]);
|
| + chrome.test.succeed();
|
| + }
|
| +];
|
| +
|
| +setUpAndRunTests(allTests, 'line_start_offsets.html');
|
|
|