Skip to content

Commit

Permalink
Modify wpt test following review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-leblanc committed Oct 24, 2015
1 parent 725484d commit 595f11d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tests/wpt/mozilla/tests/css/float_relative_to_position.html
Expand Up @@ -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, "left");

document.querySelector("div").setAttribute("style", "position: fixed;");

computed_style = getComputedStyle(document.querySelector("div"))["float"];
assert_equals(computed_style, "none");

document.querySelector("div").setAttribute("position", "absolute");
document.querySelector("div").setAttribute("style", "position: absolute;");

computed_style = getComputedStyle(document.querySelector("div"))["float"];
assert_equals(computed_style, "none");
});

<!-- test(); -->
document.querySelector("div").removeAttribute("style");

computed_style = getComputedStyle(document.querySelector("div"))["float"];
assert_equals(computed_style, "left");
});
</script>

</body>
Expand Down

0 comments on commit 595f11d

Please sign in to comment.