/LayoutTests/fast/regions/hover-content-inside-iframe-in-region.html

https://github.com/ayeung/webkit · HTML · 40 lines · 40 code · 0 blank · 0 comment · 0 complexity · 1fbea76506d9a684d07552b875531d7b MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. #region {
  6. -webkit-flow-from: flow;
  7. width: 150px;
  8. height: 150px;
  9. position: absolute;
  10. top: 150px;
  11. left: 150px;
  12. border: 5px solid black;
  13. background-color: green;
  14. }
  15. #iframe {
  16. -webkit-flow-into: flow;
  17. border: none;
  18. width: 150px;
  19. height: 150px;
  20. }
  21. </style>
  22. </head>
  23. <body onload="test()">
  24. <iframe id="iframe" src="resources/iframe-in-region-source.html"></iframe>
  25. <p>Test that moving the cursor over the content of an iframe that is displayed in region correctly aplies the hover style for the content.</p>
  26. <p>To manually test, move the cursor over the red square.</p>
  27. <p>On success, you should see a green rectangle with black border and no red.</p>
  28. <div id="region"></div>
  29. <script>
  30. function test() {
  31. if (window.eventSender) {
  32. var regionRect = document.getElementById("region").getBoundingClientRect();
  33. var iframe = document.getElementById("iframe");
  34. window.eventSender.mouseMoveTo(iframe.offsetLeft + 20, iframe.offsetTop + 20);
  35. window.eventSender.mouseDown(0);
  36. }
  37. }
  38. </script>
  39. </body>
  40. </html>