mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Modify wpt test following review comment
This commit is contained in:
parent
725484d619
commit
595f11dbd2
1 changed files with 18 additions and 5 deletions
|
@ -3,24 +3,37 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<title>Tests the relationship between float and position</title>
|
<title>Tests the relationship between float and position</title>
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<head>
|
<head>
|
||||||
<body>
|
<body>
|
||||||
<div style="position: fixed; float: left"></div>
|
<div></div>
|
||||||
|
|
||||||
<script src=/resources/testharness.js></script>
|
<script src=/resources/testharness.js></script>
|
||||||
<script src=/resources/testharnessreport.js></script>
|
<script src=/resources/testharnessreport.js></script>
|
||||||
<script>
|
<script>
|
||||||
test(function() {
|
test(function() {
|
||||||
var computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
var computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
||||||
assert_equals(computed_style, "none");
|
assert_equals(computed_style, "left");
|
||||||
|
|
||||||
document.querySelector("div").setAttribute("position", "absolute");
|
document.querySelector("div").setAttribute("style", "position: fixed;");
|
||||||
|
|
||||||
computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
||||||
assert_equals(computed_style, "none");
|
assert_equals(computed_style, "none");
|
||||||
});
|
|
||||||
|
|
||||||
<!-- test(); -->
|
document.querySelector("div").setAttribute("style", "position: absolute;");
|
||||||
|
|
||||||
|
computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
||||||
|
assert_equals(computed_style, "none");
|
||||||
|
|
||||||
|
document.querySelector("div").removeAttribute("style");
|
||||||
|
|
||||||
|
computed_style = getComputedStyle(document.querySelector("div"))["float"];
|
||||||
|
assert_equals(computed_style, "left");
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue