OLD | NEW |
1 library CssRuleListTest; | 1 library CssRuleListTest; |
| 2 |
2 import 'package:unittest/unittest.dart'; | 3 import 'package:unittest/unittest.dart'; |
3 import 'package:unittest/html_config.dart'; | 4 import 'package:unittest/html_config.dart'; |
4 import 'dart:html'; | 5 import 'dart:html'; |
5 | 6 |
6 main() { | 7 main() { |
7 | |
8 var isCssRuleList = | 8 var isCssRuleList = |
9 predicate((x) => x is List<CssRule>, 'is a List<CssRule>'); | 9 predicate((x) => x is List<CssRule>, 'is a List<CssRule>'); |
10 | 10 |
11 useHtmlConfiguration(); | 11 useHtmlConfiguration(); |
12 | 12 |
13 test("ClientRectList test", () { | 13 test("ClientRectList test", () { |
14 var sheet = document.styleSheets[0]; | 14 var sheet = document.styleSheets[0]; |
15 List<CssRule> rulesList = sheet.cssRules; | 15 List<CssRule> rulesList = sheet.cssRules; |
16 expect(rulesList, isCssRuleList); | 16 expect(rulesList, isCssRuleList); |
17 }); | 17 }); |
18 } | 18 } |
OLD | NEW |