blob: d72426a41d9b2743381cc9ba4773cd48c11952b7 [file] [log] [blame]
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/elements-test.js"></script>
<script src="edit-dom-test.js"></script>
<script>
function test()
{
// Save time on style updates.
UI.viewManager.showView("elements");
Elements.StylesSidebarPane.prototype.update = function() {};
Elements.MetricsSidebarPane.prototype.update = function() {};
InspectorTest.runTestSuite([
function testSetUp(next)
{
InspectorTest.expandElementsTree(next);
},
function testSetAuthorShadowDOMElementAttribute(next)
{
InspectorTest.domActionTestForNodeId("testSetAuthorShadowDOMElementAttribute", "shadow-node-to-set-attribute", testBody, next);
function testBody(node, done)
{
InspectorTest.editNodePartAndRun(node, "webkit-html-attribute", "bar=\"edited attribute\"", done, true);
}
},
]);
}
</script>
</head>
<body onload="runTest()">
<p>
Tests that user can mutate author shadow DOM by means of elements panel.
</p>
<div>
<div id="testSetAuthorShadowDOMElementAttribute"></div>
</div>
<script>
function createRootWithContents(id, html)
{
var container = document.getElementById(id);
var root = container.createShadowRoot();
root.innerHTML = html;
}
createRootWithContents("testSetAuthorShadowDOMElementAttribute", "<div foo='attribute value' id='shadow-node-to-set-attribute'></div>");
</script>
</body>
</html>