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