c265902bea
Review URL: https://chromiumcodereview.appspot.com//10836241 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10685 260f80e4-7a28-3924-810f-c04153c831b5
34 lines
866 B
Dart
34 lines
866 B
Dart
#library('TypingTest');
|
|
#import('../../pkg/unittest/unittest.dart');
|
|
#import('../../pkg/unittest/html_config.dart');
|
|
#import('dart:html');
|
|
|
|
main() {
|
|
useHtmlConfiguration();
|
|
|
|
test('NodeList', () {
|
|
List<Node> asList = window.document.queryAll('body');
|
|
// Check it's Iterable
|
|
int counter = 0;
|
|
for (Node node in window.document.queryAll('body')) {
|
|
counter++;
|
|
}
|
|
Expect.equals(1, counter);
|
|
counter = 0;
|
|
window.document.queryAll('body').forEach((e) { counter++; });
|
|
Expect.equals(1, counter);
|
|
});
|
|
|
|
test('StyleSheetList', () {
|
|
List<StyleSheet> asList = window.document.styleSheets;
|
|
// Check it's Iterable.
|
|
int counter = 0;
|
|
for (StyleSheet styleSheet in window.document.styleSheets) {
|
|
counter++;
|
|
}
|
|
|
|
// There is one style sheet from the unittest framework.
|
|
Expect.equals(1, counter);
|
|
});
|
|
}
|