flutter_flutter/tests/lowlevel/style-specificity.sky
Adam Barth b0ef81ac95 Make element.style["color"] work in Sky
This CL makes CSSStyleDeclaration a bit less painful to use by replacing the
crazy Java-style APIs with overloading operator[] and operator[]=.

R=esprehn@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/942553002
2015-02-19 13:06:01 -08:00

26 lines
558 B
Plaintext

<html>
<style>
#sandbox { color: red; }
.blue { color: blue; }
</style>
<body>
<div id="sandbox" class="blue">This should be blue.</div>
<script>
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";
import "dart:sky";
main() {
initUnit();
test('should not exist', () {
var sandbox = document.getElementById("sandbox");
expect(window.getComputedStyle(sandbox)["color"],
equals("rgb(0, 0, 255)"));
});
}
</script>
</body>
</html>