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

Unified Diff: LayoutTests/dart/dom/HTMLElementTest.dart

Issue 9188009: Things to unfork. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 11 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
« no previous file with comments | « LayoutTests/dart/dom/HTMLCollectionTest-expected.txt ('k') | LayoutTests/dart/dom/HTMLElementTest.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/dom/HTMLElementTest.dart
diff --git a/LayoutTests/dart/dom/HTMLElementTest.dart b/LayoutTests/dart/dom/HTMLElementTest.dart
deleted file mode 100644
index 09eafc726c63a39f1e80f2217f49c233264c8634..0000000000000000000000000000000000000000
--- a/LayoutTests/dart/dom/HTMLElementTest.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-#import('../../../../../dart/client/testing/unittest/unittest.dart');
-#import('dart:dom');
-
-main() {
- forLayoutTests();
- test('InnerHTML', () {
- HTMLElement element = document.createElement('div');
- element.id = 'test';
- element.innerHTML = 'Hello World';
- document.body.appendChild(element);
-
- element = document.getElementById('test');
- Expect.stringEquals('Hello World', element.innerHTML);
- document.body.removeChild(element);
- });
- test('HTMLTable', () {
- HTMLElement table = document.createElement('table');
-
- HTMLTableRowElement row = document.createElement('tr');
- table.appendChild(row);
-
- row.appendChild(document.createElement('td'));
- row.appendChild(document.createElement('td'));
-
- Expect.equals(2, row.cells.length);
-
- HTMLTableRowElement headerRow = table.rows.item(0);
- Expect.equals(2, headerRow.cells.length);
- });
- test('Dataset', () {
- HTMLElement div = document.createElement('div');
-
- Expect.isTrue(div.dataset.isEmpty());
- Expect.equals('', div.dataset['foo']);
- Expect.isTrue(div.dataset.isEmpty());
-
- div.dataset['foo'] = 'foo-value';
- Expect.equals('foo-value', div.dataset['foo']);
- Expect.isFalse(div.dataset.isEmpty());
-
- Expect.isTrue(div.dataset.containsValue('foo-value'));
- Expect.isFalse(div.dataset.containsValue('bar-value'));
- Expect.isTrue(div.dataset.containsKey('foo'));
- Expect.isFalse(div.dataset.containsKey('bar'));
-
- bool hasBeenInvoked;
- String f() {
- hasBeenInvoked = true;
- return 'bar-value';
- }
-
- hasBeenInvoked = false;
- Expect.equals('bar-value', div.dataset.putIfAbsent('bar', f));
- Expect.isTrue(hasBeenInvoked);
-
- hasBeenInvoked = false;
- Expect.equals('bar-value', div.dataset.putIfAbsent('bar', f));
- Expect.isFalse(hasBeenInvoked);
-
- final keys = <String> [];
- final values = <String> [];
- div.dataset.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.dataset.getKeys()));
- Expect.setEquals(const <String> ['foo-value', 'bar-value'],
- new List<String>.from(div.dataset.getValues()));
-
- Expect.equals(2, div.dataset.length);
- Expect.isFalse(div.dataset.isEmpty());
-
- Expect.isNull(div.dataset.remove('qux'));
- Expect.equals(2, div.dataset.length);
- Expect.isFalse(div.dataset.isEmpty());
-
- Expect.equals('foo-value', div.dataset.remove('foo'));
- Expect.equals(1, div.dataset.length);
- Expect.isFalse(div.dataset.isEmpty());
-
- div.dataset.clear();
- Expect.equals(0, div.dataset.length);
- Expect.isTrue(div.dataset.isEmpty());
- });
-}
« no previous file with comments | « LayoutTests/dart/dom/HTMLCollectionTest-expected.txt ('k') | LayoutTests/dart/dom/HTMLElementTest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698