https://bugs.webkit.org/show_bug.cgi?id=76226
Reviewed by Julien Chaffraix.
Tests for future implementation of CSS3 calc() (see http://webkit.org/b/16662)
These tests are expected to 'fail', and will pass once calc() functionality is landed.
For now, they serve to demonstrate that the current code doesn't crash on these tests.
* css3/calc/table-border-spacing-expected.txt: Added.
* css3/calc/table-border-spacing.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105869
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-25 Mike Lawther <mikelawther@chromium.org>
+
+ table border spacing test for CSS3 calc
+ https://bugs.webkit.org/show_bug.cgi?id=76226
+
+ Reviewed by Julien Chaffraix.
+
+ Tests for future implementation of CSS3 calc() (see http://webkit.org/b/16662)
+
+ These tests are expected to 'fail', and will pass once calc() functionality is landed.
+ For now, they serve to demonstrate that the current code doesn't crash on these tests.
+
+ * css3/calc/table-border-spacing-expected.txt: Added.
+ * css3/calc/table-border-spacing.html: Added.
+
2012-01-25 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed gardening, Skipped list cleanup.
--- /dev/null
+FAIL document.getElementById("stimulus").offsetWidth should be 416. Was 278.
+FAIL document.getElementById("stimulus").offsetHeight should be 205. Was 136.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE html>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<style>
+ td {
+ padding: 0;
+ width: 50px;
+ height: 60px;
+ background-color: blue;
+ border: 1px solid black
+ }
+ table {
+ border-spacing: -webkit-calc(10px * 2 + 5px);
+ border: 3px solid black;
+ }
+</style>
+<table id="stimulus">
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+</table>
+<script>
+ var innerBorder = 1;
+ var outerBorder = 3;
+ var innerWidth = 50 + 2 * innerBorder;
+ var innerHeight = 60 + 2 * innerBorder;
+ var borderSpacing = 25;
+ var rows = 2;
+ var columns = 5;
+
+ var expectedWidth = innerWidth * columns + borderSpacing * (columns + 1) + 2 * outerBorder;
+ var expectedHeight = innerHeight * rows + borderSpacing * (rows + 1) + 2 * outerBorder;
+
+ shouldEvaluateTo('document.getElementById("stimulus").offsetWidth', expectedWidth);
+ shouldEvaluateTo('document.getElementById("stimulus").offsetHeight', expectedHeight);
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+