Index: chrome/test/data/webui/polymer_browser_test_base.js |
diff --git a/chrome/test/data/webui/polymer_browser_test_base.js b/chrome/test/data/webui/polymer_browser_test_base.js |
index b63110cd36f562c154c2028349724d90f5e5038f..4165afc4b42fb28c96a80d1cfcc5d7da415ab637 100644 |
--- a/chrome/test/data/webui/polymer_browser_test_base.js |
+++ b/chrome/test/data/webui/polymer_browser_test_base.js |
@@ -188,10 +188,15 @@ PolymerTest.loadScript = function(src) { |
}; |
/** |
- * Removes all content from the body. |
+ * Removes all content from the body. In a vulcanized build, this retains the |
+ * inlined tags so stylesheets and dom-modules are not discarded. |
*/ |
PolymerTest.clearBody = function() { |
+ // Save the div where vulcanize inlines content before clearing the page. |
+ var vulcanizeDiv = document.querySelector('body > div[hidden][by-vulcanize]'); |
document.body.innerHTML = ''; |
+ if (vulcanizeDiv) |
+ document.body.appendChild(vulcanizeDiv); |
}; |
/** |