From 4bb8c21945c6dfa0f99b9a11e101b44da7ef779e Mon Sep 17 00:00:00 2001 From: Matt Kelly Date: Mon, 9 Apr 2012 17:05:44 -0700 Subject: [PATCH] Adding cssminmax test. --- tests/cssminmax/config.yml | 4 ++++ tests/cssminmax/fixture.html | 6 ++++++ tests/cssminmax/test.js | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 tests/cssminmax/config.yml create mode 100644 tests/cssminmax/fixture.html create mode 100644 tests/cssminmax/test.js diff --git a/tests/cssminmax/config.yml b/tests/cssminmax/config.yml new file mode 100644 index 0000000..c22af48 --- /dev/null +++ b/tests/cssminmax/config.yml @@ -0,0 +1,4 @@ +--- + r: 0 + spec: "http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" + title: "CSS Min, Max" diff --git a/tests/cssminmax/fixture.html b/tests/cssminmax/fixture.html new file mode 100644 index 0000000..c35007f --- /dev/null +++ b/tests/cssminmax/fixture.html @@ -0,0 +1,6 @@ +
+
?
+
This should push the width pretty damn far
+
+
Horizontal
Rule
Rules!
+
\ No newline at end of file diff --git a/tests/cssminmax/test.js b/tests/cssminmax/test.js new file mode 100644 index 0000000..e29c02d --- /dev/null +++ b/tests/cssminmax/test.js @@ -0,0 +1,23 @@ +test("CSS min-width", function() { + var fixture = document.querySelector("#cssminmax #css-min-width"); + + assert( getComputedStyle( fixture ).getPropertyValue("width") === "20px", "min-width supported" ); +}); + +test("CSS max-width", function() { + var fixture = document.querySelector("#cssminmax #css-max-width"); + + assert( getComputedStyle( fixture ).getPropertyValue("width") === "20px", "max-width supported" ); +}); + +test("CSS min-height", function() { + var fixture = document.querySelector("#cssminmax #css-min-height"); + + assert( getComputedStyle( fixture ).getPropertyValue("height") === "20px", "min-height supported" ); +}); + +test("CSS max-height", function() { + var fixture = document.querySelector("#cssminmax #css-max-height"); + + assert( getComputedStyle( fixture ).getPropertyValue("height") === "20px", "max-height supported" ); +});