Commit a5177246 authored by darin's avatar darin

Layout test for <rdar://problem/4545060>, technorati and arstechnica fail

        because of getComputedStyle not reporting display:none.
        http://bugs.webkit.org/show_bug.cgi?id=13103

        * fast/css/computed-style-display-none.html: Added.
        * fast/css/computed-style-display-none-expected.txt: Added.

        * fast/css/computed-style-negative-top.html: Updated to work with Gecko.
        * fast/css/computed-style-negative-top-expected.txt: Newline change needed
        because of change above.

        * fast/css/computed-style.html: Updated to work with Gecko.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff861b0b
2007-03-29 Darin Adler <darin@apple.com>
Layout test for <rdar://problem/4545060>, technorati and arstechnica fail
because of getComputedStyle not reporting display:none.
http://bugs.webkit.org/show_bug.cgi?id=13103
* fast/css/computed-style-display-none.html: Added.
* fast/css/computed-style-display-none-expected.txt: Added.
* fast/css/computed-style-negative-top.html: Updated to work with Gecko.
* fast/css/computed-style-negative-top-expected.txt: Newline change needed
because of change above.
* fast/css/computed-style.html: Updated to work with Gecko.
2007-03-28 Jeff Walden <jwalden+code@mit.edu>
Reviewed by Darin.
Test succeeded! The value of display is 'none'.
<script>
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var style = document.defaultView.getComputedStyle(document.getElementById("test"), "");
var result = document.getElementById("result");
if (style.display == "none")
result.appendChild(document.createTextNode("Test succeeded! The value of display is 'none'."));
else
result.appendChild(document.createTextNode("Test failed. The value of display is '" + style.display + "'."));
}
</script>
<body onload="test()">
<div id="test" style="display: none"></div>
<div id="result"></div>
</body>
<div id="test" style="position:relative; top:-1px"></div>
<script>
var style = document.defaultView.getComputedStyle(document.getElementById("test"));
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (style.top == "-1px")
document.write("Test succeeded! Top is " + style.top + ".");
else
document.write("Test failed! Top is " + style.top + ".");
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var style = document.defaultView.getComputedStyle(document.getElementById("test"), "");
var result = document.getElementById("result");
if (style.top == "-1px")
result.appendChild(document.createTextNode("Test succeeded! Top is " + style.top + "."));
else
result.appendChild(document.createTextNode("Test failed! Top is " + style.top + "."));
}
</script>
<body onload="test()">
<div id="test" style="position:relative; top:-1px"></div>
<div id="result"></div>
</body>
......@@ -2,10 +2,10 @@
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var style = document.defaultView.getComputedStyle(document.body);
var style = document.defaultView.getComputedStyle(document.body, "");
var text = "";
for (var i = 0; i != style.length; ++i) {
var name = style[i];
var name = style.item(i);
var value = style.getPropertyValue(name);
text += name + ": " + value + ";\n";
}
......
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