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

Changeset 202904 in webkit


Ignore:
Timestamp:
Jul 7, 2016, 7:20:20 AM (10 years ago)
Author:
fred.wang@free.fr
Message:

Rewrite the tests of scripts-subsup.html
https://bugs.webkit.org/show_bug.cgi?id=159202

The tests for script metrics in scripts-subsup.html are very unreliable and difficult to
debug. They currently fail on all platforms. We remove them and import a test from the
MathML in HTML5 test suite that verifies equivalent features in a more reliable and
understandable way. The equivalence test for msubsup and empty script is not preserved as
the current code does not actually try to achieve this equivalence.

Patch by Frederic Wang <fwang@igalia.com> on 2016-07-07
Reviewed by Martin Robinson.

  • imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-1-expected.txt: Added.
  • imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-1.html: Added.
  • mathml/presentation/scripts-subsup-expected.html: Remove the tests for metrics.
  • mathml/presentation/scripts-subsup.html: Ditto.
  • platform/gtk/TestExpectations: Remove failure for scripts-subsup.html.
  • platform/ios-simulator-wk1/TestExpectations: Ditto.
  • platform/ios-simulator/TestExpectations: Ditto.
  • platform/mac/TestExpectations: Ditto.
  • platform/win/TestExpectations: Ditto.
Location:
trunk/LayoutTests
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202903 r202904  
     12016-07-07  Frederic Wang  <fwang@igalia.com>
     2
     3        Rewrite the tests of scripts-subsup.html
     4        https://bugs.webkit.org/show_bug.cgi?id=159202
     5
     6        The tests for script metrics in scripts-subsup.html are very unreliable and difficult to
     7        debug. They currently fail on all platforms. We remove them and import a test from the
     8        MathML in HTML5 test suite that verifies equivalent features in a more reliable and
     9        understandable way. The equivalence test for msubsup and empty script is not preserved as
     10        the current code does not actually try to achieve this equivalence.
     11
     12        Reviewed by Martin Robinson.
     13
     14        * imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-1-expected.txt: Added.
     15        * imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-1.html: Added.
     16        * mathml/presentation/scripts-subsup-expected.html: Remove the tests for metrics.
     17        * mathml/presentation/scripts-subsup.html: Ditto.
     18        * platform/gtk/TestExpectations: Remove failure for scripts-subsup.html.
     19        * platform/ios-simulator-wk1/TestExpectations: Ditto.
     20        * platform/ios-simulator/TestExpectations: Ditto.
     21        * platform/mac/TestExpectations: Ditto.
     22        * platform/win/TestExpectations: Ditto.
     23
    1242016-07-07  Frederic Wang  <fwang@igalia.com>
    225
  • trunk/LayoutTests/mathml/presentation/scripts-subsup-expected.html

    r180904 r202904  
    99      border: 0;
    1010      }
    11       td {
    12       border: 1px solid black;
    13       text-align: center; width: 100px; height: 100px;
    14       vertical-align: middle;
    15       }
    16       span {
    17       display: inline-block;
    18       background: black;
    19       border: 0;
    20       margin: 0;
    21       }
    2211    </style>
    2312  </head>
    2413  <body>
    25 
    26     <!-- The sub/sup scripts should be hidden by the black rectangles -->
    27     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
    28       <tr>
    29         <td style="text-align: left; vertical-align: top;">
    30           <math style="font-family: Ahem;">
    31             <msub>
    32               <mtext>X</mtext>
    33               <mtext style="visibility: hidden;">X</mtext>
    34             </msub>
    35           </math>
    36         </td>
    37         <td style="text-align: left;">
    38           <math style="font-family: Ahem;">
    39             <msubsup>
    40               <mtext>X</mtext>
    41               <mtext style="visibility: hidden;">X</mtext>
    42               <mtext style="visibility: hidden;">X</mtext>
    43             </msubsup>
    44           </math>
    45         </td>
    46         <td style="text-align: left; vertical-align: bottom;">
    47           <math style="font-family: Ahem;">
    48             <msup>
    49               <mtext>X</mtext>
    50               <mtext style="visibility: hidden;">X</mtext>
    51             </msup>
    52           </math>
    53         </td>
    54       </tr>
    55     </table>
    56 
    57     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
    58       <tr>
    59         <td style="text-align: left; vertical-align: top;">
    60           <span style="visibility: hidden;">X</span><span style="vertical-align: -25%;">X</span>
    61         </td>
    62         <td style="text-align: left;">
    63           <span style="visibility: hidden;">X</span><span>X<br/>X</span>
    64         </td>
    65         <td style="text-align: left; vertical-align: bottom;">
    66           <span style="visibility: hidden;">X</span><span style="vertical-align: +50%;">X</span>
    67         </td>
    68       </tr>
    69     </table>
    70 
    71     <!-- The bases should be hidden by the black rectangles -->
    72     <table style="position: absolute; top: 120px; left: 10px;">
    73       <tr>
    74         <td style="text-align: left; vertical-align: top;">
    75           <math>
    76             <msub>
    77               <mtext style="visibility: hidden;">X</mtext>
    78               <mtext>X</mtext>
    79             </msub>
    80           </math>
    81         </td>
    82         <td style="text-align: left;">
    83           <math>
    84             <msubsup>
    85               <mtext style="visibility: hidden;">X</mtext>
    86               <mtext>X</mtext>
    87               <mtext>X</mtext>
    88             </msubsup>
    89           </math>
    90         </td>
    91         <td style="text-align: left; vertical-align: bottom;">
    92           <math>
    93             <msup>
    94               <mtext style="visibility: hidden;">X</mtext>
    95               <mtext>X</mtext>
    96             </msup>
    97           </math>
    98         </td>
    99       </tr>
    100     </table>
    101 
    102     <table style="position: absolute; top: 120px; left: 10px;">
    103       <tr>
    104         <td style="text-align: left; vertical-align: top;">
    105           <span>X</span>
    106         </td>
    107         <td style="text-align: left;">
    108           <span>X</span>
    109         </td>
    110         <td style="text-align: left; vertical-align: bottom;">
    111           <span>X</span>
    112         </td>
    113       </tr>
    114     </table>
    115 
    116     <div style="position: absolute; top: 250px; left: 10px;">
     14    <div>
    11715      <math>
    11816        <msub>
     
    13028        </msubsup>
    13129      </math>
    132       <math>
    133         <msub>
    134           <mi>A</mi>
    135           <mi>B</mi>
    136         </msub>
    137         <msup>
    138           <mi>A</mi>
    139           <mi>B</mi>
    140         </msup>
    141       </math>
    14230    </div>
    14331
  • trunk/LayoutTests/mathml/presentation/scripts-subsup.html

    r180904 r202904  
    99      border: 0;
    1010      }
    11       td {
    12       border: 1px solid black;
    13       text-align: center; width: 100px; height: 100px;
    14       vertical-align: middle;
    15       }
    16       span {
    17       display: inline-block;
    18       background: black;
    19       border: 0;
    20       margin: 0;
    21       }
    2211    </style>
    2312  </head>
    2413  <body>
    25 
    26     <!-- The sub/sup scripts should be hidden by the black rectangles -->
    27     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
    28       <tr>
    29         <td style="text-align: left; vertical-align: top;">
    30           <math style="font-family: Ahem;">
    31             <msub>
    32               <mtext>X</mtext>
    33               <mtext>X</mtext>
    34             </msub>
    35           </math>
    36         </td>
    37         <td style="text-align: left;">
    38           <math style="font-family: Ahem;">
    39             <msubsup>
    40               <mtext>X</mtext>
    41               <mtext>X</mtext>
    42               <mtext>X</mtext>
    43             </msubsup>
    44           </math>
    45         </td>
    46         <td style="text-align: left; vertical-align: bottom;">
    47           <math style="font-family: Ahem;">
    48             <msup>
    49               <mtext>X</mtext>
    50               <mtext>X</mtext>
    51             </msup>
    52           </math>
    53         </td>
    54       </tr>
    55     </table>
    56 
    57     <table style="position: absolute; top: 10px; left: 10px; font-family: Ahem;">
    58       <tr>
    59         <td style="text-align: left; vertical-align: top;">
    60           <span style="visibility: hidden;">X</span><span style="vertical-align: -25%;">X</span>
    61         </td>
    62         <td style="text-align: left;">
    63           <span style="visibility: hidden;">X</span><span>X<br/>X</span>
    64         </td>
    65         <td style="text-align: left; vertical-align: bottom;">
    66           <span style="visibility: hidden;">X</span><span style="vertical-align: +50%;">X</span>
    67         </td>
    68       </tr>
    69     </table>
    70 
    71     <!-- The bases should be hidden by the black rectangles -->
    72     <table style="position: absolute; top: 120px; left: 10px;">
    73       <tr>
    74         <td style="text-align: left; vertical-align: top;">
    75           <math>
    76             <msub>
    77               <mtext>X</mtext>
    78               <mtext>X</mtext>
    79             </msub>
    80           </math>
    81         </td>
    82         <td style="text-align: left;">
    83           <math>
    84             <msubsup>
    85               <mtext>X</mtext>
    86               <mtext>X</mtext>
    87               <mtext>X</mtext>
    88             </msubsup>
    89           </math>
    90         </td>
    91         <td style="text-align: left; vertical-align: bottom;">
    92           <math>
    93             <msup>
    94               <mtext>X</mtext>
    95               <mtext>X</mtext>
    96             </msup>
    97           </math>
    98         </td>
    99       </tr>
    100     </table>
    101 
    102     <table style="position: absolute; top: 120px; left: 10px;">
    103       <tr>
    104         <td style="text-align: left; vertical-align: top;">
    105           <span>X</span>
    106         </td>
    107         <td style="text-align: left;">
    108           <span>X</span>
    109         </td>
    110         <td style="text-align: left; vertical-align: bottom;">
    111           <span>X</span>
    112         </td>
    113       </tr>
    114     </table>
    115 
    116     <div style="position: absolute; top: 250px; left: 10px;">
     14    <div>
    11715      <!-- This verifies that the scripts are drawn smaller. Note: WebKit does
    11816           not currently implement scriptlevel and only sets the size to
     
    13331        </msubsup>
    13432      </math>
    135 
    136       <!-- This verifies that <msubsup> with an empty script is
    137            equivalent to the corresponding constructions with only one script.
    138         -->
    139       <math>
    140         <msubsup>
    141           <mi>A</mi>
    142           <mi>B</mi>
    143           <mspace/>
    144         </msubsup>
    145         <msubsup>
    146           <mi>A</mi>
    147           <mspace/>
    148           <mi>B</mi>
    149         </msubsup>
    150       </math>
    15133    </div>
    15234
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r202814 r202904  
    546546
    547547webkit.org/b/142283 fast/regions/overflow/overflow-first-and-last-regions.html [ ImageOnlyFailure ]
    548 webkit.org/b/142289 mathml/presentation/scripts-subsup.html [ ImageOnlyFailure ]
    549548
    550549webkit.org/b/142819 fast/text/baseline-inline-block.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations

    r202903 r202904  
    736736# MathML tests that fail:
    737737mathml/presentation/mo-stretch-update.html [ ImageOnlyFailure ]
    738 mathml/presentation/scripts-subsup.html [ ImageOnlyFailure ]
    739738
    740739# SVG tests that fail:
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r202774 r202904  
    679679mathml/presentation/scripts-height.html [ ImageOnlyFailure ]
    680680mathml/presentation/multiscripts-positions.html [ Pass ImageOnlyFailure ]
    681 mathml/presentation/scripts-subsup.html [ Pass ImageOnlyFailure ]
    682681
    683682# <rdar://problem/19215305> ASSERT(m_cgFont.get()) fails in FontPlatformData::ctFont()
  • trunk/LayoutTests/platform/mac/TestExpectations

    r202903 r202904  
    808808# MathML tests that fail:
    809809mathml/presentation/multiscripts-positions.html [ Pass ImageOnlyFailure ]
    810 mathml/presentation/scripts-subsup.html [ Pass ImageOnlyFailure ]
    811810
    812811webkit.org/b/128255 compositing/columns/composited-lr-paginated-repaint.html [ Pass Failure ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r202903 r202904  
    19441944mathml/opentype/large-operators-munderover.html [ Failure ]
    19451945mathml/presentation/attributes-mathvariant.html [ ImageOnlyFailure ]
    1946 webkit.org/b/159202 mathml/presentation/scripts-subsup.html [ ImageOnlyFailure ]
    19471946mathml/presentation/tokenElements-mathvariant.html [ ImageOnlyFailure ]
    19481947
Note: See TracChangeset for help on using the changeset viewer.