| Index: tests/dom/htmlelement_test.dart
|
| diff --git a/tests/dom/htmlelement_test.dart b/tests/dom/htmlelement_test.dart
|
| deleted file mode 100644
|
| index b114c16df5aaf2725c80981c66a43db926e04926..0000000000000000000000000000000000000000
|
| --- a/tests/dom/htmlelement_test.dart
|
| +++ /dev/null
|
| @@ -1,91 +0,0 @@
|
| -#library('ElementTest');
|
| -#import('../../lib/unittest/unittest.dart');
|
| -#import('../../lib/unittest/html_config.dart');
|
| -#import('dart:html');
|
| -
|
| -main() {
|
| - useHtmlConfiguration();
|
| - test('InnerHTML', () {
|
| - Element element = new Element.tag('div');
|
| - element.id = 'test';
|
| - element.innerHTML = 'Hello World';
|
| - document.body.nodes.add(element);
|
| -
|
| - element = document.query('#test');
|
| - Expect.stringEquals('Hello World', element.innerHTML);
|
| - element.remove();
|
| - });
|
| - test('HTMLTable', () {
|
| - Element table = new Element.tag('table');
|
| -
|
| - TableRowElement row = new Element.tag('tr');
|
| - table.nodes.add(row);
|
| -
|
| - row.nodes.add(new Element.tag('td'));
|
| - row.nodes.add(new Element.tag('td'));
|
| -
|
| - Expect.equals(2, row.cells.length);
|
| -
|
| - TableRowElement headerRow = table.rows.item(0);
|
| - Expect.equals(2, headerRow.cells.length);
|
| - });
|
| - test('dataAttributes', () {
|
| - Element div = new Element.tag('div');
|
| -
|
| - Expect.isTrue(div.dataAttributes.isEmpty());
|
| - Expect.equals(null, div.dataAttributes['foo']);
|
| - Expect.isTrue(div.dataAttributes.isEmpty());
|
| -
|
| - div.dataAttributes['foo'] = 'foo-value';
|
| - Expect.equals('foo-value', div.dataAttributes['foo']);
|
| - Expect.isFalse(div.dataAttributes.isEmpty());
|
| -
|
| - Expect.isTrue(div.dataAttributes.containsValue('foo-value'));
|
| - Expect.isFalse(div.dataAttributes.containsValue('bar-value'));
|
| - Expect.isTrue(div.dataAttributes.containsKey('foo'));
|
| - Expect.isFalse(div.dataAttributes.containsKey('bar'));
|
| -
|
| - bool hasBeenInvoked;
|
| - String f() {
|
| - hasBeenInvoked = true;
|
| - return 'bar-value';
|
| - }
|
| -
|
| - hasBeenInvoked = false;
|
| - Expect.equals('bar-value', div.dataAttributes.putIfAbsent('bar', f));
|
| - Expect.isTrue(hasBeenInvoked);
|
| -
|
| - hasBeenInvoked = false;
|
| - Expect.equals('bar-value', div.dataAttributes.putIfAbsent('bar', f));
|
| - Expect.isFalse(hasBeenInvoked);
|
| -
|
| - final keys = <String> [];
|
| - final values = <String> [];
|
| - div.dataAttributes.forEach(void f(String key, String value) {
|
| - keys.add(key);
|
| - values.add(value);
|
| - });
|
| - Expect.setEquals(const <String> ['foo', 'bar'], keys);
|
| - Expect.setEquals(const <String> ['foo-value', 'bar-value'], values);
|
| -
|
| - Expect.setEquals(const <String> ['foo', 'bar'],
|
| - new List<String>.from(div.dataAttributes.getKeys()));
|
| - Expect.setEquals(const <String> ['foo-value', 'bar-value'],
|
| - new List<String>.from(div.dataAttributes.getValues()));
|
| -
|
| - Expect.equals(2, div.dataAttributes.length);
|
| - Expect.isFalse(div.dataAttributes.isEmpty());
|
| -
|
| - Expect.isNull(div.dataAttributes.remove('qux'));
|
| - Expect.equals(2, div.dataAttributes.length);
|
| - Expect.isFalse(div.dataAttributes.isEmpty());
|
| -
|
| - Expect.equals('foo-value', div.dataAttributes.remove('foo'));
|
| - Expect.equals(1, div.dataAttributes.length);
|
| - Expect.isFalse(div.dataAttributes.isEmpty());
|
| -
|
| - div.dataAttributes.clear();
|
| - Expect.equals(0, div.dataAttributes.length);
|
| - Expect.isTrue(div.dataAttributes.isEmpty());
|
| - });
|
| -}
|
|
|