blob: 0128e51da06fe6204cfc7aafa912ce42d7767f64 [file] [log] [blame]
// Copyright 2017 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.
(async function() {
TestRunner.addResult(`Verifies simple selector behavior.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.showPanel('elements');
await TestRunner.loadHTML(`
<div id="container" style="display: none">
<div id="foo"></div>
<div id="bar" class="foo"></div>
<div class="title"></div>
<input>
<input type="text">
<input type="text" class="text-input">
<input type="text" id="text-input">
<p class="article"></p>
<span></span>
<b></b>
</div>
`);
ElementsTestRunner.expandElementsTree(onElementsTreeExpanded);
function onElementsTreeExpanded() {
var container = ElementsTestRunner.expandedNodeWithId('container');
var children = container.children();
for (var i = 0; i < children.length; ++i)
TestRunner.addResult(children[i].simpleSelector());
TestRunner.completeTest();
}
})();