d2cd2a4720
Bug: Change-Id: If23630da318547e3beaf417a5ad97b30f6ffcbd3 Reviewed-on: https://dart-review.googlesource.com/10340 Reviewed-by: Florian Loitsch <floitsch@google.com> Commit-Queue: Jakob Roland Andersen <jakobr@google.com>
26 lines
569 B
Dart
26 lines
569 B
Dart
import 'dart:html';
|
|
|
|
import 'package:expect/minitest.dart';
|
|
|
|
main() {
|
|
group('supported', () {
|
|
test('supports_createContextualFragment', () {
|
|
expect(Range.supportsCreateContextualFragment, isTrue);
|
|
});
|
|
});
|
|
|
|
group('functional', () {
|
|
test('supported works', () {
|
|
var range = new Range();
|
|
range.selectNode(document.body);
|
|
|
|
var expectation =
|
|
Range.supportsCreateContextualFragment ? returnsNormally : throws;
|
|
|
|
expect(() {
|
|
range.createContextualFragment('<div></div>');
|
|
}, expectation);
|
|
});
|
|
});
|
|
}
|