Bug 1081537 - Tests. r=bz
authorBobby Holley <bobbyholley@gmail.com>
Fri, 17 Oct 2014 17:19:19 +0200
changeset 211052 76686694c568a13a9e1a7b1efed2c5632bd81c06
parent 211051 0016f0b28acb3173184b5ada38990ce98b44a8cc
child 211053 5bbe8b64b4b7acca37f269d19c5d1d238fa87586
push id27667
push usercbook@mozilla.com
push dateMon, 20 Oct 2014 12:40:56 +0000
treeherdermozilla-central@cc2d8bdbccb8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1081537
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1081537 - Tests. r=bz
content/html/document/test/browser.ini
content/html/document/test/browser_bug1081537.js
--- a/content/html/document/test/browser.ini
+++ b/content/html/document/test/browser.ini
@@ -1,4 +1,5 @@
 [DEFAULT]
 support-files = bug592641_img.jpg
 
 [browser_bug592641.js]
+[browser_bug1081537.js]
new file mode 100644
--- /dev/null
+++ b/content/html/document/test/browser_bug1081537.js
@@ -0,0 +1,11 @@
+// This test is useful because mochitest-browser runs as an addon, so we test
+// addon-scope paths here.
+let ifr;
+function test() {
+  ifr = document.createElement('iframe');
+  document.getElementById('main-window').appendChild(ifr);
+  is(ifr.contentDocument.nodePrincipal.origin, "[System Principal]");
+  ifr.contentDocument.open();
+  ok(true, "Didn't throw");
+}
+registerCleanupFunction(() => ifr.remove());