Bug 671148 - De-bogosify test_EvalInSandbox.xul's handling of iframes. r=peterv
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 30 Aug 2011 15:26:57 -0700
changeset 76240 df5afd3a325dd7908aa53473b0eae05517345708
parent 76239 854fad6cbc3134cd8b7e36b948ef6a96e15ba70a
child 76241 66d6a27e3581df835d8121e553b255b00ea8209b
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerspeterv
bugs671148
milestone9.0a1
Bug 671148 - De-bogosify test_EvalInSandbox.xul's handling of iframes. r=peterv
js/src/xpconnect/tests/chrome/Makefile.in
js/src/xpconnect/tests/chrome/file_evalInSandbox.html
js/src/xpconnect/tests/chrome/test_evalInSandbox.xul
--- a/js/src/xpconnect/tests/chrome/Makefile.in
+++ b/js/src/xpconnect/tests/chrome/Makefile.in
@@ -46,16 +46,17 @@ include $(topsrcdir)/config/rules.mk
 _CHROME_FILES = \
 		test_bug448587.xul \
 		test_bug500931.xul \
 		bug503926.xul \
 		test_bug503926.xul \
 		test_bug533596.xul \
 		test_doublewrappedcompartments.xul \
 		test_evalInSandbox.xul \
+		file_evalInSandbox.html \
 		test_sandboxImport.xul \
 		test_wrappers.xul \
 		test_bug484459.xul \
 		test_cows.xul \
 		test_bug517163.xul \
 		test_bug571849.xul \
 		test_bug601803.xul \
 		test_bug610390.xul \
@@ -63,17 +64,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug616992.xul \
 		test_bug618176.xul \
 		file_bug618176.xul \
 		test_bug596580.xul \
 		test_bug654370.xul \
 		test_bug658560.xul \
 		test_APIExposer.xul \
 		test_bug664689.xul \
-                test_precisegc.xul \
+		test_precisegc.xul \
 		$(NULL)
 
 # Disabled until this test gets updated to test the new proxy based
 # wrappers.
 #		test_wrappers-2.xul \
 
 libs:: $(_CHROME_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/js/src/xpconnect/tests/chrome/file_evalInSandbox.html
@@ -0,0 +1,1 @@
+<html><body><script>document.foo = 'bar';</script></body></html>
--- a/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul
+++ b/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul
@@ -8,22 +8,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <window title="Mozilla Bug 533596"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
 
-  <iframe type="content"
-          src="http://example.org/tests/js/src/xpconnect/tests/mochitest/file_evalInSandbox.html"
+  <iframe src="http://example.org/tests/js/src/xpconnect/tests/mochitest/file_evalInSandbox.html"
           onload="checkCrossOrigin(this)">
   </iframe>
-  <iframe type="content"
-          src="data:text/html,&lt;html&gt;&lt;body&gt;&lt;script&gt;document.foo %3D 'bar'%3B&lt;%2Fscript&gt;&lt;%2Fbody&gt;&lt;%2Fhtml&gt;"
+  <iframe src="chrome://mochitests/content/chrome/js/src/xpconnect/tests/chrome/file_evalInSandbox.html"
           onload="checkSameOrigin(this)">
   </iframe>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
       const Cu = Components.utils;
       const Ci = Components.interfaces;