OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library TableTest; | |
6 import 'package:unittest/unittest.dart'; | |
7 import 'package:unittest/html_config.dart'; | |
8 import 'dart:html'; | 5 import 'dart:html'; |
9 | 6 |
| 7 import 'package:expect/minitest.dart'; |
| 8 |
10 main() { | 9 main() { |
11 useHtmlConfiguration(); | |
12 | |
13 test('createTBody', () { | 10 test('createTBody', () { |
14 var table = new TableElement(); | 11 var table = new TableElement(); |
15 var head = table.createTHead(); | 12 var head = table.createTHead(); |
16 expect(table.tHead, head); | 13 expect(table.tHead, head); |
17 | 14 |
18 var headerRow = head.addRow(); | 15 var headerRow = head.addRow(); |
19 var headerCell = headerRow.addCell(); | 16 var headerCell = headerRow.addCell(); |
20 headerCell.text = 'Header Cell'; | 17 headerCell.text = 'Header Cell'; |
21 | 18 |
22 var caption = table.createCaption(); | 19 var caption = table.createCaption(); |
(...skipping 29 matching lines...) Expand all Loading... |
52 var bodyCell2 = bodyRow2.addCell(); | 49 var bodyCell2 = bodyRow2.addCell(); |
53 bodyCell2.text = 'Body Cell2'; | 50 bodyCell2.text = 'Body Cell2'; |
54 | 51 |
55 expect(body2.rows.length, 1); | 52 expect(body2.rows.length, 1); |
56 | 53 |
57 expect(table.tBodies.length, 2); | 54 expect(table.tBodies.length, 2); |
58 expect(table.tBodies[1], body2); | 55 expect(table.tBodies[1], body2); |
59 }); | 56 }); |
60 } | 57 } |
61 | 58 |
OLD | NEW |