Index: sky/tests/lowlevel/style-basic.sky |
diff --git a/sky/tests/lowlevel/style-basic.sky b/sky/tests/lowlevel/style-basic.sky |
index 6d5b7ca24eb771ae422627b4516589d366436826..154dcc8d4d396fd20a1f950bb7a384683a619de8 100644 |
--- a/sky/tests/lowlevel/style-basic.sky |
+++ b/sky/tests/lowlevel/style-basic.sky |
@@ -20,25 +20,30 @@ |
</div> |
<div id="log"></div> |
<script> |
+ import "dart:sky"; |
+ |
+ main() { |
var tests = document.getElementById("tests"); |
var log = document.getElementById("log"); |
var i = 1; |
- for (var element = tests.firstElementChild; element; element = element.nextElementSibling, ++i) { |
- var order = getComputedStyle(element).order; |
+ for (var element = tests.firstElementChild; element != null; element = element.nextElementSibling) { |
+ var order = int.parse(window.getComputedStyle(element).getPropertyValue("order")); |
var div = document.createElement("div"); |
var text = (order == i) ? "PASS" : "FAIL"; |
text += ": <" |
+ element.tagName |
+ " class=" |
- + element.classList |
+ + element.classList.toString() |
+ " id=" + element.id |
+ "> order was " |
- + order; |
+ + order.toString(); |
if (order != i) |
text += " expected " + i; |
div.textContent = text; |
log.appendChild(div); |
+ ++i; |
} |
+ } |
</script> |
</body> |
</html> |