aboutsummaryrefslogtreecommitdiff
path: root/files/es/archive/mozilla/table_layout_regression_tests
diff options
context:
space:
mode:
Diffstat (limited to 'files/es/archive/mozilla/table_layout_regression_tests')
-rw-r--r--files/es/archive/mozilla/table_layout_regression_tests/index.html204
1 files changed, 204 insertions, 0 deletions
diff --git a/files/es/archive/mozilla/table_layout_regression_tests/index.html b/files/es/archive/mozilla/table_layout_regression_tests/index.html
new file mode 100644
index 0000000000..564a8273bf
--- /dev/null
+++ b/files/es/archive/mozilla/table_layout_regression_tests/index.html
@@ -0,0 +1,204 @@
+---
+title: Table Layout Regression Tests
+slug: Archive/Mozilla/Table_Layout_Regression_Tests
+translation_of: Archive/Mozilla/Table_Layout_Regression_Tests
+---
+<p></p><div class="warning warningHeader">
+ <p><strong>Advertencia:</strong> <strong>The content of this article may be out of date.</strong> While the information on the layout debugger is still useful, the testing information is much less relevant now than it has been, as the "rtest" testing framework described here has been superseded by the <a class='"external"' href='"http://mxr.mozilla.org/mozilla/source/layout/tools/reftest/README.txt"'>reftest</a> framework. It is unclear whether or how well rtest continues to work and whether it is still used or not.</p>
+</div><p></p>
+
+<h3 id="Subject_Overview" name="Subject_Overview">Subject Overview</h3>
+
+<p>Changes in layout, parser and content code can have unintended side effects, also known as regressions. It is good style to check for these unwanted regressions and fixing them before checkin rather than causing Bugzilla avalanches.</p>
+
+<h3 id="Prerequisites" name="Prerequisites">Prerequisites</h3>
+
+<p>In order to run these tests, you will need to have:</p>
+
+<ol>
+ <li>Make sure that your build is a <strong>debug</strong> <a href="en/Configuring_Build_Options">build</a> (in short you need <code>ac_add_options --enable-debug</code> in your <code>.mozconfig</code> file).</li>
+ <li>to build the layoutdebugger itself, build either all extensions or include layoutdebug in your <code>.mozconfig</code> file. For example <code>ac_add_options --enable-extensions=all</code>.</li>
+ <li>a Mozilla tree with the test files at <code>%MOZ_SRC%/layout/html/tests</code>,</li>
+ <li><code>DISABLE_TESTS</code> should not be defined (so <code>ac_add_options --enable-tests</code>),</li>
+ <li>patience and time.</li>
+</ol>
+
+<h3 id="Test_Runs" name="Test_Runs">Test Runs</h3>
+
+<ul>
+ <li>Go to the <code>%MOZ_SRC%/layout/html/tests/block</code> directory.</li>
+ <li>Avoid the nasty assertions to pop up by <code>set XPCOM_DEBUG_BREAK=warn</code>, the world would be a much better place if we could <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=152015">first fix those assertions</a>.</li>
+ <li>As you will probably run your normal Mozilla in parallel with the testing issue then: <code>set MOZ_NO_REMOTE=1</code> at the command prompt.</li>
+ <li>Start the layout debugger via <code>mozilla -layoutdebug - P foo</code> where <code>foo</code> is just another profile than your main profile.</li>
+ <li>Select from the <code>Regression-Test</code> Menu the <code>Add New List...</code>entry.<br>
+ <img alt="Menu display Add New List.."></li>
+ <li>Select <code>%MOZ_SRC%/layout/html/tests/block/rtest.lst</code>.</li>
+ <li>Execute the baseline test<br>
+ <img alt="baseline run"></li>
+ <li>Shutdown the layoutdebugger</li>
+ <li>Execute <code>mozilla -layoutdebug - P foo &gt;selftest.txt</code></li>
+ <li>Execute the verify test<br>
+ <img alt="verify run"></li>
+ <li>Make a note which tests have failed <code>grep 'failed' selftest.txt</code> (these are false positives, quite frequently they indicate reflow problems, pages showing differently when loaded from cache)</li>
+ <li>Make your changes to the source, recompile.</li>
+ <li>Execute <code>mozilla -layoutdebug - P foo &gt;outputfile.txt</code></li>
+ <li>Execute the verify test</li>
+ <li>Make a note which tests have failed <code>grep 'failed' outputfile.txt</code></li>
+ <li>Check how many tests have failed and analyze your results:
+ <ul>
+ <li>If the regression tests have failed at the same place as the previous diagnosed false positives =&gt; ignore</li>
+ <li>Try to figure out what the other regressions are: Are they improving the picture or are they regressions?</li>
+ <li>Note the difficult to explain test failures.</li>
+ </ul>
+ </li>
+ <li>Change the source if necessary until the regression tests indicate that your patch does not fork the block and table layout</li>
+ <li>Submit your patch and lists the remaining differences in the bug</li>
+</ul>
+
+<p>Be prepared to cycle.</p>
+
+<h3 id="How_the_layout_regression_tests_work" name="How_the_layout_regression_tests_work">How the layout regression tests work</h3>
+
+<p>First the URL's to test are red from <code>rtest.lst</code> files in various directories. <code><a href="https://dxr.mozilla.org/mozilla-central/source/layout/html/tests/block/rtest.lst" rel="custom">layout/html/tests/block/rtest.lst</a></code> points to them.</p>
+
+<p>Snippet from rtest.lst in the <code>table/marvin</code> directory:</p>
+
+<pre>body_col.html
+body_tbody.html
+body_tfoot.html
+body_thead.html
+col_span.html
+</pre>
+
+<p>The regression tests compare the frame tree dumps recorded at two different times. The URL's to test are red from <code>rtest.lst</code>For every file in <code>rtest.lst</code> Mozilla takes the root frame and dumps the whole tree via <a href="http://mxr.mozilla.org/mozilla-central/search?string=nsFrame%3A%3ADumpRegression">nsFrame::DumpRegression</a>.</p>
+
+<p>The frame tree dumps are invoked by the <a href="https://dxr.mozilla.org/mozilla-central/source/layout/base/nsILayoutDebugger.h" rel="custom">nsILayoutDebugger</a>. The frame trees are dumped to separate files in a baseline or verify directory for all URL's in <code>rtest.lst</code> (see: <a href="http://mxr.mozilla.org/mozilla-central/ident?i=DumpFrameModel">nsRegressionTester::DumpFrameModel</a>).</p>
+
+<p>Their name is generated by replacing the old extension <code>.html</code> or <code>.xml</code> with <code>.rgd</code>. For <code>appendCells1.html</code> a file <code>appendCells1.rgd</code> will be created in the baseline or verify subdirectory.</p>
+
+<p>A typical beginning of a dump (<code><span class="nowiki">*.rgd</span></code> file) looks like:</p>
+
+<pre>&lt;frame va="15022440" type="Viewport(-1)" state="270340" parent="0"&gt;
+ &lt;view va="47171904"&gt;
+ &lt;/view&gt;
+ &lt;stylecontext va="15022232"&gt;
+
+ &lt;font serif 240 240 0 /&gt;
+ &lt;color data="-16777216"/&gt;
+ &lt;background data="0 2 3 -1 0 0 "/&gt;
+ &lt;spacing data="left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0" /&gt;
+ &lt;list data="100 100 " /&gt;
+ &lt;position data="left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto " /&gt;
+
+ &lt;text data="0 0 0 Normal Normal 0[0x0]tw Normal " /&gt;
+ &lt;textreset data="0 10[0xa]enum " /&gt;
+ &lt;display data="0 1 0 0 0 0 0 0 0 0 0 0 " /&gt;
+ &lt;visibility data="0 1 1.000000" /&gt;
+ &lt;table data="0 0 4 -1 1 " /&gt;
+ &lt;tableborder data="1 Null Null 0 2 " /&gt;
+
+ &lt;content data="0 0 0 Null " /&gt;
+ &lt;quotes data="0 " /&gt;
+ &lt;ui data="3 0 0 1 " /&gt;
+ &lt;uireset data="7 0 4" /&gt;
+ &lt;xul data="0 0 0 0 0 1 &lt;svg data="0 1.000000 1.000000 0 1.000000" /&gt;
+ &lt;/stylecontext&gt;
+</pre>
+
+<p>The <code>baseline</code> log will look like:</p>
+
+<pre>Type Manifest File: e:\moz_src\mozilla\obj-i586-pc-msvc\dist\bin\components\xpti.dat
++++ JavaScript debugging hooks installed.
+++WEBSHELL == 1
+++DOMWINDOW == 1
+++WEBSHELL == 2
+++DOMWINDOW == 2
+Note: styleverifytree is disabled
+Note: frameverifytree is disabled
+Note: verifyreflow is disabled
+++WEBSHELL == 3
+++DOMWINDOW == 3
+Running baseline test for E:\moz_src\mozilla\layout\html\tests\block\rtest.lst.
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\width-fixed_html.rgd
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\width-percent_html.rgd
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\margin1_html.rgd
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\pre_html.rgd
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\block\base\baseline\pre1_html.rgd
+</pre>
+
+<p>The second verify run creates first the frame dumps in the verify subdirectories (<code>verify</code>) and <a href="http://mxr.mozilla.org/mozilla-central/search?string=nsFrameUtil%3A%3ACompareTrees">compares</a> each frame dump with the corresponding reference frame dump. If they differ in critical points the test fails.</p>
+
+<p>A typical part of the <code>verify</code> log would look like:</p>
+
+<pre>Type Manifest File: e:\moz_src\mozilla\obj-i586-pc-msvc\dist\bin\components\xpti.dat
++++ JavaScript debugging hooks installed.
+++WEBSHELL == 1
+++DOMWINDOW == 1
+++WEBSHELL == 2
+++DOMWINDOW == 2
+Note: styleverifytree is disabled
+Note: frameverifytree is disabled
+Note: verifyreflow is disabled
+++WEBSHELL == 3
+++DOMWINDOW == 3
+Running verify test for E:\moz_src\mozilla\layout\html\tests\block\rtest.lst.
+Writing regression data to E:\moz_src\mozilla\layout\html\tests\table\core\verify\standards1.rgd
+Comparing to regression data from E:\moz_src\mozilla\layout\html\tests\table\core\baseline\standards1.rgd
+frame bbox mismatch: 0,26437,4824,600 vs. 0,26437,4872,600
+Node 1:
+ TableOuter(table)(144) 0x10004 0,26437,4824,600, |null attr|-16777216|left: 0[0x0]tw top: 0[0x0]tw right: 0[0x0]tw bottom: 0[0x0]tw left: 0[0x0]tw top: 0[0x0]tw right: 0[0x0]tw bottom: 0[0x0]tw left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Node 2:
+ TableOuter(table)(144) 0x10004 0,26437,4872,600, |null attr|-16777216|left: 0[0x0]tw top: 0[0x0]tw right: 0[0x0]tw bottom: 0[0x0]tw left: 0[0x0]tw top: 0[0x0]tw right: 0[0x0]tw bottom: 0[0x0]tw left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+frame bbox mismatch: 0,0,4824,600 vs. 0,0,4872,600
+Node 1:
+ Table(table)(144) 0x10004 0,0,4824,600, |null attr|-16777216|left: Null top: 0[0x0]tw right: Null bottom: 0[0x0]tw left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 2 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Node 2:
+ Table(table)(144) 0x10004 0,0,4872,600, |null attr|-16777216|left: Null top: 0[0x0]tw right: Null bottom: 0[0x0]tw left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 2 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+frame bbox mismatch: 24,24,4776,552 vs. 24,24,4824,552
+Node 1:
+ TableColGroup(table)(144) 0x80010004 24,24,4776,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 12 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Node 2:
+ TableColGroup(table)(144) 0x80010004 24,24,4824,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 12 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+frame bbox mismatch: 0,0,2400,552 vs. 0,0,2424,552
+Node 1:
+ TableCol(table)(144) 0x30010004 0,0,2400,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 11 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Node 2:
+ TableCol(table)(144) 0x30010004 0,0,2424,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 11 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+frame bbox mismatch: 2424,0,2352,552 vs. 2448,0,2376,552
+Node 1:
+ TableCol(table)(144) 0x30010004 2424,0,2352,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 11 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Node 2:
+ TableCol(table)(144) 0x30010004 2448,0,2376,552, |null attr|-16777216|left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null left: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: Null top: Null right: Null bottom: Null left: Null top: Null right: Null bottom: Null 1[0x1]enum 0|1 1 [none]|left: Auto top: Auto right: Auto bottom: Auto Auto 0[0x0]tw Null Auto 0[0x0]tw Null 0 Auto |0 0 0 Normal Normal 0[0x0]tw Normal |0 11 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 Null
+Comparison for file:///E:/moz_src/mozilla/layout/html/tests/table/core/baseline/standards1.rgd failed.
+</pre>
+
+<p>The first regression test has failed and it is marked so.</p>
+
+<h3 id="Adding_new_regression_tests" name="Adding_new_regression_tests">Adding new regression tests</h3>
+
+<p>Once you have checked in the code:</p>
+
+<ul>
+ <li>please add your testcase for the bug to the regression tests.</li>
+ <li>A testcase should only contain local files.</li>
+ <li>Place the images in <code>table/images</code> <code>block/images</code> or (don't forget <code> cvs commit -kb</code>)</li>
+ <li>and the test file in the <code>table/bugs</code> or <code>block/bugs</code> directory.</li>
+ <li>Update the <code>rtest.lst</code> file in the corresponding directory in order to include your file.</li>
+</ul>
+
+<h3 id="Additional_Notes" name="Additional_Notes">Additional Notes</h3>
+
+<p>There is a special type of frame dumps - the printing regression tests, they are invoked by the <code>-Prt</code> command line argument to the <code>viewer</code> and include first a display then a frame dump taking into account the printer pages. Please contact if you need help with running those tests.</p>
+
+<p>I would like to thank Chris Karnaze for his guidance and fantasai for her language support.</p>
+
+<div class="originaldocinfo">
+<h2 id="Original_Document_Information" name="Original_Document_Information">Original Document Information</h2>
+
+<ul>
+ <li>Author(s): Bernd Mielke</li>
+ <li>Other Contributors: Boris Zbarsky</li>
+ <li>Last Updated Date: February 5, 2007</li>
+ <li>Copyright Information: Portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a Creative Commons license | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Details</a>.</li>
+</ul>
+</div>