Files
sdk/tests/html/cdata_test.dart
T
blois@google.com 15a2c6d91f Re-submit of 12213058 to fix CharacterData.remove
Original was hanging on Dartium as it was missing useHtmlConfiguration in the test.

patch from issue 12213058

BUG=

Review URL: https://codereview.chromium.org//12210073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18237 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 23:38:37 +00:00

25 lines
667 B
Dart

// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file
library cdata_test;
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
import 'dart:html';
main() {
useHtmlConfiguration();
test('remove', () {
var div = new Element.html('<div>content</div>');
var cdata = div.nodes[0];
expect(cdata is CharacterData, true);
expect(cdata, isNotNull);
expect(div.innerHtml, 'content');
cdata.remove();
expect(div.innerHtml, '');
});
}