blob: cf8b44d14e3f9827542e5fd7ead1068491b6a01d [file] [log] [blame]
// @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);
});
});
}