b101a7d002
Change-Id: Ib33169c3e0ffc870915c189404074a1dea472546 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196548 Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Leaf Petersen <leafp@google.com>
28 lines
585 B
Dart
28 lines
585 B
Dart
|
|
// @dart = 2.9
|
|
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);
|
|
});
|
|
});
|
|
}
|