| <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> |