Some of Layout test fixed (use NullTreeSanitizer)
diff --git a/LayoutTests/fast/html/adjacent-html-context-element_t01.dart b/LayoutTests/fast/html/adjacent-html-context-element_t01.dart
index b7620d0..b3f0d1a 100644
--- a/LayoutTests/fast/html/adjacent-html-context-element_t01.dart
+++ b/LayoutTests/fast/html/adjacent-html-context-element_t01.dart
@@ -17,10 +17,10 @@
   var body = document.body;
 
   body.setInnerHtml('''
-<p>This tests inserting a td element "beforeBegin" of another td element using insertAdjacentHTML.
-If the context element was not properly adjusted, then td will be stripped by the parser.</p>
-<table><tr><td></td></tr></table>
-''', treeSanitizer: new NullTreeSanitizer());
+    <p>This tests inserting a td element "beforeBegin" of another td element using insertAdjacentHTML.
+    If the context element was not properly adjusted, then td will be stripped by the parser.</p>
+    <table><tr><td></td></tr></table>
+    ''', treeSanitizer: new NullTreeSanitizer());
 
   var td = document.querySelector('td');
   td.insertAdjacentHtml('beforeBegin', '<td></td>');
diff --git a/LayoutTests/fast/html/draggable_t01.dart b/LayoutTests/fast/html/draggable_t01.dart
index a7422a0..4b7af49 100644
--- a/LayoutTests/fast/html/draggable_t01.dart
+++ b/LayoutTests/fast/html/draggable_t01.dart
@@ -9,7 +9,7 @@
 import "dart:html";
 import "../../../Utils/expect.dart";
 import "../../testcommon.dart";
-import "pwd.dart";
+import "imports/pwd.dart";
 
 main() {
   var body = document.body;
@@ -82,10 +82,10 @@
     for (var i = 16; i < 24; i++) {
       elements[i].draggable = i < 20;
     }
-    
+
     var s = 'dom - attr\n----------\n';
     for (var i = 0; i < elements.length; i++) {
-      s += elements[i].draggable.toString() + ' - ' + 
+      s += elements[i].draggable.toString() + ' - ' +
         elements[i].getAttribute('draggable').toString() + '\n';
     }
 
diff --git a/LayoutTests/fast/html/object-border_t01.dart b/LayoutTests/fast/html/object-border_t01.dart
index 459657e..94eb6cf 100644
--- a/LayoutTests/fast/html/object-border_t01.dart
+++ b/LayoutTests/fast/html/object-border_t01.dart
@@ -9,7 +9,7 @@
 import "dart:html";
 import "../../../Utils/expect.dart";
 import "../../testcommon.dart";
-import "pwd.dart";
+import "imports/pwd.dart";
 
 main() {
   var body = document.body;
@@ -41,7 +41,7 @@
       var y = x.currentStyle[styleProp];
     else if (window.getComputedStyle)
       var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
-    */  
+    */
     var y = x.getComputedStyle().getPropertyValue(styleProp);
     return y;
   }
diff --git a/LayoutTests/fast/innerHTML/innerHTML-svg-write_t01.dart b/LayoutTests/fast/innerHTML/innerHTML-svg-write_t01.dart
index 4c7a3b7..a830463 100644
--- a/LayoutTests/fast/innerHTML/innerHTML-svg-write_t01.dart
+++ b/LayoutTests/fast/innerHTML/innerHTML-svg-write_t01.dart
@@ -20,24 +20,24 @@
   ''', treeSanitizer: new NullTreeSanitizer());
 
   var svg = document.getElementsByTagName('svg')[0];
- 
+
   svg.innerHtml = "<rect/>";
   shouldBeEqualToString(svg.innerHtml, '<rect></rect>');
   shouldBeEqualToString(svg.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
 
-  svg.innerHtml = "<foreignobject><svg/></foreignobject>";
-  shouldBeEqualToString(svg.innerHtml, '<foreignObject><svg></svg></foreignObject>');
+  svg.innerHtml = "<radialgradient><stop/></radialgradient>";
+  shouldBeEqualToString(svg.innerHtml, '<radialGradient><stop></stop></radialGradient>');
   shouldBeEqualToString(svg.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
   shouldBeEqualToString(svg.firstChild.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
 
-  svg.innerHtml = "<foreignobject><p>x</foreignobject>";
-  shouldBeEqualToString(svg.innerHtml, '<foreignObject><p>x</p></foreignObject>');
+  svg.innerHtml = "<textpath><a>x<set></textpath>";
+  shouldBeEqualToString(svg.innerHtml, '<textPath><a>x<set></set></a></textPath>');
   shouldBeEqualToString(svg.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
-  shouldBeEqualToString(svg.firstChild.firstChild.namespaceUri, 'http://www.w3.org/1999/xhtml');
+  shouldBeEqualToString(svg.firstChild.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
 
-  //svg.outerHtml = "<svg><circle/></svg>";
-  //svg = document.getElementsByTagName('svg')[0];
-  //shouldBeEqualToString(svg.innerHtml, '<circle></circle>');
-  //shouldBeEqualToString(svg.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
+  svg.innerHtml = "<missing-glyph><text>x</missing-glyph>";
+  shouldBeEqualToString(svg.innerHtml, '<missing-glyph><text>x</text></missing-glyph>');
+  shouldBeEqualToString(svg.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
+  shouldBeEqualToString(svg.firstChild.firstChild.namespaceUri, 'http://www.w3.org/2000/svg');
 }
 
diff --git a/LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01.dart b/LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01.dart
index 25cb21c..311425b 100644
--- a/LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01.dart
+++ b/LayoutTests/fast/loader/local-css-allowed-in-strict-mode_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/async_utils.dart";
@@ -32,7 +32,7 @@
 }
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     asyncStart();
     window.onLoad.listen(runTest);
diff --git a/LayoutTests/fast/media/color-does-not-include-alpha_t01.dart b/LayoutTests/fast/media/color-does-not-include-alpha_t01.dart
index 0a30733..6e47d95 100644
--- a/LayoutTests/fast/media/color-does-not-include-alpha_t01.dart
+++ b/LayoutTests/fast/media/color-does-not-include-alpha_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <style>
@@ -30,7 +31,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     var backgroundColor = document.getElementById("test").getComputedStyle(null).backgroundColor;
     const expectedBackgroundColor = "rgb(0, 128, 0)";
diff --git a/LayoutTests/fast/media/media-query-serialization_t01.dart b/LayoutTests/fast/media/media-query-serialization_t01.dart
index 11b1933..a4ff8ee 100644
--- a/LayoutTests/fast/media/media-query-serialization_t01.dart
+++ b/LayoutTests/fast/media/media-query-serialization_t01.dart
@@ -4,7 +4,7 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description Test media query serialization.
  * <a href="https://bugs.webkit.org/show_bug.cgi?id=39220">https://bugs.webkit.org/show_bug.cgi?id=39220</a>
  */
@@ -19,7 +19,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     var expected = "not braille, tv and (max-width: 200px) and (min-width: 100px) and (orientation: landscape), (color)";
     List styleSheets=document.styleSheets;
     Expect.equals(expected, styleSheets[styleSheets.length-1].media.mediaText);
diff --git a/LayoutTests/fast/media/mq-append-delete_t01.dart b/LayoutTests/fast/media/mq-append-delete_t01.dart
index 0258f38..1fdc503 100644
--- a/LayoutTests/fast/media/mq-append-delete_t01.dart
+++ b/LayoutTests/fast/media/mq-append-delete_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -19,13 +19,13 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     var rules = document.styleSheets[document.styleSheets.length-1].cssRules;
     var mediaList = rules[0].media;
-    
+
     // - appendMedium()
-    
+
     test(() {
         mediaList.mediaText = "screen";
         mediaList.appendMedium("tv, screen");
@@ -33,21 +33,21 @@
         // CSSOM 4.1: Parsing media query returns none as
         // there are more than one; terminate steps.
     }, "Add 'tv, screen' to 'screen'");
-    
+
     test(() {
         mediaList.mediaText = "screen";
         mediaList.appendMedium("tv");
         assert_equals(mediaList.mediaText, "screen, tv");
         // The valid media query is appended.
     }, "Add 'tv' to 'screen'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("tv");
         assert_equals(mediaList.mediaText, "screen, tv");
         // CSSOM says to ignore if it exists, terminate steps.
     }, "Add 'tv' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("screen");
@@ -58,21 +58,21 @@
         // http://dev.w3.org/csswg/cssom/#dom-medialist-appendmedium
         // http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html
     }, "Add 'screen' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium(" ");
         // Ignored; terminate steps.
         assert_equals(mediaList.mediaText, "screen, tv");
     }, "Add ' ' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("");
         // Ignored; terminate steps.
         assert_equals(mediaList.mediaText, "screen, tv");
     }, "Add '' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium(",");
@@ -80,36 +80,36 @@
         // CSSOM 4.1: Parsing media query returns none as
         // there are more than one; terminate steps.
     }, "Add ',' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("&invalid");
         assert_equals(mediaList.mediaText, "screen, tv, not all");
         // Ignored; terminate steps.
     }, "Add '&invalid' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("not all");
         assert_equals(mediaList.mediaText, "screen, tv, not all");
     }, "Add 'not all' to 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.appendMedium("#?:/");
         assert_equals(mediaList.mediaText, "screen, tv, not all");
         // Ignored; terminate steps.
     }, "Add '#?:/' to 'screen, tv'");
-    
+
     // - deleteMedium()
-    
+
     test(() {
         mediaList.mediaText = "screen, tv, not all";
         mediaList.deleteMedium("&invalid");
         // Ignored; terminate steps.
         assert_equals(mediaList.mediaText, "screen, tv");
     }, "Remove '&invalid' from 'screen, tv, not all'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         Expect.throws(
@@ -118,7 +118,7 @@
         );
         // Not found; throw NotFoundError.
     }, "Remove 'not all' from 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         Expect.throws(
@@ -127,7 +127,7 @@
         );
         // Not found; throw NotFoundError.
     }, "Remove 'cow' from 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv, not all";
         mediaList.deleteMedium("not all");
@@ -135,7 +135,7 @@
         // Remove any media query from the collection of media queries
         // for which comparing the media query returns true.
     }, "Remove 'not all' from 'screen, tv, not all'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv";
         mediaList.deleteMedium("tv");
@@ -143,7 +143,7 @@
         // Remove any media query from the collection of media queries
         // for which comparing the media query returns true.
     }, "Remove 'tv' from 'screen, tv'");
-    
+
     test(() {
         mediaList.mediaText = "not all, not all, tv, not all";
         mediaList.deleteMedium("not all");
@@ -151,7 +151,7 @@
         // Remove any media query from the collection of media queries
         // for which comparing the media query returns true.
     }, "Remove 'not all' from 'not all, not all, tv, not all'");
-    
+
     test(() {
         mediaList.mediaText = "not all, not all, tv, not all";
         mediaList.deleteMedium("tv");
@@ -159,7 +159,7 @@
         // Remove any media query from the collection of media queries
         // for which comparing the media query returns true.
     }, "Remove 'tv' from 'not all, not all, tv, not all'");
-    
+
     test(() {
         mediaList.mediaText = "tv, print, screen";
         mediaList.deleteMedium("tv, print");
@@ -167,13 +167,13 @@
         // CSSOM 4.1: Parsing media query returns none as
         // there are more than one; terminate steps.
     }, "Remove 'tv, print' from 'screen, tv, screen'");
-    
+
     test(() {
         mediaList.mediaText = "screen, tv, not all";
         mediaList.deleteMedium("#?:/");
         // Ignored; terminate steps.
         assert_equals(mediaList.mediaText, "screen, tv");
     }, "Remove '#?:/' from 'screen, tv, not all'");
-    
+
     checkTestFailures();
 }
diff --git a/LayoutTests/fast/media/mq-color-index_t02.dart b/LayoutTests/fast/media/mq-color-index_t02.dart
index d170d27..9a17c22 100644
--- a/LayoutTests/fast/media/mq-color-index_t02.dart
+++ b/LayoutTests/fast/media/mq-color-index_t02.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -25,7 +25,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var rules = document.styleSheets[document.styleSheets.length-1].cssRules;
@@ -41,6 +41,6 @@
     test((){
       assert_equals(rules[2].media.mediaText, "not all");
     }, "(color-index: 2.1) is invalid");
-    
+
     checkTestFailures();
 }
diff --git a/LayoutTests/fast/media/mq-js-media-except_t01.dart b/LayoutTests/fast/media/mq-js-media-except_t01.dart
index d5c341f..039b58b 100644
--- a/LayoutTests/fast/media/mq-js-media-except_t01.dart
+++ b/LayoutTests/fast/media/mq-js-media-except_t01.dart
@@ -4,12 +4,13 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description 'all and (' is not a valid media query and should become 'not all'.
  * Not all is not present in the media rule, hence a DOMException.NOT_FOUND_ERR should be thrown.
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
@@ -25,7 +26,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     Expect.throws(() {
         document.styleSheets[document.styleSheets.length-1].cssRules[0].media.deleteMedium("all and (");
     },
diff --git a/LayoutTests/fast/media/mq-js-media-except_t02.dart b/LayoutTests/fast/media/mq-js-media-except_t02.dart
index 395e52d..cac6b29 100644
--- a/LayoutTests/fast/media/mq-js-media-except_t02.dart
+++ b/LayoutTests/fast/media/mq-js-media-except_t02.dart
@@ -4,12 +4,13 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description CSS3 media query test:
- * @media css rule media.mediaText property parsing, media query syntax error should be handled correctly. 
+ * @media css rule media.mediaText property parsing, media query syntax error should be handled correctly.
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <link rel="help" href="http://www.w3.org/TR/CSS21/media.html" />
@@ -37,7 +38,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     // The following is valid according to the CSS 2.1 note: "Media Queries
diff --git a/LayoutTests/fast/media/mq-js-media-except_t03.dart b/LayoutTests/fast/media/mq-js-media-except_t03.dart
index a9245fe..78af86e 100644
--- a/LayoutTests/fast/media/mq-js-media-except_t03.dart
+++ b/LayoutTests/fast/media/mq-js-media-except_t03.dart
@@ -4,7 +4,7 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description CSS3 media query test: @media css rule media.mediaText property parsing,
  * media query syntax error should be handled correctly (,,,,).
  */
@@ -36,7 +36,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     var styleSheet=document.styleSheets[document.styleSheets.length-1];
     var result=document.getElementById("result");
diff --git a/LayoutTests/fast/media/mq-js-update-media_t01.dart b/LayoutTests/fast/media/mq-js-update-media_t01.dart
index cc7a018..fba003e 100644
--- a/LayoutTests/fast/media/mq-js-update-media_t01.dart
+++ b/LayoutTests/fast/media/mq-js-update-media_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -48,7 +48,7 @@
 }
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     window.onLoad.listen(updateMediaQuery2);
       // update media query while document is parsing
diff --git a/LayoutTests/fast/media/mq-parsing_t01.dart b/LayoutTests/fast/media/mq-parsing_t01.dart
index a50a522..6d3689a 100644
--- a/LayoutTests/fast/media/mq-parsing_t01.dart
+++ b/LayoutTests/fast/media/mq-parsing_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
     <style type="text/css">
@@ -38,7 +39,7 @@
 
     var a =  resultStringifier(expect);
     var b = resultStringifier(res);
-    
+
     if (a == b) {
         span.innerHtml += "PASS: Got $b as expected.<br>";
     } else {
@@ -91,7 +92,7 @@
 }
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     window.onLoad.listen(runTests);
 }
diff --git a/LayoutTests/fast/mediastream/getusermedia_t01.dart b/LayoutTests/fast/mediastream/getusermedia_t01.dart
index c72dc09..5562ea6 100644
--- a/LayoutTests/fast/mediastream/getusermedia_t01.dart
+++ b/LayoutTests/fast/mediastream/getusermedia_t01.dart
@@ -65,7 +65,7 @@
     print("callback: gotStream1");
     Expect.equals(1, stream.getAudioTracks().length);
     Expect.equals(0, stream.getVideoTracks().length);
-    navigator.webkitGetUserMedia(video:true).
+    navigator.webkitGetUserMedia(video:true)
     .then(gotStream2, onError:error);
 }
 
diff --git a/LayoutTests/fast/overflow/height-during-simplified-layout_t01.dart b/LayoutTests/fast/overflow/height-during-simplified-layout_t01.dart
index 5828433..419a340 100644
--- a/LayoutTests/fast/overflow/height-during-simplified-layout_t01.dart
+++ b/LayoutTests/fast/overflow/height-during-simplified-layout_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -21,7 +21,7 @@
 ''';
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     document.body.offsetLeft;
     document.getElementById("node-to-hide").style.display = "none";
     document.getElementById("scrollable").scrollTop = 400;
diff --git a/LayoutTests/fast/ruby/parse-rp_t01.dart b/LayoutTests/fast/ruby/parse-rp_t01.dart
index 36fd175..31ed3e6 100644
--- a/LayoutTests/fast/ruby/parse-rp_t01.dart
+++ b/LayoutTests/fast/ruby/parse-rp_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL2 = r'''
 <p>The following is a test for parsing ruby &lt;rp&gt; and &lt;rt&gt; elements. According to HTML5 spec, end-tags for both are optional if followed by another &lt;rp&gt; or &lt;rt&gt;. However, they should NOT be auto-closed by other inline elements, such as &lt;span&gt;.</p>
@@ -24,6 +25,6 @@
 }
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     window.onLoad.listen(test);
 }
diff --git a/LayoutTests/fast/scrolling/scroll-element-into-view_t01.dart b/LayoutTests/fast/scrolling/scroll-element-into-view_t01.dart
index 58215f1..3bfe0f4 100644
--- a/LayoutTests/fast/scrolling/scroll-element-into-view_t01.dart
+++ b/LayoutTests/fast/scrolling/scroll-element-into-view_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -65,38 +65,38 @@
   focusable.focus();
   focusable.blur();
 
-  shouldBe(container.scrollLeft, expectedFinalScroll[x]);
-  shouldBe(container.scrollTop, expectedFinalScroll[y]);
+  shouldBe(container.scrollLeft, expectedFinalScroll[x], 'scrollLeft: elemRect ${elemRect[x]}px ${elemRect[y]}px ${elemRect[w]}px ${elemRect[h]}px');
+  shouldBe(container.scrollTop, expectedFinalScroll[y], 'scrollTop: elemRect ${elemRect[x]}px ${elemRect[y]}px ${elemRect[w]}px ${elemRect[h]}px');
 }
 
 void main() {
     description('Tests that scrollable areas are scrolled to the correct location '
     + 'when an element is focused.');
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     // Smaller fully offscreen element is centered when focused.
     runTest({x: 20, y: 20, w: 280, h: 280}, {x: 690, y: 690}, {x: 10, y: 10});
     runTest({x: 700, y: 700, w: 280, h: 280}, {x: 10, y: 10}, {x: 690, y: 690});
-    
+
     // Larger fully offscreen element is centered when focused.
     runTest({x: 10, y: 10, w: 320, h: 320}, {x: 690, y: 690}, {x: 20, y: 20});
     runTest({x: 670, y: 670, w: 320, h: 320}, {x: 10, y: 10}, {x: 680, y: 680});
-    
+
     // Smaller fully onscreen element does not scroll when focused.
     runTest({x: 10, y: 10, w: 100, h: 100}, {x: 10, y: 10}, {x: 10, y: 10});
     runTest({x: 210, y: 210, w: 100, h: 100}, {x: 10, y: 10}, {x: 10, y: 10});
-    
+
     // Larger fully overlapping element does not scroll when focused.
     runTest({x: 10, y: 10, w: 310, h: 310}, {x: 20, y: 20}, {x: 20, y: 20});
     runTest({x: 20, y: 20, w: 310, h: 310}, {x: 20, y: 20}, {x: 20, y: 20});
-    
+
     // Smaller overlapping element scrolls to nearest edge when focused.
     runTest({x: 20, y: 20, w: 280, h: 280}, {x: 290, y: 290}, {x: 20, y: 20});
     runTest({x: 700, y: 700, w: 280, h: 280}, {x: 410, y: 410}, {x: 680, y: 680});
-    
+
     // Larger overlapping element scrolls to nearest edge when focused.
     runTest({x: 10, y: 10, w: 320, h: 320}, {x: 320, y: 320}, {x: 30, y: 30});
     runTest({x: 670, y: 670, w: 320, h: 320}, {x: 380, y: 380}, {x: 670, y: 670});
-    
+
     checkTestFailures();
 }
diff --git a/LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01.dart b/LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01.dart
index 725d737..975c965 100644
--- a/LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01.dart
+++ b/LayoutTests/fast/sub-pixel/auto-table-layout-should-avoid-text-wrapping_t01.dart
@@ -4,12 +4,13 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description This tests that we don't incorrectly wrap an auto-layout
  * table due to improper truncation of sub-pixel accumulation. See Bug 93911.
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <style>
@@ -37,7 +38,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     var lineHeight = document.getElementById('testCell').style.lineHeight;
     Element testCell=document.getElementById('testCell');
diff --git a/LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01.dart b/LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01.dart
index 46d09b8..35aa3b6 100644
--- a/LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01.dart
+++ b/LayoutTests/fast/sub-pixel/block-preferred-widths-with-sub-pixel-floats_t01.dart
@@ -4,7 +4,7 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description This tests that we don't cause an assertion failure on relayout
  * of nested positioned elements. This test pass if we don't cause an assertion failure.");
   */
@@ -34,7 +34,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     Expect.equals(document.getElementById("membercenter").offsetTop,
         document.getElementById("support").offsetTop
diff --git a/LayoutTests/fast/sub-pixel/computedstylemargin_t01.dart b/LayoutTests/fast/sub-pixel/computedstylemargin_t01.dart
index f58e902..36ce38b 100644
--- a/LayoutTests/fast/sub-pixel/computedstylemargin_t01.dart
+++ b/LayoutTests/fast/sub-pixel/computedstylemargin_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -19,7 +19,7 @@
 
 void main() {
     document.body.attributes['style']="margin: 0; padding: 0;";
-    document.body.appendHtml(htmlEL2);
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
 
     // Fixed width margins.
     var style = document.getElementById('test').getComputedStyle();
@@ -27,7 +27,7 @@
     shouldBe(style.marginRight, '1.5px');
     shouldBe(style.marginBottom, '2.5px');
     shouldBe(style.marginLeft, '3.5px');
-    
+
     // Auto left/right margin.
     style = document.getElementById('test2').getComputedStyle();
     shouldBe(style.marginLeft, '0.5px');
diff --git a/LayoutTests/fast/sub-pixel/float-list-inside_t01.dart b/LayoutTests/fast/sub-pixel/float-list-inside_t01.dart
index 5d33635..11576fe 100644
--- a/LayoutTests/fast/sub-pixel/float-list-inside_t01.dart
+++ b/LayoutTests/fast/sub-pixel/float-list-inside_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/async_utils.dart";
@@ -49,7 +49,7 @@
 lastElementChild(parent)  => parent.childNodes.lastWhere((x) => x is Element);
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var list = document.getElementsByTagName('ul')[0];
@@ -57,16 +57,16 @@
     var lastLinkTop = lastElementChild(list).getBoundingClientRect().top;
 
     shouldBe(firstLinkTop, lastLinkTop, 'Links should be on the same line.');
-        
+
     asyncStart();
     window.onLoad.listen((e) {
         list.style.marginRight = '-10px';
         list.offsetTop;
         list.style.marginRight = 'auto';
-        
+
         shouldBe(firstElementChild(list).getBoundingClientRect().top, firstLinkTop, "First link moved after layout.");
         shouldBe(lastElementChild(list).getBoundingClientRect().top, lastLinkTop, "Last link moved after layout.");
-            
+
         checkTestFailures();
         asyncEnd();
     });
diff --git a/LayoutTests/fast/sub-pixel/float-percentage-widths_t01.dart b/LayoutTests/fast/sub-pixel/float-percentage-widths_t01.dart
index 85bb3da..9b82593 100644
--- a/LayoutTests/fast/sub-pixel/float-percentage-widths_t01.dart
+++ b/LayoutTests/fast/sub-pixel/float-percentage-widths_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -28,7 +28,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var children = document.getElementsByClassName('child');
diff --git a/LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01.dart b/LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01.dart
index d603c32..6d8b307 100644
--- a/LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01.dart
+++ b/LayoutTests/fast/sub-pixel/float-with-margin-in-container_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -23,7 +23,7 @@
 ''';
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
 
     var elementA = document.getElementById('col-a');
     var elementB = document.getElementById('col-b');
diff --git a/LayoutTests/fast/sub-pixel/shadows-computed-style_t01.dart b/LayoutTests/fast/sub-pixel/shadows-computed-style_t01.dart
index 3dacad5..08b7cf4 100644
--- a/LayoutTests/fast/sub-pixel/shadows-computed-style_t01.dart
+++ b/LayoutTests/fast/sub-pixel/shadows-computed-style_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description Tests the computed style for subpixel shadows 
+ * @assertion
+ * @description Tests the computed style for subpixel shadows
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -24,7 +24,7 @@
 
 void main() {
     description("Tests the computed style for subpixel shadows");
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var text = document.getElementById("text");
diff --git a/LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01.dart b/LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01.dart
index ba06a3a..3303002 100644
--- a/LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01.dart
+++ b/LayoutTests/fast/sub-pixel/tiled-canvas-elements_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -30,9 +30,9 @@
 }
 
 void main() {
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
-        
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
+
     var expected = 0;
     var elements = document.getElementsByTagName('canvas');
     print("elements=$elements");
diff --git a/LayoutTests/fast/svg/tabindex-focus_t01.dart b/LayoutTests/fast/svg/tabindex-focus_t01.dart
index b7cd8b7..de4805a 100644
--- a/LayoutTests/fast/svg/tabindex-focus_t01.dart
+++ b/LayoutTests/fast/svg/tabindex-focus_t01.dart
@@ -4,18 +4,18 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description Tabindex on svg elements tests
  */
 import "dart:html";
 import "../../testharness.dart";
 
 const String htmlEL2 = r'''
-<div id="testcontainer"><svg id="testroot" width="1" height="1"/></div>
+<div id="testcontainer"><svg id="testroot" width="1" height="1"></svg></div>
 <div id=log></div>
 ''';
 
-var svg = document.getElementById("testroot");
+var svg = null;
 
 bool isFocusable(elm) {
 	switch (elm.nodeName) {
@@ -139,7 +139,7 @@
 		"view",
 		"vkern"];
   for (var i = 0; i < svgelements.length; i++) {
-	svg.append(document.createElementNS("http://www.w3.org/2000/svg", svgelements[i]));
+	  svg.append(document.createElementNS("http://www.w3.org/2000/svg", svgelements[i]));
   }
 }
 
@@ -148,20 +148,21 @@
 
   // cleanup any old content
   while(svg.firstChild!=null) {
-	svg.firstChild.remove();
+	  svg.firstChild.remove();
   }
-  
+
   var textContentChildElements = ["textPath", "tref", "tspan"];
   for (var i = 0; i < textContentChildElements.length; i++) {
-	var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
-	text.append(document.createElementNS("http://www.w3.org/2000/svg", textContentChildElements[i]));
-	svg.append(text);
+	  var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
+	  text.append(document.createElementNS("http://www.w3.org/2000/svg", textContentChildElements[i]));
+	  svg.append(text);
   }
 }
 
 void main() {
-    document.body.appendHtml(htmlEL2);
-    
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
+    svg = document.getElementById("testroot");
+
     createSvg();
     var children=svg.children;
     while(children.length!=0) {
@@ -186,7 +187,7 @@
                 document.body.focus();
             }
         }, "${element.nodeName}.focus() with tabindex set.");
-    
+
         element.remove();
     }
 
diff --git a/LayoutTests/fast/svg/whitespace-angle_t01.dart b/LayoutTests/fast/svg/whitespace-angle_t01.dart
index 89b68f4..1c6c953 100644
--- a/LayoutTests/fast/svg/whitespace-angle_t01.dart
+++ b/LayoutTests/fast/svg/whitespace-angle_t01.dart
@@ -4,7 +4,7 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description Whitespace in <angle> attribute values
  */
 import "dart:html";
@@ -22,15 +22,12 @@
 ''';
 
 void main() {
-    document.body.appendHtml(htmlEL2);
-        var svg = document.querySelector("svg");
-    
-    // test length values
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
+
     var EPSILON = Math.pow(2, -24); // float epsilon
     var whitespace = [ "", " ", "   ", "\r\n\t ", "\f" ];
     var garbage = [ "a", "e", "foo", ")90" ];
-    var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ];
-    
+
     testType("<angle>",
              document.querySelector("marker"),
              "orient",
@@ -48,6 +45,6 @@
                  assert_approx_equals(elm.orientAngle.baseVal.value,
                  expected, EPSILON); }
               );
-    
+
     checkTestFailures();
 }
diff --git a/LayoutTests/fast/svg/whitespace-integer_t01.dart b/LayoutTests/fast/svg/whitespace-integer_t01.dart
index 17247bf..f1fdafe 100644
--- a/LayoutTests/fast/svg/whitespace-integer_t01.dart
+++ b/LayoutTests/fast/svg/whitespace-integer_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description Whitespace in attribute values tests 
+ * @assertion
+ * @description Whitespace in attribute values tests
  */
 import "dart:html";
 import "dart:math" as Math;
@@ -25,14 +25,12 @@
 <div id=log></div>
 ''';
 
-// test length values
 var EPSILON = Math.pow(2, -24); // float epsilon
 var whitespace = [ "", " ", "   ", "\r\n\t ", "\f" ];
 var garbage = [ "a", "e", "foo", ")90" ];
-var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ];
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
 
     testType("<integer>",
          document.getElementsByTagName("feTurbulence")[0], // workaround for broken querySelector on camelcased elements
diff --git a/LayoutTests/fast/svg/whitespace-length-invalid_t01.dart b/LayoutTests/fast/svg/whitespace-length-invalid_t01.dart
index 053ca57..320ddd1 100644
--- a/LayoutTests/fast/svg/whitespace-length-invalid_t01.dart
+++ b/LayoutTests/fast/svg/whitespace-length-invalid_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description Whitespace in attribute values tests 
+ * @assertion
+ * @description Whitespace in attribute values tests
  */
 import "dart:html";
 import "dart:math" as Math;
@@ -35,7 +35,7 @@
 // This test was split out from whitespace-length.html because the trybots were too slow.
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
 
     testType("<length>",
 		 svg,
diff --git a/LayoutTests/fast/svg/whitespace-length_t01.dart b/LayoutTests/fast/svg/whitespace-length_t01.dart
index deac067..1b2c084 100644
--- a/LayoutTests/fast/svg/whitespace-length_t01.dart
+++ b/LayoutTests/fast/svg/whitespace-length_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description Whitespace in attribute values tests 
+ * @assertion
+ * @description Whitespace in attribute values tests
  */
 import "dart:html";
 import "dart:math" as Math;
@@ -34,7 +34,7 @@
 var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ];
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     testType("<length>",
 		 svg,
 		 "x",
diff --git a/LayoutTests/fast/svg/whitespace-number_t01.dart b/LayoutTests/fast/svg/whitespace-number_t01.dart
index f42308a..897cbe4 100644
--- a/LayoutTests/fast/svg/whitespace-number_t01.dart
+++ b/LayoutTests/fast/svg/whitespace-number_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description Whitespace in attribute values tests 
+ * @assertion
+ * @description Whitespace in attribute values tests
  */
 import "dart:html";
 import "dart:math" as Math;
@@ -25,16 +25,13 @@
 <div id=log></div>
 ''';
 
-var svg = document.querySelector("svg");
-
 // test length values
 var EPSILON = Math.pow(2, -24); // float epsilon
 var whitespace = [ "", " ", "   ", "\r\n\t ", "\f" ];
 var garbage = [ "a", "e", "foo", ")90" ];
-var validunits = [ "", "em", "ex", "px", "in", "cm", "mm", "pt", "pc", "%" ];
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     testType("<number>",
 		 document.querySelector("stop"),
 		 "offset",
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01.dart b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01.dart
index 48b451f..a09bfe4 100644
--- a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01.dart
+++ b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL2 = r'''
     <div style="width: 2000px; position: absolute; left: -9000px;">
@@ -25,7 +26,7 @@
 ''';
 
 void main() {
-    document.body.appendHtml(htmlEL2);
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     var table = document.getElementById("table");
     Expect.equals("1994px", table.getComputedStyle(null).getPropertyValue("width")
         , "The width of the fixed table should be 1994px, which is based on the width of its containing div."
diff --git a/LayoutTests/fast/table/html-table-width-max-width-constrained_t01.dart b/LayoutTests/fast/table/html-table-width-max-width-constrained_t01.dart
index b5af2ba..893432a 100644
--- a/LayoutTests/fast/table/html-table-width-max-width-constrained_t01.dart
+++ b/LayoutTests/fast/table/html-table-width-max-width-constrained_t01.dart
@@ -4,12 +4,13 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
+ * @assertion
  * @description Tests that percent lengths of an absolutely positioned table is resolved
  * against the padding box of the parent.
  */
 import "dart:html";
 import "../../resources/check-layout.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <style>
@@ -51,7 +52,7 @@
 }
 
 void main() {
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     window.onLoad.listen(runTest);
 }
diff --git a/LayoutTests/fast/table/margins-flipped-text-direction_t01.dart b/LayoutTests/fast/table/margins-flipped-text-direction_t01.dart
index 5a57bda..2013353 100644
--- a/LayoutTests/fast/table/margins-flipped-text-direction_t01.dart
+++ b/LayoutTests/fast/table/margins-flipped-text-direction_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -48,7 +48,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     window.onLoad.listen((e){checkLayout('div');});
 }
diff --git a/LayoutTests/fast/table/min-max-width-preferred-size_t01.dart b/LayoutTests/fast/table/min-max-width-preferred-size_t01.dart
index f860237..c45842d 100644
--- a/LayoutTests/fast/table/min-max-width-preferred-size_t01.dart
+++ b/LayoutTests/fast/table/min-max-width-preferred-size_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -48,7 +48,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     window.onLoad.listen((e){checkLayout('.container');});
 }
diff --git a/LayoutTests/fast/table/resize-table-binding-cell_t01.dart b/LayoutTests/fast/table/resize-table-binding-cell_t01.dart
index d47daa0..39d26a6 100644
--- a/LayoutTests/fast/table/resize-table-binding-cell_t01.dart
+++ b/LayoutTests/fast/table/resize-table-binding-cell_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -57,8 +57,8 @@
 
 void main() {
     description("Regression(99212): table rows get incorrect height after changing some cells' height<br>https://bugs.webkit.org/show_bug.cgi?id=74303");
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     Element firstRow = document.getElementById("firstRow");
     // Original value.
     shouldBe(firstRow.getComputedStyle('').getPropertyValue('height'), '44px');
@@ -67,6 +67,6 @@
     shouldBe(firstRow.getComputedStyle('').getPropertyValue('height'), '84px');
     toggleBigRows();
     shouldBe(firstRow.getComputedStyle('').getPropertyValue('height'), '44px');
-    
+
     checkTestFailures();
 }
\ No newline at end of file
diff --git a/LayoutTests/fast/table/resize-table-cell_t01.dart b/LayoutTests/fast/table/resize-table-cell_t01.dart
index 27c0f34..89b3d98 100644
--- a/LayoutTests/fast/table/resize-table-cell_t01.dart
+++ b/LayoutTests/fast/table/resize-table-cell_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../testharness.dart";
@@ -57,8 +57,8 @@
 
 void main() {
     description("Regression(99212): table rows get incorrect height after changing some cells' height<br>https://bugs.webkit.org/show_bug.cgi?id=74303");
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
 
     Element firstRow = document.getElementById("firstRow");
     // Original value.
diff --git a/LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01.dart b/LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01.dart
index c39a925..9e10653 100644
--- a/LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01.dart
+++ b/LayoutTests/fast/table/switch-table-layout-dynamic-cells_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -39,23 +39,23 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     document.body.offsetTop;
-    
+
     var table = document.getElementById("table");
     var row = table.insertRow(table.rows.length);
     row.insertCell(row.cells.length).setAttribute("data-expected-width", "100");
     row.insertCell(row.cells.length).setAttribute("data-expected-width", "100");
-    
+
     document.body.offsetTop;
-    
+
     var container = document.getElementById("container");
     container.style.setProperty("width", "500px");
-    
+
     table.style.setProperty("table-layout", "auto");
     table.style.setProperty("width", "auto");
-    
+
     checkLayout("#table tr td", document.getElementById("test-output"));
 }
\ No newline at end of file
diff --git a/LayoutTests/fast/table/switch-table-layout_t01.dart b/LayoutTests/fast/table/switch-table-layout_t01.dart
index b6a19d1..5d181c2 100644
--- a/LayoutTests/fast/table/switch-table-layout_t01.dart
+++ b/LayoutTests/fast/table/switch-table-layout_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../resources/check-layout.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <style>
@@ -37,16 +38,16 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
-    document.body.appendHtml(htmlEL2);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     document.body.offsetTop;
-    
+
     var container = document.getElementById('container');
     container.style.setProperty('width', '500px');
-    
+
     var table = document.getElementById('table');
     table.style.setProperty('table-layout', 'auto');
     table.style.setProperty('width', 'auto');
-    
+
     checkLayout("#table tr td", document.getElementById("test-output"));
 }
diff --git a/LayoutTests/fast/table/table-size-integer-overflow_t01.dart b/LayoutTests/fast/table/table-size-integer-overflow_t01.dart
index a66f732..4ba94ae 100644
--- a/LayoutTests/fast/table/table-size-integer-overflow_t01.dart
+++ b/LayoutTests/fast/table/table-size-integer-overflow_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -34,14 +34,11 @@
   String paddingLeftS=computedStyle.getPropertyValue('padding-right');
   int paddingLeft=int.parse(paddingLeftS.substring(0, paddingLeftS.length-2)); // cut "suffix "px"
   var wdiff = cell.offsetWidth - text.offsetWidth - (paddingRight + paddingLeft);
-//  print("${cell.offsetWidth} - ${text.offsetWidth} - ($paddingRight + $paddingLeft)");
   Expect.isTrue(wdiff>0);
   text.text = "PASS";
 }
 
 void main() {
-//    document.body.setInnerHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
-//    document.body.setInnerHtml(htmlEL2);
-    document.body.appendHtml(htmlEL2);
+    document.body.appendHtml(htmlEL2, treeSanitizer: new NullTreeSanitizer());
     window.onLoad.listen(doTest);
 }
diff --git a/LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01.dart b/LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01.dart
index f6b4be1..9613aa1 100644
--- a/LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01.dart
+++ b/LayoutTests/fast/text-autosizing/display-type-change-lineHeight_t01.dart
@@ -4,11 +4,12 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
+import "../../testharness.dart";
 
 const String htmlEL1 = r'''
 <meta name="viewport" content="width=800">
@@ -45,7 +46,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
     var forceLayout1 = document.body.offsetTop;
     var inlineToBlock = document.getElementById('inlineToBlock');
diff --git a/LayoutTests/fast/text-autosizing/inline-width_t01.dart b/LayoutTests/fast/text-autosizing/inline-width_t01.dart
index da1681f..58f187e 100644
--- a/LayoutTests/fast/text-autosizing/inline-width_t01.dart
+++ b/LayoutTests/fast/text-autosizing/inline-width_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -63,7 +63,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var inlines = document.getElementsByClassName('inline');
diff --git a/LayoutTests/fast/text-autosizing/table-inline-width_t01.dart b/LayoutTests/fast/text-autosizing/table-inline-width_t01.dart
index ba82ebf..536871d 100644
--- a/LayoutTests/fast/text-autosizing/table-inline-width_t01.dart
+++ b/LayoutTests/fast/text-autosizing/table-inline-width_t01.dart
@@ -4,8 +4,8 @@
  * BSD-style license that can be found in the LICENSE file.
  */
 /**
- * @assertion 
- * @description 
+ * @assertion
+ * @description
  */
 import "dart:html";
 import "../../../Utils/expect.dart";
@@ -69,7 +69,7 @@
 ''';
 
 void main() {
-    document.head.appendHtml(htmlEL1);
+    document.head.appendHtml(htmlEL1, treeSanitizer: new NullTreeSanitizer());
     document.body.appendHtml(htmlEL2);
 
     var inlines = document.getElementsByClassName('inline');