blob: 05ec199b39d201249c2f30a936a284a8570caa0f [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<style>
.container {
font-weight: bold
}
</style>
<script>
function test()
{
InspectorTest.selectNodeAndWaitForStyles("container", step1);
function step1()
{
InspectorTest.addResult("Initial value");
InspectorTest.dumpSelectedElementStyles(true);
var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weight");
treeItem.applyStyleText("font-weight: normal", true, false);
InspectorTest.waitForStyles("container", step2);
}
function step2()
{
InspectorTest.addResult("After changing property");
InspectorTest.dumpSelectedElementStyles(true);
WebInspector.domAgent.undo();
InspectorTest.waitForStyles("container", step3);
}
function step3()
{
InspectorTest.addResult("After undo");
InspectorTest.dumpSelectedElementStyles(true);
var treeItem = InspectorTest.getMatchedStylePropertyTreeItem("font-weight");
treeItem.applyStyleText("font-weight: normal", true, false);
InspectorTest.waitForStyles("container", step4);
}
function step4()
{
InspectorTest.addResult("After perform");
InspectorTest.dumpSelectedElementStyles(true);
InspectorTest.completeTest();
}
}
</script>
</head>
<body onload="runTest()">
<p>
Tests that perform-undo-perform of the mergeable action does not crash.
</p>
<div id="container" class="container"></div>
<div id="other" class="container"></div>
</body>
</html>