Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Merge pull request #360 from sherlock917/master
Browse files Browse the repository at this point in the history
test for ellipse, fixed #169
  • Loading branch information
astearns committed Nov 10, 2013
2 parents 5269d9a + 8347838 commit a037689
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="flags" content="dom">
<meta name="assert" content="shape-outside declaration is invalid if ellipse shape function has only two invalid arguments">
<title>CSS Shapes Test: Ellipse - invalid 2 arg</title>
<link rel="author" title="Sherlock Zhong" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-shapes/#supported-basic-shapes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
#shape{
width: 300px;
height: 300px;
shape-outside: ellipse(50px, 50px);
}
</style>
</head>
<body>

<div id="log"></div>

<div id="shape"></div>

<script>
var obj = document.getElementById('shape');
var val = getComputedStyle(obj).shapeOutside;
test(function() {assert_equals(val, "auto", "declaration should not be valid")});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="flags" content="dom">
<meta name="assert" content="shape-outside declaration is invalid if ellipse shape function has an invalid ry param">
<title>CSS Shapes Test: Ellipse - invalid ry value</title>
<link rel="author" title="Sherlock Zhong" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-shapes/#supported-basic-shapes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
#shape{
width: 300px;
height: 300px;
shape-outside: ellipse(-50px, -50px, 50px, 50);
}
</style>
</head>
<body>

<div id="log"></div>

<div id="shape"></div>

<script>
var obj = document.getElementById('shape');
var val = getComputedStyle(obj).shapeOutside;
test(function() {assert_equals(val, "auto", "declaration should not be valid")});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="flags" content="dom">
<meta name="assert" content="shape-outside declaration is invalid if ellipse shape function has an invalid rx param">
<title>CSS Shapes Test: Ellipse - invalid rx value</title>
<link rel="author" title="Sherlock Zhong" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-shapes/#supported-basic-shapes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
#shape{
width: 300px;
height: 300px;
shape-outside: ellipse(-50px, -50px, 50, 50px);
}
</style>
</head>
<body>

<div id="log"></div>

<div id="shape"></div>

<script>
var obj = document.getElementById('shape');
var val = getComputedStyle(obj).shapeOutside;
test(function() {assert_equals(val, "auto", "declaration should not be valid")});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="flags" content="dom">
<meta name="assert" content="shape-outside declaration is invalid if inset-rectangle shape function has an invalid top param">
<title>CSS Shapes Test: Inset Rectangles - invalid top</title>
<link rel="author" title="Sherlock Zhong" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-shapes/#supported-basic-shapes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
#shape{
width: 300px;
height: 300px;
shape-outside: inset-rectangle(-50, -50px, 50px, 50px);
}
</style>
</head>
<body>

<div id="log"></div>

<div id="shape"></div>

<script>
var obj = document.getElementById('shape');
var val = getComputedStyle(obj).shapeOutside;
test(function() {assert_equals(val, "auto", "declaration should not be valid")});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="flags" content="dom">
<meta name="assert" content="shape-outside declaration is invalid if inset-rectangle shape function has an invalid right param">
<title>CSS Shapes Test: Inset Rectangles - invalid right</title>
<link rel="author" title="Sherlock Zhong" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-shapes/#supported-basic-shapes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" href="/resources/testharness.css">
<style>
#shape{
width: 300px;
height: 300px;
shape-outside: inset-rectangle(-50px, -50, 50px, 50px);
}
</style>
</head>
<body>

<div id="log"></div>

<div id="shape"></div>

<script>
var obj = document.getElementById('shape');
var val = getComputedStyle(obj).shapeOutside;
test(function() {assert_equals(val, "auto", "declaration should not be valid")});
</script>

</body>
</html>

0 comments on commit a037689

Please sign in to comment.