https://bugs.webkit.org/show_bug.cgi?id=76130
Reviewed by Darin Adler.
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/getComputedStyle-margin-percentage-expected.txt: Added.
* css3/calc/getComputedStyle-margin-percentage.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105647
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-01-23 Mike Lawther <mikelawther@chromium.org>
+
+ getComputedStyle margin percentage test for CSS calc
+ https://bugs.webkit.org/show_bug.cgi?id=76130
+
+ Reviewed by Darin Adler.
+
+ 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/getComputedStyle-margin-percentage-expected.txt: Added.
+ * css3/calc/getComputedStyle-margin-percentage.html: Added.
+
2012-01-23 Adam Barth <abarth@webkit.org>
Update the baselines for a number of tests that use gradients. The new
--- /dev/null
+Tests calling getPropertyValue on computed margin styles involving CSS calc
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FAIL getComputedStyle(document.getElementById('calc'), null).getPropertyValue('margin-left') should be 253px. Was 0px.
+FAIL getComputedStyle(document.getElementById('calc'), null).getPropertyValue('margin-top') should be 76px. Was 0px.
+FAIL getComputedStyle(document.getElementById('calc'), null).getPropertyValue('margin-right') should be 346px. Was 0px.
+FAIL getComputedStyle(document.getElementById('calc'), null).getPropertyValue('margin-bottom') should be 530px. Was 0px.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!DOCTYPE html>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<style>
+#control {
+ margin-left: 33%;
+ margin-top: 10%;
+ margin-right: 45%;
+ margin-bottom: 69%;
+}
+#calc {
+ margin-left: -webkit-calc(33%);
+ margin-top: -webkit-calc(10%);
+ margin-right: -webkit-calc(45%);
+ margin-bottom: -webkit-calc(69%);
+}
+</style>
+<div id="control"></div>
+<div id="calc"></div>
+<script>
+ function test(prop) {
+ shouldEvaluateTo("getComputedStyle(document.getElementById('calc'), null).getPropertyValue('" + prop + "')", "getComputedStyle(document.getElementById('control', null)).getPropertyValue('" + prop + "')");
+ }
+
+ description("Tests calling getPropertyValue on computed margin styles involving CSS calc");
+
+ test('margin-left');
+ test('margin-top');
+ test('margin-right');
+ test('margin-bottom');
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>