Commit 9257c53d authored by David Tseng's avatar David Tseng Committed by Commit Bot

Test nextOnLine does not return ignored nodes

Bug: 1001562

Change-Id: I0e0eb5ab1b04f20605946c525ea4abdea831c11f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1791439Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695289}
parent 1ae5304c
......@@ -414,6 +414,13 @@ IN_PROC_BROWSER_TEST_F(AutomationApiTestWithLanguageDetection,
<< message_;
}
IN_PROC_BROWSER_TEST_F(AutomationApiTest, IgnoredNodesNotReturned) {
StartEmbeddedTestServer();
ASSERT_TRUE(RunExtensionSubtest("automation/tests/tabs",
"ignored_nodes_not_returned.html"))
<< message_;
}
#if defined(OS_CHROMEOS)
class AutomationApiTestWithDeviceScaleFactor : public AutomationApiTest {
......
<!--
* Copyright 2019 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.
-->
<html>
<body>
<div role="textbox" contenteditable>
This is a test<br role="presentation"> of a content editable.
</div>
</body>
</html>
<!--
* Copyright 2019 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.
-->
<script src="common.js"></script>
<script src="ignored_nodes_not_returned.js"></script>
// Copyright 2019 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 testIgnoredNodesNotReturned() {
var node = rootNode.find({role: chrome.automation.RoleType.STATIC_TEXT});
assertEq('This is a test', node.name);
assertEq(1, node.children.length);
assertEq(chrome.automation.RoleType.INLINE_TEXT_BOX, node.firstChild.role);
assertEq('This is a test', node.firstChild.name);
// The line break is ignored and should not show up.
assertEq(undefined, node.nextOnLine);
assertEq(undefined, node.firstChild.nextOnLine);
node = node.nextSibling;
assertEq('of a content editable.', node.name);
assertEq(1, node.children.length);
assertEq(chrome.automation.RoleType.INLINE_TEXT_BOX, node.firstChild.role);
assertEq('of a content editable.', node.firstChild.name);
chrome.test.succeed();
}
];
setUpAndRunTests(allTests, 'ignored_nodes_not_returned.html');
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment