OLD | NEW |
1 library ElementTest; | 1 library ElementTest; |
2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import 'package:unittest/unittest.dart'; |
3 import '../../pkg/unittest/lib/html_config.dart'; | 3 import 'package:unittest/html_config.dart'; |
4 import 'dart:html'; | 4 import 'dart:html'; |
5 import 'utils.dart'; | 5 import 'utils.dart'; |
6 | 6 |
7 main() { | 7 main() { |
8 useHtmlConfiguration(); | 8 useHtmlConfiguration(); |
9 test('InnerHTML', () { | 9 test('InnerHTML', () { |
10 Element element = new Element.tag('div'); | 10 Element element = new Element.tag('div'); |
11 element.id = 'test'; | 11 element.id = 'test'; |
12 element.innerHtml = 'Hello World'; | 12 element.innerHtml = 'Hello World'; |
13 document.body.append(element); | 13 document.body.append(element); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 '<div id="dataDiv" data-my-message="Hello World"></div>', | 93 '<div id="dataDiv" data-my-message="Hello World"></div>', |
94 treeSanitizer: new NullTreeSanitizer()); | 94 treeSanitizer: new NullTreeSanitizer()); |
95 expect(otherDiv.dataset.containsKey('myMessage'), isTrue); | 95 expect(otherDiv.dataset.containsKey('myMessage'), isTrue); |
96 | 96 |
97 Element anotherDiv = new Element.html( | 97 Element anotherDiv = new Element.html( |
98 '<div id="dataDiv" data-eggs="bacon"></div>', | 98 '<div id="dataDiv" data-eggs="bacon"></div>', |
99 treeSanitizer: new NullTreeSanitizer()); | 99 treeSanitizer: new NullTreeSanitizer()); |
100 expect(anotherDiv.dataset.containsKey('eggs'), isTrue); | 100 expect(anotherDiv.dataset.containsKey('eggs'), isTrue); |
101 }); | 101 }); |
102 } | 102 } |
OLD | NEW |