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

Side by Side Diff: sky/tests/dom/attribute_collection.dart

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, 5 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 unified diff | Download patch
« no previous file with comments | « sky/tests/dom/appendChild.sky ('k') | sky/tests/dom/attribute_collection-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html>
2 <script>
3 import "../resources/third_party/unittest/unittest.dart"; 1 import "../resources/third_party/unittest/unittest.dart";
4 import "../resources/unit.dart"; 2 import "../resources/unit.dart";
5 3
6 import "dart:sky"; 4 import "dart:sky";
7 5
8 void main() { 6 void main() {
9 initUnit(); 7 initUnit();
10 8
11 var div; 9 var div;
12 setUp(() { 10 setUp(() {
11 var document = new Document();
13 div = document.createElement("div"); 12 div = document.createElement("div");
14 }); 13 });
15 14
16 test("should get by index", () { 15 test("should get by index", () {
17 div.setAttribute("attr0", "value0"); 16 div.setAttribute("attr0", "value0");
18 div.setAttribute("attr1", "value1"); 17 div.setAttribute("attr1", "value1");
19 var attrs = div.getAttributes(); 18 var attrs = div.getAttributes();
20 expect(attrs.length, equals(2)); 19 expect(attrs.length, equals(2));
21 expect(attrs[0].name, equals("attr0")); 20 expect(attrs[0].name, equals("attr0"));
22 expect(attrs[0].value, equals("value0")); 21 expect(attrs[0].value, equals("value0"));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 expect(newAttributes[1].value, equals("value2")); 55 expect(newAttributes[1].value, equals("value2"));
57 expect(newAttributes, isNot(equals(oldAttributes))); 56 expect(newAttributes, isNot(equals(oldAttributes)));
58 expect(oldAttributes[0].name, equals("attr0")); 57 expect(oldAttributes[0].name, equals("attr0"));
59 expect(oldAttributes[0].value, equals("0")); 58 expect(oldAttributes[0].value, equals("0"));
60 expect(oldAttributes[1].name, equals("attr1")); 59 expect(oldAttributes[1].name, equals("attr1"));
61 expect(oldAttributes[1].value, equals("1")); 60 expect(oldAttributes[1].value, equals("1"));
62 expect(oldAttributes[2].name, equals("attr2")); 61 expect(oldAttributes[2].name, equals("attr2"));
63 expect(oldAttributes[2].value, equals("2")); 62 expect(oldAttributes[2].value, equals("2"));
64 }); 63 });
65 } 64 }
66 </script>
67 </html>
OLDNEW
« no previous file with comments | « sky/tests/dom/appendChild.sky ('k') | sky/tests/dom/attribute_collection-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698