blob: ddb7667f190a114b5764644e32f68b6672c652dd [file] [log] [blame]
* Copyright (c) 2014, 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.
* @assertion
* @description Namespace chaining
import "dart:html";
import "../../testharness.dart";
import "../../../Utils/expect.dart";
const String htmlEL2 = r'''
<div id="d" xmlns:svg="" style="height: 110px">
const String htmlEL3 = r'''
<svg:svg width='110' height='110'>
<svg:defs id='defs'>
<svg:text>TEST FAILED</svg:text>
<svg:rect x='5' y='5' width='100' height='100' fill='green' id='r'/>
class MyNodeValidator implements NodeValidator {
bool allowsAttribute(Element element, String attributeName, String value) {
return true;
bool allowsElement(Element element) {
return true;
void main() {
document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
var div = document.getElementById("d");
// div.setInnerHtml(htmlEL3, treeSanitizer:new NullTreeSanitizer());
div.setInnerHtml(htmlEL3, validator:new MyNodeValidator());
var rect = document.getElementById("r");
Expect.equals("", rect.namespaceUri);