5 /* Make sure the console and the description don't interfere with the rest of the layout. */
30 border: 2px solid red;
33 background-color: darkred;
34 -webkit-flow-into: flowParent;
38 background-color: green;
42 border: 5px solid orange;
43 background-color: orange;
44 -webkit-flow-into: flowChild;
48 background-color: yellow;
52 border: 5px solid green;
54 -webkit-flow-from: flowParent;
58 border: 5px solid blue;
64 -webkit-flow-from: flowChild;
68 <script src="../../resources/js-test.js"></script>
71 <p class="visibleElement">This test covers the case when the <span style="color: orange;"><b>child</b></span> is flowed into a <span style="color: blue;"><b>region</b></span> and the <span style="color: darkred;"><b>parent</b></span> is flowed into a different <span style="color: green;"><b>region</b></span>.</p>
72 <ol class="visibleElement">
73 <li>Move the mouse inside the orange square</li>
74 <li>The orange square should turn yellow and the big darkred square should turn green</li>
76 <div class="bigBox" id="parent">
77 <div class="smallBox" id="child"></div>
80 <div class="hugeBox" id="regionParent"></div>
81 <div class="bigBox" id="regionChild"></div>
83 <script type="text/javascript">
84 description("This test covers the case when the child is flowed into a region and the parent is flowed into a different region.")
86 if (window.eventSender) {
87 var child = document.querySelector("#child");
88 var parent = document.querySelector("#parent");
90 // move mouse on the child object
91 eventSender.mouseMoveTo(child.offsetLeft + 50, child.offsetTop + 50);
92 eventSender.mouseDown(0);
93 eventSender.leapForward(500);
94 eventSender.mouseUp(0);
96 var childColor = window.getComputedStyle(child).getPropertyValue("background-color");
97 var parentColor = window.getComputedStyle(parent).getPropertyValue("background-color");
99 if (childColor == "rgb(255, 255, 0)")
100 testPassed("Child hover event processed OK.");
102 testFailed("Child hover event FAILED to process.");
104 if (parentColor == "rgb(0, 128, 0)")
105 testPassed("Parent hover event processed OK.");
107 testFailed("Parent hover event FAILED to process.");
110 if (window.testRunner) {
111 var elementsToHide = document.querySelectorAll(".visibleElement, .tinyBox, .smallBox, .bigBox, .hugeBox");
112 for (var i=0; i<elementsToHide.length; i++)
113 elementsToHide[i].style.visibility = "hidden";
117 var elementsToHide = document.querySelectorAll("#console, #description");
118 for (var i=0; i<elementsToHide.length; i++)
119 elementsToHide[i].style.visibility = "hidden";