repaint-on-style-change.html 666 B

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Test for repaint on style change</title>
  5. <script src="resources/text-based-repaint.js" type="text/javascript"></script>
  6. <script>
  7. function repaintTest()
  8. {
  9. if (!window.testRunner)
  10. return;
  11. document.getElementById('box').style['background-color'] = 'green';
  12. }
  13. </script>
  14. <style>
  15. div {
  16. background-color: magenta;
  17. height: 100px;
  18. width: 100px;
  19. position: absolute;
  20. top: 260px;
  21. left: 260px;
  22. }
  23. </style>
  24. </head>
  25. <body onload="runRepaintAndPixelTest()">
  26. <div id='box'> </div>
  27. </body>
  28. </html>