<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196417] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196417">196417</a></dd>
<dt>Author</dt> <dd>fred.wang@free.fr</dd>
<dt>Date</dt> <dd>2016-02-11 02:40:03 -0800 (Thu, 11 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use Testharness.js for the MathML script tests
https://bugs.webkit.org/show_bug.cgi?id=154065

Reviewed by Darin Adler.

* mathml/opentype/large-operators-munderover-expected.txt:
* mathml/opentype/large-operators-munderover.html:
* mathml/presentation/inferred-mrow-baseline-expected.txt:
* mathml/presentation/inferred-mrow-baseline.html:
* mathml/presentation/inferred-mrow-stretchy-expected.txt:
* mathml/presentation/inferred-mrow-stretchy.html:
* mathml/presentation/stretchy-depth-height-expected.txt:
* mathml/presentation/stretchy-depth-height-symmetric-expected.txt:
* mathml/presentation/stretchy-depth-height-symmetric.html:
* mathml/presentation/stretchy-depth-height.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmathmlopentypelargeoperatorsmunderoverexpectedtxt">trunk/LayoutTests/mathml/opentype/large-operators-munderover-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmathmlopentypelargeoperatorsmunderoverhtml">trunk/LayoutTests/mathml/opentype/large-operators-munderover.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationinferredmrowbaselineexpectedtxt">trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationinferredmrowbaselinehtml">trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationinferredmrowstretchyexpectedtxt">trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationinferredmrowstretchyhtml">trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationstretchydepthheightexpectedtxt">trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationstretchydepthheightsymmetricexpectedtxt">trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationstretchydepthheightsymmetrichtml">trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric.html</a></li>
<li><a href="#trunkLayoutTestsmathmlpresentationstretchydepthheighthtml">trunk/LayoutTests/mathml/presentation/stretchy-depth-height.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/ChangeLog        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-02-11  Frederic Wang  &lt;fred.wang@free.fr&gt;
+
+        Use Testharness.js for the MathML script tests
+        https://bugs.webkit.org/show_bug.cgi?id=154065
+
+        Reviewed by Darin Adler.
+
+        * mathml/opentype/large-operators-munderover-expected.txt:
+        * mathml/opentype/large-operators-munderover.html:
+        * mathml/presentation/inferred-mrow-baseline-expected.txt:
+        * mathml/presentation/inferred-mrow-baseline.html:
+        * mathml/presentation/inferred-mrow-stretchy-expected.txt:
+        * mathml/presentation/inferred-mrow-stretchy.html:
+        * mathml/presentation/stretchy-depth-height-expected.txt:
+        * mathml/presentation/stretchy-depth-height-symmetric-expected.txt:
+        * mathml/presentation/stretchy-depth-height-symmetric.html:
+        * mathml/presentation/stretchy-depth-height.html:
+
</ins><span class="cx"> 2016-02-10  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Removing deleted tests from ios-simulator TestExpectations
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlopentypelargeoperatorsmunderoverexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/opentype/large-operators-munderover-expected.txt (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/opentype/large-operators-munderover-expected.txt        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/opentype/large-operators-munderover-expected.txt        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -1,7 +1,8 @@
</span><span class="cx"> This test passes if you see a large black square with a green bar overscript and a red bar underscript.
</span><span class="cx"> 
</span><del>-largeop width: PASS
-largeop height: PASS
-green bar is above: PASS
-red bar is below: PASS
</del><span class="cx"> 
</span><ins>+PASS largeop width 
+PASS largeop height 
+PASS green bar is above 
+PASS red bar is below 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlopentypelargeoperatorsmunderoverhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/opentype/large-operators-munderover.html (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/opentype/large-operators-munderover.html        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/opentype/large-operators-munderover.html        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -13,34 +13,35 @@
</span><span class="cx">         font-family: stretchy;
</span><span class="cx">       }
</span><span class="cx">     &lt;/style&gt;
</span><ins>+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script&gt;
</span><del>-      var result;
</del><span class="cx">       var epsilon = 1;
</span><del>-      function almostEqual(x, y) {
-        return Math.abs(x - y) &lt; epsilon;
-      }
-      function assert(text, condition) {
-        result += text + &quot;: &quot; + (condition ? &quot;PASS&quot; : &quot;FAIL&quot;) + &quot;\n&quot;;
-      }
-      function test() {
-        result = &quot;&quot;;
</del><ins>+      setup({ &quot;explicit_done&quot;: true });
+      function run() {
</ins><span class="cx">         // font em is 1024, size of glyph L8 is 8389 and font-size is 16px
</span><span class="cx">         var largeop = document.getElementById(&quot;largeop&quot;).getBoundingClientRect();
</span><span class="cx">         var green = document.getElementById(&quot;green&quot;).getBoundingClientRect();
</span><span class="cx">         var red = document.getElementById(&quot;red&quot;).getBoundingClientRect();
</span><span class="cx">         var size = (8389/1024)*16;
</span><span class="cx"> 
</span><del>-        assert(&quot;largeop width&quot;, almostEqual(largeop.width, size));
-        assert(&quot;largeop height&quot;, almostEqual(largeop.height, size));
-        assert(&quot;green bar is above&quot;, green.bottom &lt;= largeop.top);
-        assert(&quot;red bar is below&quot;, red.top &gt;= largeop.bottom);
-        document.getElementById(&quot;result&quot;).innerText = result;
-        if (window.testRunner)
-          testRunner.dumpAsText();
</del><ins>+        test(function() {
+          assert_approx_equals(largeop.width, size, epsilon);
+        }, &quot;largeop width&quot;);
+        test(function() {
+          assert_approx_equals(largeop.height, size, epsilon);
+        }, &quot;largeop height&quot;);
+        test(function() {
+          assert_less_than_equal(green.bottom, largeop.top);
+        }, &quot;green bar is above&quot;);
+        test(function() {
+          assert_greater_than_equal(red.top, largeop.bottom);
+        }, &quot;red bar is below&quot;);
+        done();
</ins><span class="cx">       }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/head&gt;
</span><del>-  &lt;body onload=&quot;test()&quot;&gt;
</del><ins>+  &lt;body onload=&quot;run()&quot;&gt;
</ins><span class="cx">     &lt;p&gt;This test passes if you see a large black square with a green bar overscript and a red bar underscript.&lt;/p&gt;
</span><span class="cx">     &lt;math display=&quot;block&quot;&gt;
</span><span class="cx">       &lt;munderover&gt;
</span><span class="lines">@@ -49,6 +50,5 @@
</span><span class="cx">         &lt;mspace id=&quot;green&quot; width=&quot;250px&quot; height=&quot;10px&quot; depth=&quot;10px&quot; mathbackground=&quot;green&quot;/&gt;
</span><span class="cx">       &lt;/munderover&gt;
</span><span class="cx">     &lt;/math&gt;
</span><del>-    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
</del><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationinferredmrowbaselineexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline-expected.txt        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -7,11 +7,12 @@
</span><span class="cx">  
</span><span class="cx">  
</span><span class="cx"> 
</span><del>-Mrow: PASS
-Sqrt: PASS
-Style: PASS
-Error: PASS
-Phantom: PASS
-Math: PASS
-Menclose: PASS
</del><span class="cx"> 
</span><ins>+PASS baseline alignment inside Mrow 
+PASS baseline alignment inside Sqrt 
+PASS baseline alignment inside Style 
+PASS baseline alignment inside Error 
+PASS baseline alignment inside Phantom 
+PASS baseline alignment inside Math 
+PASS baseline alignment inside Menclose 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationinferredmrowbaselinehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/inferred-mrow-baseline.html        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -2,25 +2,26 @@
</span><span class="cx">   &lt;head&gt;
</span><span class="cx">     &lt;title&gt;inferred mrows&lt;/title&gt;
</span><span class="cx">     &lt;meta charset=&quot;utf-8&quot;&gt;
</span><ins>+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot;&gt;
</span><del>-      function test()
</del><ins>+      setup({ &quot;explicit_done&quot;: true });
+      function run()
</ins><span class="cx">       {
</span><span class="cx">         var tags = [&quot;Mrow&quot;, &quot;Sqrt&quot;, &quot;Style&quot;, &quot;Error&quot;, &quot;Phantom&quot;, &quot;Math&quot;, &quot;Menclose&quot;];
</span><del>-        var result = &quot;&quot;;
</del><span class="cx">         for (var i in tags) {
</span><span class="cx">           var tag = tags[i];
</span><span class="cx">           var x = document.getElementById(&quot;above&quot; + tag).getBoundingClientRect();
</span><span class="cx">           var y = document.getElementById(&quot;below&quot; + tag).getBoundingClientRect();
</span><del>-          result += tag + &quot;: &quot; + (x.bottom == y.top ? &quot;PASS&quot; : &quot;FAIL&quot;) + &quot;\n&quot;;
</del><ins>+          test(function() {
+            assert_equals(x.bottom, y.top);
+          }, &quot;baseline alignment inside &quot; + tag);
</ins><span class="cx">         }
</span><del>-        document.getElementById(&quot;result&quot;).innerText = result;
-  
-        if (window.testRunner)
-          testRunner.dumpAsText();
</del><ins>+        done();
</ins><span class="cx">       }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/head&gt;
</span><del>-  &lt;body onload=&quot;test()&quot;&gt;
</del><ins>+  &lt;body onload=&quot;run()&quot;&gt;
</ins><span class="cx"> 
</span><span class="cx">     &lt;p&gt;This test passes if rectangles are correctly aligned with respect to the baseline.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -40,7 +41,5 @@
</span><span class="cx">       &lt;math&gt;&lt;menclose notation=&quot;box&quot;&gt;&lt;mspace id=&quot;aboveMenclose&quot; width=&quot;10px&quot; height=&quot;30px&quot; mathbackground=&quot;red&quot;&gt;&lt;/mspace&gt;&lt;mspace id=&quot;belowMenclose&quot; width=&quot;10px&quot; depth=&quot;30px&quot; mathbackground=&quot;blue&quot;&gt;&lt;/mspace&gt;&lt;/menclose&gt;&lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><del>-    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
-
</del><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationinferredmrowstretchyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy-expected.txt        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -7,11 +7,12 @@
</span><span class="cx">  
</span><span class="cx">  
</span><span class="cx"> 
</span><del>-Mrow: PASS
-Sqrt: PASS
-Style: PASS
-Error: PASS
-Phantom: PASS
-Math: PASS
-Menclose: PASS
</del><span class="cx"> 
</span><ins>+PASS operator stretching inside Mrow 
+PASS operator stretching inside Sqrt 
+PASS operator stretching inside Style 
+PASS operator stretching inside Error 
+PASS operator stretching inside Phantom 
+PASS operator stretching inside Math 
+PASS operator stretching inside Menclose 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationinferredmrowstretchyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/inferred-mrow-stretchy.html        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -2,24 +2,25 @@
</span><span class="cx">   &lt;head&gt;
</span><span class="cx">     &lt;title&gt;inferred mrows&lt;/title&gt;
</span><span class="cx">     &lt;meta charset=&quot;utf-8&quot;&gt;
</span><ins>+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot;&gt;
</span><del>-      function test()
</del><ins>+      setup({ &quot;explicit_done&quot;: true });
+      function run()
</ins><span class="cx">       {
</span><span class="cx">         var tags = [&quot;Mrow&quot;, &quot;Sqrt&quot;, &quot;Style&quot;, &quot;Error&quot;, &quot;Phantom&quot;, &quot;Math&quot;, &quot;Menclose&quot;];
</span><del>-        var result = &quot;&quot;;
</del><span class="cx">         for (var i in tags) {
</span><span class="cx">           var tag = tags[i];
</span><span class="cx">           var mo = document.getElementById(&quot;mo&quot; + tag);
</span><del>-          result += tag + &quot;: &quot; + (mo.getBoundingClientRect().height &gt;= 60 ? &quot;PASS&quot; : &quot;FAIL&quot;) + &quot;\n&quot;;
</del><ins>+          test(function() {
+            assert_greater_than_equal(mo.getBoundingClientRect().height, 60);
+          }, &quot;operator stretching inside &quot; + tag);
</ins><span class="cx">         }
</span><del>-        document.getElementById(&quot;result&quot;).innerText = result;
-  
-        if (window.testRunner)
-          testRunner.dumpAsText();
</del><ins>+        done();
</ins><span class="cx">       }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/head&gt;
</span><del>-  &lt;body onload=&quot;test()&quot;&gt;
</del><ins>+  &lt;body onload=&quot;run()&quot;&gt;
</ins><span class="cx"> 
</span><span class="cx">     &lt;p&gt;This test passes if all the vertical bars stretch.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -33,7 +34,5 @@
</span><span class="cx">       &lt;math&gt;&lt;menclose notation=&quot;box&quot;&gt;&lt;mo id=&quot;moMenclose&quot;&gt;|&lt;/mo&gt;&lt;mspace width=&quot;1px&quot; height=&quot;30px&quot; depth=&quot;30px&quot; mathbackground=&quot;red&quot;&gt;&lt;/mspace&gt;&lt;/menclose&gt;&lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><del>-    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
-
</del><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationstretchydepthheightexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -42,13 +42,12 @@
</span><span class="cx">  
</span><span class="cx">  
</span><span class="cx"> 
</span><del>-symmetric stretching: PASS
-large depth: PASS
-large height: PASS
-mtable: PASS
-several siblings with different heights/depths: PASS
-testing several operators in one mrow (operator 1): PASS
-testing several operators in one mrow (operator 2): PASS
-testing several operators in one mrow (operator 3): PASS
-testing with non-stretchy mo: PASS
</del><span class="cx"> 
</span><ins>+PASS symmetric stretching 
+PASS large depth 
+PASS large height 
+PASS mtable 
+PASS several siblings with different heights/depths 
+PASS testing several operators in one mrow 
+PASS testing with non-stretchy mo 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationstretchydepthheightsymmetricexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric-expected.txt (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric-expected.txt        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric-expected.txt        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -4,8 +4,9 @@
</span><span class="cx">  
</span><span class="cx">  
</span><span class="cx"> 
</span><del>-large depth: PASS
-large depth (explicit symmetric attribute): PASS
-large height: PASS
-large height (explicit symmetric attribute): PASS
</del><span class="cx"> 
</span><ins>+PASS large depth 
+PASS large depth (explicit symmetric attribute) 
+PASS large height 
+PASS large height (explicit symmetric attribute) 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationstretchydepthheightsymmetrichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric.html (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric.html        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/stretchy-depth-height-symmetric.html        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -2,54 +2,57 @@
</span><span class="cx">   &lt;head&gt;
</span><span class="cx">     &lt;title&gt;stretch depth/height&lt;/title&gt;
</span><span class="cx">     &lt;meta charset=&quot;utf-8&quot;&gt;
</span><ins>+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot;&gt;
</span><del>-      var result;
</del><ins>+      setup({ &quot;explicit_done&quot;: true });
</ins><span class="cx">       var epsilon = 2;
</span><span class="cx"> 
</span><del>-      function almostEqual(x, y) {
-          return Math.abs(x - y) &lt; epsilon;
-      }
-
-      function assert(text, condition) {
-          result += text + &quot;: &quot; + (condition ? &quot;PASS&quot; : &quot;FAIL&quot;) + &quot;\n&quot;;
-      }
-
</del><span class="cx">       function getAxis(id) {
</span><span class="cx">           var frac = document.getElementById(&quot;frac&quot; + id).getBoundingClientRect();
</span><span class="cx">           var space = document.getElementById(&quot;space&quot; + id).getBoundingClientRect();
</span><span class="cx">           return space.bottom - (frac.top + frac.bottom) / 2;
</span><span class="cx">       }
</span><span class="cx"> 
</span><del>-      function test() {
-          result = &quot;&quot;;
</del><ins>+      function run() {
</ins><span class="cx"> 
</span><del>-          var axis1 = getAxis(&quot;1&quot;);
-          var s1 = document.getElementById(&quot;s1&quot;).getBoundingClientRect();
-          var c1 = document.getElementById(&quot;c1ref&quot;).getBoundingClientRect();
-          assert(&quot;large depth&quot;, almostEqual(s1.top, c1.top) &amp;&amp; almostEqual(s1.height, (c1.height - axis1) * 2));
</del><ins>+          test(function() {
+            var axis1 = getAxis(&quot;1&quot;);
+            var s1 = document.getElementById(&quot;s1&quot;).getBoundingClientRect();
+            var c1 = document.getElementById(&quot;c1ref&quot;).getBoundingClientRect();
+            assert_approx_equals(s1.top, c1.top, epsilon);
+            assert_approx_equals(s1.height, (c1.height - axis1) * 2, epsilon);
+          }, &quot;large depth&quot;);
</ins><span class="cx"> 
</span><del>-          var axis1a = getAxis(&quot;1a&quot;);
-          var s1a = document.getElementById(&quot;s1a&quot;).getBoundingClientRect();
-          var c1a = document.getElementById(&quot;c1refa&quot;).getBoundingClientRect();
-          assert(&quot;large depth (explicit symmetric attribute)&quot;, almostEqual(s1a.top, c1a.top) &amp;&amp; almostEqual(s1a.height, (c1a.height - axis1a) * 2));
</del><ins>+          test(function() {
+            var axis1a = getAxis(&quot;1a&quot;);
+            var s1a = document.getElementById(&quot;s1a&quot;).getBoundingClientRect();
+            var c1a = document.getElementById(&quot;c1refa&quot;).getBoundingClientRect();
+            assert_approx_equals(s1a.top, c1a.top, epsilon);
+            assert_approx_equals(s1a.height, (c1a.height - axis1a) * 2, epsilon);
+          }, &quot;large depth (explicit symmetric attribute)&quot;);
</ins><span class="cx"> 
</span><del>-          var axis2 = getAxis(&quot;2&quot;);
-          var s2 = document.getElementById(&quot;s2&quot;).getBoundingClientRect();
-          var c2 = document.getElementById(&quot;c2ref&quot;).getBoundingClientRect();
-          assert(&quot;large height&quot;, almostEqual(s2.bottom, c2.bottom) &amp;&amp; almostEqual(s2.height, (c2.height + axis2) * 2));
</del><ins>+          test(function() {
+            var axis2 = getAxis(&quot;2&quot;);
+            var s2 = document.getElementById(&quot;s2&quot;).getBoundingClientRect();
+            var c2 = document.getElementById(&quot;c2ref&quot;).getBoundingClientRect();
+            assert_approx_equals(s2.bottom, c2.bottom, epsilon);
+            assert_approx_equals(s2.height, (c2.height + axis2) * 2, epsilon);
+          }, &quot;large height&quot;);
</ins><span class="cx"> 
</span><del>-          var axis2a = getAxis(&quot;2a&quot;);
-          var s2a = document.getElementById(&quot;s2a&quot;).getBoundingClientRect();
-          var c2a = document.getElementById(&quot;c2refa&quot;).getBoundingClientRect();
-          assert(&quot;large height (explicit symmetric attribute)&quot;, almostEqual(s2a.bottom, c2a.bottom) &amp;&amp; almostEqual(s2a.height, (c2a.height + axis2a) * 2));
-          document.getElementById(&quot;result&quot;).innerText = result;
-  
-          if (window.testRunner)
-            testRunner.dumpAsText();
</del><ins>+          test(function() {
+            var axis2a = getAxis(&quot;2a&quot;);
+            var s2a = document.getElementById(&quot;s2a&quot;).getBoundingClientRect();
+            var c2a = document.getElementById(&quot;c2refa&quot;).getBoundingClientRect();
+            assert_approx_equals(s2a.bottom, c2a.bottom, epsilon);
+            assert_approx_equals(s2a.height, (c2a.height + axis2a) * 2, epsilon);
+          }, &quot;large height (explicit symmetric attribute)&quot;);
+
+          done();
</ins><span class="cx">       }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/head&gt;
</span><del>-  &lt;body onload=&quot;test()&quot;&gt;
</del><ins>+  &lt;body onload=&quot;run()&quot;&gt;
</ins><span class="cx"> 
</span><span class="cx">     &lt;p&gt;This test passes if the brace stretches symmetrically and is large enough to cover its sibling.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -104,7 +107,5 @@
</span><span class="cx">       &lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><del>-    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
-
</del><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmathmlpresentationstretchydepthheighthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/mathml/presentation/stretchy-depth-height.html (196416 => 196417)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/mathml/presentation/stretchy-depth-height.html        2016-02-11 08:11:35 UTC (rev 196416)
+++ trunk/LayoutTests/mathml/presentation/stretchy-depth-height.html        2016-02-11 10:40:03 UTC (rev 196417)
</span><span class="lines">@@ -2,65 +2,76 @@
</span><span class="cx">   &lt;head&gt;
</span><span class="cx">     &lt;title&gt;stretch depth/height&lt;/title&gt;
</span><span class="cx">     &lt;meta charset=&quot;utf-8&quot;&gt;
</span><ins>+    &lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script type=&quot;text/javascript&quot;&gt;
</span><del>-      var result;
</del><ins>+      setup({ &quot;explicit_done&quot;: true });
</ins><span class="cx">       var epsilon = 1;
</span><span class="cx"> 
</span><del>-      function almostEqual(x, y) {
-          return Math.abs(x - y) &lt; epsilon;
-      }
-
-      function assert(text, condition) {
-          result += text + &quot;: &quot; + (condition ? &quot;PASS&quot; : &quot;FAIL&quot;) + &quot;\n&quot;;
-      }
-
-      function test() {
-          result = &quot;&quot;;
-
</del><ins>+      function run() {
+        test(function() {
</ins><span class="cx">           var s1 = document.getElementById(&quot;s1&quot;).getBoundingClientRect();
</span><span class="cx">           var c1 = document.getElementById(&quot;c1&quot;).getBoundingClientRect();
</span><del>-          assert(&quot;symmetric stretching&quot;, almostEqual(s1.top, c1.top) &amp;&amp; almostEqual(s1.bottom, c1.bottom));
</del><ins>+          assert_approx_equals(s1.top, c1.top, epsilon);
+          assert_approx_equals(s1.bottom, c1.bottom, epsilon);
+        }, &quot;symmetric stretching&quot;);
</ins><span class="cx"> 
</span><ins>+        test(function() {
</ins><span class="cx">           var s2 = document.getElementById(&quot;s2&quot;).getBoundingClientRect();
</span><span class="cx">           var c2 = document.getElementById(&quot;c2&quot;).getBoundingClientRect();
</span><del>-          assert(&quot;large depth&quot;, almostEqual(s2.top, c2.top) &amp;&amp; almostEqual(s2.bottom, c2.bottom));
</del><ins>+          assert_approx_equals(s2.top, c2.top, epsilon);
+          assert_approx_equals(s2.bottom, c2.bottom, epsilon);
+        }, &quot;large depth&quot;);
</ins><span class="cx"> 
</span><ins>+        test(function() {
</ins><span class="cx">           var s3 = document.getElementById(&quot;s3&quot;).getBoundingClientRect();
</span><span class="cx">           var c3 = document.getElementById(&quot;c3&quot;).getBoundingClientRect();
</span><del>-          assert(&quot;large height&quot;, almostEqual(s3.top, c3.top) &amp;&amp; almostEqual(s3.bottom, c3.bottom));
</del><ins>+          assert_approx_equals(s3.top, c3.top, epsilon);
+          assert_approx_equals(s3.bottom, c3.bottom, epsilon);
+        }, &quot;large height&quot;);
</ins><span class="cx"> 
</span><ins>+        test(function() {
</ins><span class="cx">           var s4 = document.getElementById(&quot;s4&quot;).getBoundingClientRect();
</span><span class="cx">           var c4 = document.getElementById(&quot;c4&quot;).getBoundingClientRect();
</span><del>-          assert(&quot;mtable&quot;, almostEqual(s4.top, c4.top) &amp;&amp; almostEqual(s4.bottom, c4.bottom));
</del><ins>+          assert_approx_equals(s4.top, c4.top, epsilon);
+          assert_approx_equals(s4.bottom, c4.bottom, epsilon);
+        }, &quot;mtable&quot;);
</ins><span class="cx"> 
</span><ins>+        test(function() {
</ins><span class="cx">           var s5 = document.getElementById(&quot;s5&quot;).getBoundingClientRect();
</span><span class="cx">           var c5maxheight = document.getElementById(&quot;c5maxheight&quot;).getBoundingClientRect();
</span><span class="cx">           var c5maxdepth = document.getElementById(&quot;c5maxdepth&quot;).getBoundingClientRect();
</span><del>-          assert(&quot;several siblings with different heights/depths&quot;, almostEqual(s5.top, c5maxheight.top) &amp;&amp; almostEqual(s5.bottom, c5maxdepth.bottom));
</del><ins>+          assert_approx_equals(s5.top, c5maxheight.top, epsilon);
+          assert_approx_equals(s5.bottom, c5maxdepth.bottom, epsilon);
+        }, &quot;several siblings with different heights/depths&quot;);
</ins><span class="cx"> 
</span><del>-
</del><ins>+        test(function() {
</ins><span class="cx">           var c6maxheight = document.getElementById(&quot;c6maxheight&quot;).getBoundingClientRect();
</span><span class="cx">           var c6maxdepth = document.getElementById(&quot;c6maxdepth&quot;).getBoundingClientRect();
</span><span class="cx">           for (var i = 1; i &lt;= 3; i++) {
</span><del>-              var s6 = document.getElementById(&quot;s6_&quot; + i).getBoundingClientRect();
-              assert(&quot;testing several operators in one mrow (operator &quot; + i + &quot;)&quot;, almostEqual(s6.top, c6maxheight.top) &amp;&amp; almostEqual(s6.bottom, c6maxdepth.bottom));
</del><ins>+            var s6 = document.getElementById(&quot;s6_&quot; + i).getBoundingClientRect();
+            assert_approx_equals(s6.top, c6maxheight.top, epsilon, &quot;top of operator&quot; + i);
+            assert_approx_equals(s6.bottom, c6maxdepth.bottom, c6maxheight.top, epsilon, &quot;bottom of operator&quot; + i);
</ins><span class="cx">           }
</span><ins>+        }, &quot;testing several operators in one mrow&quot;);
</ins><span class="cx"> 
</span><ins>+        test(function() {
</ins><span class="cx">           var s71 = document.getElementById(&quot;s71&quot;).getBoundingClientRect();
</span><span class="cx">           var c71 = document.getElementById(&quot;c71&quot;).getBoundingClientRect();
</span><span class="cx">           var s72 = document.getElementById(&quot;s72&quot;).getBoundingClientRect();
</span><span class="cx">           var c72 = document.getElementById(&quot;c72&quot;).getBoundingClientRect();
</span><span class="cx"> 
</span><del>-          assert(&quot;testing with non-stretchy mo&quot;, almostEqual(s71.top, c71.top) &amp;&amp; almostEqual(s71.bottom, c71.bottom) &amp;&amp; almostEqual(s72.top, c72.top) &amp;&amp; almostEqual(s72.bottom, c72.bottom));
</del><ins>+            assert_approx_equals(s71.top, c71.top, epsilon);
+            assert_approx_equals(s71.bottom, c71.bottom, epsilon);
+            assert_approx_equals(s72.top, c72.top, epsilon);
+            assert_approx_equals(s72.bottom, c72.bottom, epsilon);
+        }, &quot;testing with non-stretchy mo&quot;);
</ins><span class="cx"> 
</span><del>-          document.getElementById(&quot;result&quot;).innerText = result;
-  
-          if (window.testRunner)
-              testRunner.dumpAsText();
</del><ins>+        done();
</ins><span class="cx">       }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx">   &lt;/head&gt;
</span><del>-  &lt;body onload=&quot;test()&quot;&gt;
</del><ins>+  &lt;body onload=&quot;run()&quot;&gt;
</ins><span class="cx"> 
</span><span class="cx">     &lt;p&gt;This test passes if the depth and height of braces match the maximum depth and height of its siblings.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -218,7 +229,5 @@
</span><span class="cx">       &lt;/math&gt;
</span><span class="cx">     &lt;/p&gt;
</span><span class="cx"> 
</span><del>-    &lt;div id=&quot;result&quot;&gt;&lt;/div&gt;
-
</del><span class="cx">   &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre>
</div>
</div>

</body>
</html>