Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/cssminmax/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
r: 0
spec: "http://www.w3.org/TR/CSS21/visudet.html#min-max-widths"
title: "CSS Min, Max"
6 changes: 6 additions & 0 deletions tests/cssminmax/fixture.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div id="cssminmax">
<div id="css-min-width" style="min-width:20px;position:absolute">?</div>
<div id="css-max-width" style="max-width:20px;position:absolute;overflow:hidden">This should push the width pretty damn far</div>
<div id="css-min-height" style="min-height:20px;position:absolute"></div>
<div id="css-max-height" style="max-height:20px;position:absolute;overflow:hidden">Horizontal<hr>Rule<hr>Rules!</div>
</div>
23 changes: 23 additions & 0 deletions tests/cssminmax/test.js
Original file line number Diff line number Diff line change
@@ -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" );
});