Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/harness.js

Issue 5745141503492096: Issue 1561 - Move unit tests out of the browser`s content area (Closed)
Patch Set: Created Nov. 14, 2014, 11:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/content/harness.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/chrome/content/harness.js
@@ -0,0 +1,13 @@
+// Some people actually switch off browser.frames.enabled and are surprised
+// that things stop working...
+window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+ .getInterface(Components.interfaces.nsIWebNavigation)
+ .QueryInterface(Components.interfaces.nsIDocShell)
+ .allowSubframes = true;
+
+window.addEventListener("load", startTests, false);
+
+function startTests()
+{
+ document.getElementById("tests").setAttribute("src", "index.html" + location.search);
+}
« no previous file with comments | « chrome.manifest ('k') | chrome/content/harness.xul » ('j') | chrome/content/settings.xul » ('J')

Powered by Google App Engine
This is Rietveld