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: Rebased patch Created Jan. 10, 2015, 12:44 a.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
« no previous file with comments | « chrome.manifest ('k') | chrome/content/harness.xul » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld