Title: [104752] trunk/LayoutTests
- Revision
- 104752
- Author
- [email protected]
- Date
- 2012-01-11 15:27:25 -0800 (Wed, 11 Jan 2012)
Log Message
line height test for CSS3 calc
https://bugs.webkit.org/show_bug.cgi?id=75998
Reviewed by Daniel Bates.
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/line-height-expected.txt: Added.
* css3/calc/line-height.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (104751 => 104752)
--- trunk/LayoutTests/ChangeLog 2012-01-11 23:27:08 UTC (rev 104751)
+++ trunk/LayoutTests/ChangeLog 2012-01-11 23:27:25 UTC (rev 104752)
@@ -1,3 +1,18 @@
+2012-01-11 Mike Lawther <[email protected]>
+
+ line height test for CSS3 calc
+ https://bugs.webkit.org/show_bug.cgi?id=75998
+
+ Reviewed by Daniel Bates.
+
+ 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/line-height-expected.txt: Added.
+ * css3/calc/line-height.html: Added.
+
2012-01-11 Eugene Girard <[email protected]>
Typo in error message: Unexpected token 'defualt'
Added: trunk/LayoutTests/css3/calc/line-height-expected.txt (0 => 104752)
--- trunk/LayoutTests/css3/calc/line-height-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/calc/line-height-expected.txt 2012-01-11 23:27:25 UTC (rev 104752)
@@ -0,0 +1,11 @@
+Tests that CSS3 calc() can be used for the line-height property
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FAIL getComputedStyle(document.getElementById("calc-percent"), null).lineHeight should be 32px. Was normal.
+FAIL getComputedStyle(document.getElementById("calc-percent-pixels"), null).lineHeight should be 32px. Was normal.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/css3/calc/line-height.html (0 => 104752)
--- trunk/LayoutTests/css3/calc/line-height.html (rev 0)
+++ trunk/LayoutTests/css3/calc/line-height.html 2012-01-11 23:27:25 UTC (rev 104752)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src=""
+<style>
+ span { font-size: 16px; }
+ #control { line-height: 200%; }
+ #calc-percent { line-height: -webkit-calc(100% * 2); }
+ #calc-percent-pixels { line-height: -webkit-calc(100% + 16px); }
+</style>
+<div id="test-container">
+ <span id="control">The line height of these lines should be identical</span><hr/>
+ <span id="calc-percent">The line height of these lines should be identical</span><hr/>
+ <span id="calc-percent-pixels">The line height of these lines should be identical</span><hr/>
+</div>
+<script>
+ description("Tests that CSS3 calc() can be used for the line-height property");
+
+ shouldEvaluateTo('getComputedStyle(document.getElementById("calc-percent"), null).lineHeight', 'getComputedStyle(document.getElementById("control"), null).lineHeight');
+ shouldEvaluateTo('getComputedStyle(document.getElementById("calc-percent-pixels"), null).lineHeight', 'getComputedStyle(document.getElementById("control"), null).lineHeight');
+
+ if (window.layoutTestController) {
+ var testContainer = document.getElementById("test-container");
+ if (testContainer)
+ document.body.removeChild(testContainer);
+ }
+</script>
+<script src=""
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes