blob: e7cc8587d6f374ab0027aa959064cf9fe20bad1d [file]
<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.experimentsSettings.showShadowDOM = {};
WebInspector.experimentsSettings.showShadowDOM.isEnabled = function() { return 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>