mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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>
|
||||
<meta charset=utf-8>
|
||||
<title>Tests the relationship between float and position</title>
|
||||
<style>
|
||||
div {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
<head>
|
||||
<body>
|
||||
<div style="position: fixed; float: left"></div>
|
||||
<div></div>
|
||||
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
test(function() {
|
||||
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"];
|
||||
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>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue