blob: 53be35ce40f7a63061fb44b4ff401de04af7fb40 [file] [log] [blame]
<script src="../../../resources/js-test-pre.js"></script>
<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/scheduler.js" type="text/javascript"></script>
<script src="../../../../Source/WebCore/Modules/modern-media-controls/controls/layout-node.js" type="text/javascript"></script>
<script src="../resources/media-controls-utils.js" type="text/javascript"></script>
<script type="text/javascript">
description("Making a node dirty again during a commit.");
window.jsTestIsAsync = true;
class CustomNode extends LayoutNode
{
commit()
{
super.commit();
this.x = 10;
}
}
const node = new CustomNode;
node.x = 20;
let numberOfFrames = 0;
scheduler.frameDidFire = function()
{
numberOfFrames++;
if (numberOfFrames == 1)
shouldBeEqualToString("node.element.style.left", "20px");
else if (numberOfFrames == 2) {
shouldBeEqualToString("node.element.style.left", "10px");
finishMediaControlsTest();
}
};
</script>
<script src="../../../resources/js-test-post.js"></script>