Commit 3d55fe7f authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

2008-06-23 David Kilzer <ddkilzer@apple.com>

        Updated test for Bug 15823: getPropertyValue for border returns null, should compute the shorthand value

        <https://bugs.webkit.org/show_bug.cgi?id=15823>

        Rubber-stamped by Darin.

        * fast/css/getPropertyValue-border-expected.txt: Updated results.
        * fast/css/getPropertyValue-border.html: Test all combinations of
        (mismatched) border values.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9b12c722
2008-06-23 David Kilzer <ddkilzer@apple.com>
Updated test for Bug 15823: getPropertyValue for border returns null, should compute the shorthand value
<https://bugs.webkit.org/show_bug.cgi?id=15823>
Rubber-stamped by Darin.
* fast/css/getPropertyValue-border-expected.txt: Updated results.
* fast/css/getPropertyValue-border.html: Test all combinations of
(mismatched) border values.
2008-06-22 Jonathon Jongsma <jonathon.jongsma@collabora.co.uk>
Reviewed by Darin Adler.
PASSED
1 2 3 4 5 6 7 8 9
Bug 15823: getPropertyValue for border returns null, should compute the shorthand value
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS div1.style.getPropertyValue("border") is '5px solid green'
PASS div2.style.getPropertyValue("border") is '5px solid'
PASS div3.style.getPropertyValue("border") is '5px green'
NOTE: '5px green' is an illegal CSS value for 'border'.
PASS div4.style.getPropertyValue("border") is 'solid green'
PASS div5.style.getPropertyValue("border") is 'green'
NOTE: 'green' is an illegal CSS value for 'border'.
PASS div6.style.getPropertyValue("border") is '5px'
PASS div7.style.getPropertyValue("border") is 'solid'
PASS div8.style.getPropertyValue("border") is null
PASS div9.style.getPropertyValue("border") is null
PASS successfullyParsed is true
TEST COMPLETE
......@@ -2,40 +2,68 @@
<html lang="en">
<head>
<title>currentColor basic test</title>
<style type="text/css">
div { height: 5em; width: 10em; }
<style type="text/css">
.test {
display: inline-block;
height: 5em;
width: 10em;
text-align: center;
vertical-align: middle;
}
</style>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
<script>
function log(message) {
var console = document.getElementById("console");
console.appendChild(document.createTextNode(message + "\n"));
}
function runTest() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var div = document.getElementById("border");
if (div.style.getPropertyValue("border") != "5px solid green") {
log("FAILED");
return;
}
div = document.getElementById("border2");
if (div.style.getPropertyValue("border") != "5px solid") {
log("FAILED");
return;
}
div = document.getElementById("border3");
if (div.style.getPropertyValue("border") != null) {
log("FAILED");
return;
}
log("PASSED");
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
</head>
<body onload="runTest()">
<div id="border" style="border: 5px solid green;" ></div>
<div id="border2" style="border-left: 5px solid red; border-top: 5px solid green; border-right: 5px solid blue; border-bottom: 5px solid purple;" ></div>
<div id="border3" style="border-left: 5px solid red; border-top: 5px solid green; border-right: 5px solid blue;" ></div>
<body>
<div id="border1" class="test" style="border: 5px solid green;">1</div>
<div id="border2" class="test" style="border-left: 5px solid red; border-top: 5px solid green; border-right: 5px solid blue; border-bottom: 5px solid purple;">2</div>
<div id="border3" class="test" style="border-left: 5px dashed green; border-top: 5px solid green; border-right: 5px dotted green; border-bottom: 5px groove green;">3</div>
<div id="border4" class="test" style="border-left: 4px solid green; border-top: 5px solid green; border-right: 5px solid green; border-bottom: 5px solid green;">4</div>
<div id="border5" class="test" style="border-left: 2px dashed green; border-top: 3px solid green; border-right: 4px dotted green; border-bottom: 5px groove green;">5</div>
<div id="border6" class="test" style="border-left: 5px dashed red; border-top: 5px solid green; border-right: 5px dotted blue; border-bottom: 5px groove purple;">6</div>
<div id="border7" class="test" style="border-left: 2px solid red; border-top: 3px solid green; border-right: 4px solid blue; border-bottom: 5px solid purple;">7</div>
<div id="border8" class="test" style="border-left: 2px dashed red; border-top: 3px solid green; border-right: 5px dotted blue; border-bottom: 5px groove purple;">8</div>
<div id="border9" class="test" style="border-left: 5px solid red; border-top: 5px solid green; border-right: 5px solid blue;">9</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("<a href=\"https://bugs.webkit.org/show_bug.cgi?id=15823\">Bug 15823: getPropertyValue for border returns null, should compute the shorthand value</a>");
var div1 = document.getElementById("border1");
shouldBe('div1.style.getPropertyValue("border")', "'5px solid green'");
var div2 = document.getElementById("border2");
shouldBe('div2.style.getPropertyValue("border")', "'5px solid'");
var div3 = document.getElementById("border3");
shouldBe('div3.style.getPropertyValue("border")', "'5px green'");
debug(" NOTE: '5px green' is an illegal CSS value for 'border'.");
var div4 = document.getElementById("border4");
shouldBe('div4.style.getPropertyValue("border")', "'solid green'");
var div5 = document.getElementById("border5");
shouldBe('div5.style.getPropertyValue("border")', "'green'");
debug(" NOTE: 'green' is an illegal CSS value for 'border'.");
var div6 = document.getElementById("border6");
shouldBe('div6.style.getPropertyValue("border")', "'5px'");
var div7 = document.getElementById("border7");
shouldBe('div7.style.getPropertyValue("border")', "'solid'");
var div8 = document.getElementById("border8");
shouldBe('div8.style.getPropertyValue("border")', "null");
var div9 = document.getElementById("border9");
shouldBe('div9.style.getPropertyValue("border")', "null");
var successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment