⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 178078 in webkit


Ignore:
Timestamp:
Jan 7, 2015, 6:17:51 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Two tests, which include data uri images, need to be changed and rebaselined since the expected results are incorrect.
https://bugs.webkit.org/show_bug.cgi?id=140199.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-01-07
Reviewed by Simon Fraser.

  • compositing/tiling/huge-layer-img-expected.txt:
  • compositing/tiling/huge-layer-img.html:
  • platform/mac/compositing/tiling/huge-layer-img-expected.txt:

This test draws a huge image on a canvas and then gets the data uri from the canvas and
set it as the source of an <img> tag. We need to rebaseline the expected results since
the original ones were incorrect. The test was getting the layer tree too early. Before
the image data was loaded, a tiled layer was created. After the image data is loaded, we
could have figured out that the image is a simple one and we could have removed the tiling.
The fix is to change the test to delay capturing the layer tree only after making sure
that the image data is loaded.

  • fast/forms/basic-buttons.html:
  • platform/mac-mountainlion/fast/forms/basic-buttons-expected.txt:
  • platform/mac/fast/forms/basic-buttons-expected.png:
  • platform/mac/fast/forms/basic-buttons-expected.txt:

This test includes a data uri image just to not include a file for the image by itself.
We need to rebaseline the expected results since the original ones were incorrect. The
test was assuming that after the <img> tag is added to the HTML body, the image size can
be retrieved immediately. Because this assumption is incorrect in general, we were getting
empty sizes for all the the data uri images. The fix is to change the test such that it
prints the sizes of the images only after making sure that all the images are loaded.

Location:
trunk/LayoutTests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r178076 r178078  
     12015-01-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Two tests, which include data uri images, need to be changed and rebaselined since the expected results are incorrect.
     4        https://bugs.webkit.org/show_bug.cgi?id=140199.
     5
     6        Reviewed by Simon Fraser.
     7
     8        * compositing/tiling/huge-layer-img-expected.txt:
     9        * compositing/tiling/huge-layer-img.html:
     10        * platform/mac/compositing/tiling/huge-layer-img-expected.txt:
     11        This test draws a huge image on a canvas and then gets the data uri from the canvas and
     12        set it as the source of an <img> tag. We need to rebaseline the expected results since
     13        the original ones were incorrect. The test was getting the layer tree too early. Before
     14        the image data was loaded, a tiled layer was created. After the image data is loaded, we
     15        could have figured out that the image is a simple one and we could have removed the tiling.
     16        The fix is to change the test to delay capturing the layer tree only after making sure
     17        that the image data is loaded.
     18       
     19        * fast/forms/basic-buttons.html:
     20        * platform/mac-mountainlion/fast/forms/basic-buttons-expected.txt:
     21        * platform/mac/fast/forms/basic-buttons-expected.png:
     22        * platform/mac/fast/forms/basic-buttons-expected.txt:
     23        This test includes a data uri image just to not include a file for the image by itself.
     24        We need to rebaseline the expected results since the original ones were incorrect. The
     25        test was assuming that after the <img> tag is added to the HTML body, the image size can
     26        be retrieved immediately. Because this assumption is incorrect in general, we were getting
     27        empty sizes for all the the data uri images. The fix is to change the test such that it
     28        prints the sizes of the images only after making sure that all the images are loaded.
     29
    1302015-01-07  Brent Fulgham  <bfulgham@apple.com>
    231
  • trunk/LayoutTests/compositing/tiling/huge-layer-img-expected.txt

    r141634 r178078  
    1010          (position 8.00 8.00)
    1111          (bounds 500.00 20000.00)
    12           (drawsContent 1)
    1312        )
    1413      )
  • trunk/LayoutTests/compositing/tiling/huge-layer-img.html

    r132673 r178078  
    1313    </style>
    1414    <script type="text/javascript" charset="utf-8">
    15         if (window.testRunner)
     15        if (window.testRunner) {
    1616            testRunner.dumpAsText(true);
     17            testRunner.waitUntilDone();
     18        }
    1719
    1820        function testOnLoad()
     
    2830            context.fillRect(50, 50, 200, 200);
    2931            img.src = canvas.toDataURL();
    30 
    31             if (window.testRunner)
     32        }
     33       
     34        function onImageLoad()
     35        {
     36            if (window.testRunner) {
    3237                document.getElementById('layers').innerHTML = window.internals.layerTreeAsText(document);
     38                testRunner.notifyDone();
     39            }
    3340        }
    3441
     
    4249        This tests that we can support very large composited image layers.
    4350      -->
    44         <img id="container">
     51        <img onload="onImageLoad()" id="container">
    4552        <pre id="layers">Layer tree appears here in DRT.</pre>
    4653  </body>
  • trunk/LayoutTests/fast/forms/basic-buttons.html

    r168868 r178078  
    1 <!DocType html><html>
     1<!DocType html>
     2<html>
    23<body>
    34
     
    910<script>
    1011var fooImage = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Red dot" />';
     12
     13if (window.testRunner)
     14    testRunner.waitUntilDone();
    1115
    1216function getRowHtml(style)
     
    3236     '</tbody></table>';
    3337
    34 function printSize(tagname, cell)
     38function printSize(tagname)
    3539{
    3640    var buttons = document.getElementsByTagName(tagname);
     
    4953}
    5054
    51 printSize('button');
    52 printSize('input');
     55function testOnLoad()
     56{
     57    printSize('button');
     58    printSize('input');
     59    if (window.testRunner)
     60        testRunner.notifyDone();
     61}
     62
     63window.addEventListener('load', testOnLoad, false);
     64
    5365</script>
    5466
  • trunk/LayoutTests/platform/mac-mountainlion/fast/forms/basic-buttons-expected.txt

    r177774 r178078  
    4343            RenderTableCell {TD} at (229,22) size 157x20 [r=1 c=2 rs=1 cs=1]
    4444              RenderText {#text} at (1,1) size 104x18
    45                 text run at (1,1) width 104: "(18, 16) (18, 12)"
     45                text run at (1,1) width 104: "(18, 26) (18, 22)"
    4646            RenderTableCell {TD} at (386,20) size 132x24 [r=1 c=3 rs=1 cs=1]
    4747              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    6161                  RenderImage {IMG} at (0,1) size 10x10
    6262            RenderTableCell {TD} at (229,46) size 157x20 [r=2 c=2 rs=1 cs=1]
    63               RenderText {#text} at (1,1) size 88x18
    64                 text run at (1,1) width 88: "(15, 4) (15, 0)"
     63              RenderText {#text} at (1,1) size 104x18
     64                text run at (1,1) width 104: "(15, 14) (15, 10)"
    6565            RenderTableCell {TD} at (386,44) size 132x24 [r=2 c=3 rs=1 cs=1]
    6666              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    8181            RenderTableCell {TD} at (229,73) size 157x20 [r=3 c=2 rs=1 cs=1]
    8282              RenderText {#text} at (1,1) size 104x18
    83                 text run at (1,1) width 104: "(25, 16) (25, 12)"
     83                text run at (1,1) width 104: "(25, 26) (25, 22)"
    8484            RenderTableCell {TD} at (386,71) size 132x24 [r=3 c=3 rs=1 cs=1]
    8585              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    9999                  RenderImage {IMG} at (0,1) size 10x10
    100100            RenderTableCell {TD} at (229,100) size 157x20 [r=4 c=2 rs=1 cs=1]
    101               RenderText {#text} at (1,1) size 88x18
    102                 text run at (1,1) width 88: "(17, 8) (17, 4)"
     101              RenderText {#text} at (1,1) size 104x18
     102                text run at (1,1) width 104: "(17, 18) (17, 14)"
    103103            RenderTableCell {TD} at (386,98) size 132x24 [r=4 c=3 rs=1 cs=1]
    104104              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    119119            RenderTableCell {TD} at (229,124) size 157x20 [r=5 c=2 rs=1 cs=1]
    120120              RenderText {#text} at (1,1) size 104x18
    121                 text run at (1,1) width 104: "(18, 16) (18, 12)"
     121                text run at (1,1) width 104: "(18, 26) (18, 22)"
    122122            RenderTableCell {TD} at (386,122) size 132x24 [r=5 c=3 rs=1 cs=1]
    123123              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    138138            RenderTableCell {TD} at (229,148) size 157x20 [r=6 c=2 rs=1 cs=1]
    139139              RenderText {#text} at (1,1) size 104x18
    140                 text run at (1,1) width 104: "(19, 18) (19, 14)"
     140                text run at (1,1) width 104: "(19, 28) (19, 24)"
    141141            RenderTableCell {TD} at (386,146) size 132x24 [r=6 c=3 rs=1 cs=1]
    142142              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    157157            RenderTableCell {TD} at (229,190) size 157x20 [r=7 c=2 rs=1 cs=1]
    158158              RenderText {#text} at (1,1) size 104x18
    159                 text run at (1,1) width 104: "(53, 44) (53, 40)"
     159                text run at (1,1) width 104: "(53, 54) (53, 50)"
    160160            RenderTableCell {TD} at (386,188) size 132x24 [r=7 c=3 rs=1 cs=1]
    161161              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
  • trunk/LayoutTests/platform/mac/compositing/tiling/huge-layer-img-expected.txt

    r168244 r178078  
    1111          (position 8.00 8.00)
    1212          (bounds 500.00 20000.00)
    13           (usingTiledLayer 1)
    14           (drawsContent 1)
    1513        )
    1614      )
  • trunk/LayoutTests/platform/mac/fast/forms/basic-buttons-expected.txt

    r177774 r178078  
    4343            RenderTableCell {TD} at (231,22) size 161x20 [r=1 c=2 rs=1 cs=1]
    4444              RenderText {#text} at (1,1) size 106x18
    45                 text run at (1,1) width 106: "(18, 16) (18, 12)"
     45                text run at (1,1) width 106: "(18, 26) (18, 22)"
    4646            RenderTableCell {TD} at (392,20) size 135x24 [r=1 c=3 rs=1 cs=1]
    4747              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    6161                  RenderImage {IMG} at (0,1) size 10x10
    6262            RenderTableCell {TD} at (231,46) size 161x20 [r=2 c=2 rs=1 cs=1]
    63               RenderText {#text} at (1,1) size 90x18
    64                 text run at (1,1) width 90: "(15, 4) (15, 0)"
     63              RenderText {#text} at (1,1) size 106x18
     64                text run at (1,1) width 106: "(15, 14) (15, 10)"
    6565            RenderTableCell {TD} at (392,44) size 135x24 [r=2 c=3 rs=1 cs=1]
    6666              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    8181            RenderTableCell {TD} at (231,73) size 161x20 [r=3 c=2 rs=1 cs=1]
    8282              RenderText {#text} at (1,1) size 106x18
    83                 text run at (1,1) width 106: "(25, 16) (25, 12)"
     83                text run at (1,1) width 106: "(25, 26) (25, 22)"
    8484            RenderTableCell {TD} at (392,71) size 135x24 [r=3 c=3 rs=1 cs=1]
    8585              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    9999                  RenderImage {IMG} at (0,1) size 10x10
    100100            RenderTableCell {TD} at (231,100) size 161x20 [r=4 c=2 rs=1 cs=1]
    101               RenderText {#text} at (1,1) size 90x18
    102                 text run at (1,1) width 90: "(17, 8) (17, 4)"
     101              RenderText {#text} at (1,1) size 106x18
     102                text run at (1,1) width 106: "(17, 18) (17, 14)"
    103103            RenderTableCell {TD} at (392,98) size 135x24 [r=4 c=3 rs=1 cs=1]
    104104              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    119119            RenderTableCell {TD} at (231,124) size 161x20 [r=5 c=2 rs=1 cs=1]
    120120              RenderText {#text} at (1,1) size 106x18
    121                 text run at (1,1) width 106: "(18, 16) (18, 12)"
     121                text run at (1,1) width 106: "(18, 26) (18, 22)"
    122122            RenderTableCell {TD} at (392,122) size 135x24 [r=5 c=3 rs=1 cs=1]
    123123              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    138138            RenderTableCell {TD} at (231,148) size 161x20 [r=6 c=2 rs=1 cs=1]
    139139              RenderText {#text} at (1,1) size 106x18
    140                 text run at (1,1) width 106: "(19, 18) (19, 14)"
     140                text run at (1,1) width 106: "(19, 28) (19, 24)"
    141141            RenderTableCell {TD} at (392,146) size 135x24 [r=6 c=3 rs=1 cs=1]
    142142              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
     
    157157            RenderTableCell {TD} at (231,190) size 161x20 [r=7 c=2 rs=1 cs=1]
    158158              RenderText {#text} at (1,1) size 106x18
    159                 text run at (1,1) width 106: "(53, 44) (53, 40)"
     159                text run at (1,1) width 106: "(53, 54) (53, 50)"
    160160            RenderTableCell {TD} at (392,188) size 135x24 [r=7 c=3 rs=1 cs=1]
    161161              RenderButton {INPUT} at (3,3) size 34x18 [bgcolor=#C0C0C0]
Note: See TracChangeset for help on using the changeset viewer.