<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="reference"></div>
<div id="test1" style="font-weight: 0;"></div>
<div id="test2" style="font-weight: 0.5;"></div>
<div id="test3" style="font-weight: 1;"></div>
<div id="test4" style="font-weight: 999;"></div>
<div id="test5" style="font-weight: 999.5;"></div>
<div id="test6" style="font-weight: 1000;"></div>
<div id="test7" style="font-weight: 1000.5;"></div>
<div id="test8" style="font-weight: 1001;"></div>
<script>
description("This test makes sure that font-weight's range of values are parsed correctly.");
const reference = window.getComputedStyle(document.getElementById("reference")).getPropertyValue("font-weight");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('font-weight')", reference);
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('font-weight')", reference);
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('font-weight')", "1");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('font-weight')", "999");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).getPropertyValue('font-weight')", "999.5");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test6')).getPropertyValue('font-weight')", "1000");
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test7')).getPropertyValue('font-weight')", reference);
shouldBeEqualToString("window.getComputedStyle(document.getElementById('test8')).getPropertyValue('font-weight')", reference);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
