blob: 7d01e4e032953374192a3c7258393b42ecd2b723 [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<script>
function typeText()
{
var input = document.getElementById("input1");
input.focus();
eventSender.keyDown("B");
eventSender.keyDown("a");
eventSender.keyDown("r");
}
function test()
{
var containerNode;
WebInspector.settings.showShadowDOM.set(true);
InspectorTest.runTestSuite([
function testDumpInitial(next)
{
function callback(node)
{
containerNode = InspectorTest.expandedNodeWithId("container");
InspectorTest.addResult("========= Original ========");
InspectorTest.dumpElementsTree(containerNode);
next();
}
InspectorTest.expandElementsTree(callback);
},
function testAppend(next)
{
function callback()
{
InspectorTest.evaluateInPage("typeText()", callback2);
}
function callback2()
{
InspectorTest.addResult("======== Type text =========");
InspectorTest.dumpElementsTree(containerNode);
next();
}
InspectorTest.expandElementsTree(callback);
}
]);
}
</script>
</head>
<body onload="runTest()">
<p>
Tests that elements panel updates shadow dom tree structure upon typing.
</p>
<div id="container"><input type="text" id="input1"></div>
</body>
</html>