Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: sky/tests/lowlevel/attribute-collection.sky

Issue 1212163009: Port remaining Sky tests to the new world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: add Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/tests/lowlevel/attribute-collection.sky
diff --git a/sky/tests/lowlevel/attribute-collection.sky b/sky/tests/lowlevel/attribute-collection.sky
deleted file mode 100644
index 5b6881ee793e7cbefce368d620cb47b9b6a4ebb9..0000000000000000000000000000000000000000
--- a/sky/tests/lowlevel/attribute-collection.sky
+++ /dev/null
@@ -1,67 +0,0 @@
-<html>
-<script>
-import "../resources/third_party/unittest/unittest.dart";
-import "../resources/unit.dart";
-
-import "dart:sky";
-
-void main() {
- initUnit();
-
- var div;
- setUp(() {
- div = document.createElement("div");
- });
-
- test("should get by index", () {
- div.setAttribute("attr0", "value0");
- div.setAttribute("attr1", "value1");
- var attrs = div.getAttributes();
- expect(attrs.length, equals(2));
- expect(attrs[0].name, equals("attr0"));
- expect(attrs[0].value, equals("value0"));
- expect(attrs[1].name, equals("attr1"));
- expect(attrs[1].value, equals("value1"));
- });
- test("should set by name", () {
- div.setAttribute("attrName", "value0");
- expect(div.getAttribute("attrName"), equals("value0"));
- expect(div.getAttributes()[0].name, equals("attrName"));
- expect(div.getAttributes()[0].value, equals("value0"));
- div.setAttribute("attrName", "new value");
- expect(div.getAttribute("attrName"), equals("new value"));
- expect(div.getAttributes()[0].name, equals("attrName"));
- expect(div.getAttributes()[0].value, equals("new value"));
- });
- test("should be case sensitive", () {
- div.setAttribute("attrName", "value0");
- expect(div.getAttribute("attrname"), isNull);
- expect(div.getAttribute("attrName"), equals("value0"));
- });
- test("should not live update", () {
- div.setAttribute("attr0", "0");
- div.setAttribute("attr1", "1");
- div.setAttribute("attr2", "2");
- var oldAttributes = div.getAttributes();
- expect(oldAttributes.length, equals(3));
- div.removeAttribute("attr1");
- expect(oldAttributes.length, equals(3));
- div.setAttribute("attr0", "value0");
- div.setAttribute("attr2", "value2");
- var newAttributes = div.getAttributes();
- expect(newAttributes.length, equals(2));
- expect(newAttributes[0].name, equals("attr0"));
- expect(newAttributes[0].value, equals("value0"));
- expect(newAttributes[1].name, equals("attr2"));
- expect(newAttributes[1].value, equals("value2"));
- expect(newAttributes, isNot(equals(oldAttributes)));
- expect(oldAttributes[0].name, equals("attr0"));
- expect(oldAttributes[0].value, equals("0"));
- expect(oldAttributes[1].name, equals("attr1"));
- expect(oldAttributes[1].value, equals("1"));
- expect(oldAttributes[2].name, equals("attr2"));
- expect(oldAttributes[2].value, equals("2"));
- });
-}
-</script>
-</html>
« no previous file with comments | « sky/tests/fast/images/resources/ycbcr-with-no-color-profile.jpg ('k') | sky/tests/lowlevel/attribute-collection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698