Changeset 151104 in webkit


Ignore:
Timestamp:
Jun 3, 2013 5:52:49 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt][WK1][CSS Regions] New test fast/regions/hover-on-child-parent-different-regions.html fails
https://bugs.webkit.org/show_bug.cgi?id=117035

Used waitUntilDone() to ensure correct results.

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-03
Reviewed by Antti Koivisto.

  • fast/regions/hover-on-child-parent-different-regions-expected.txt:
  • fast/regions/hover-on-child-parent-different-regions.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151103 r151104  
     12013-06-03  Radu Stavila  <stavila@adobe.com>
     2
     3        [Qt][WK1][CSS Regions]  New test fast/regions/hover-on-child-parent-different-regions.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=117035
     5
     6        Used waitUntilDone() to ensure correct results.
     7
     8        Reviewed by Antti Koivisto.
     9
     10        * fast/regions/hover-on-child-parent-different-regions-expected.txt:
     11        * fast/regions/hover-on-child-parent-different-regions.html:
     12
    1132013-06-03  Krzysztof Czech  <k.czech@samsung.com>
    214
  • trunk/LayoutTests/fast/regions/hover-on-child-parent-different-regions-expected.txt

    r150868 r151104  
    1 This test covers the case when the child is flowed into a region and the parent is flowed into a different region.
    2 
    3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    4 
    51PASS Child hover event processed OK.
    62PASS Parent hover event processed OK.
    7 PASS successfullyParsed is true
    8 
    9 TEST COMPLETE
    103
    114
  • trunk/LayoutTests/fast/regions/hover-on-child-parent-different-regions.html

    r150868 r151104  
    6868        <script src="../js/resources/js-test-pre.js"></script>
    6969</head>
    70 <body>
     70
     71<script type="text/javascript">
     72        if (!window.testRunner) {
     73                description("This test covers the case when the child is flowed into a region and the parent is flowed into a different region.")
     74
     75                var elementsToHide = document.querySelectorAll("#console, #description");
     76                for (var i=0; i<elementsToHide.length; i++)
     77                        elementsToHide[i].style.visibility = "hidden";
     78        }
     79
     80        if (window.testRunner)
     81                testRunner.waitUntilDone();
     82
     83        function beginTest() {
     84                if (window.eventSender) {
     85                        var child  = document.querySelector("#child");
     86                        var parent = document.querySelector("#parent");
     87
     88                        // move mouse on the child object
     89                        eventSender.mouseMoveTo(child.offsetLeft + 50, child.offsetTop + 50);
     90                        eventSender.mouseDown(0);
     91
     92                        setTimeout(release, 0);                 
     93                }
     94        }
     95
     96        function release() {
     97                var child  = document.querySelector("#child");
     98                var parent = document.querySelector("#parent");
     99
     100                var childColor = window.getComputedStyle(child).getPropertyValue("background-color");
     101        var parentColor = window.getComputedStyle(parent).getPropertyValue("background-color");
     102
     103                if (childColor == "rgb(255, 255, 0)")
     104                        testPassed("Child hover event processed OK.");
     105                else
     106                        testFailed("Child hover event FAILED to process.");
     107
     108                if (parentColor == "rgb(0, 128, 0)")
     109                        testPassed("Parent hover event processed OK.");
     110                else
     111                        testFailed("Parent hover event FAILED to process.");
     112
     113                var elementsToHide = document.querySelectorAll(".visibleElement, .tinyBox, .smallBox, .bigBox, .hugeBox");
     114                for (var i=0; i<elementsToHide.length; i++)
     115                        elementsToHide[i].style.visibility = "hidden";
     116
     117                if (window.eventSender)
     118                eventSender.mouseUp(0);
     119        if (window.testRunner)
     120                        setTimeout("testRunner.notifyDone()", 0);
     121        }
     122
     123</script>
     124
     125<body onload="beginTest()">
    71126        <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>
    72127        <ol class="visibleElement">
     
    80135        <div class="hugeBox" id="regionParent"></div>
    81136        <div class="bigBox" id="regionChild"></div>
    82        
    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.")
    85137
    86                 if (window.eventSender) {
    87                         var child  = document.querySelector("#child");
    88                         var parent = document.querySelector("#parent");
    89 
    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);
    95 
    96                         var childColor = window.getComputedStyle(child).getPropertyValue("background-color");
    97             var parentColor = window.getComputedStyle(parent).getPropertyValue("background-color");
    98 
    99                         if (childColor == "rgb(255, 255, 0)")
    100                                 testPassed("Child hover event processed OK.");
    101                         else
    102                                 testFailed("Child hover event FAILED to process.");
    103 
    104                         if (parentColor == "rgb(0, 128, 0)")
    105                                 testPassed("Parent hover event processed OK.");
    106                         else
    107                                 testFailed("Parent hover event FAILED to process.");
    108                 }
    109 
    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";
    114                 }
    115 
    116                 else {
    117                         var elementsToHide = document.querySelectorAll("#console, #description");
    118                         for (var i=0; i<elementsToHide.length; i++)
    119                                 elementsToHide[i].style.visibility = "hidden";
    120                 }
    121         </script>
    122 
    123         <script src="../js/resources/js-test-post.js"></script>
     138        <div
    124139</body>
    125140</html>
Note: See TracChangeset for help on using the changeset viewer.