Bug 653145 - move layout/xul/base/test/* mochitests to mochitest-chrome to avoid enablePrivileges. r=bzbarsky, a=test-only
authorJoel Maher <jmaher@mozilla.com>
Thu, 09 Jun 2011 11:10:11 -0400
changeset 70792 85394deb049d95bdd47048c1fad49a0ac8874490
parent 70791 63a285db615c52b0d17b46c07bc71f69814c7c4f
child 70793 38f213874df7c2173cb50f542774210f7c81a048
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbzbarsky, test-only
bugs653145
milestone7.0a1
Bug 653145 - move layout/xul/base/test/* mochitests to mochitest-chrome to avoid enablePrivileges. r=bzbarsky, a=test-only
layout/xul/base/test/Makefile.in
layout/xul/base/test/test_bug381167.xhtml
layout/xul/base/test/test_bug393970.xul
layout/xul/base/test/test_bug477754.xul
layout/xul/base/test/test_stack.xul
--- a/layout/xul/base/test/Makefile.in
+++ b/layout/xul/base/test/Makefile.in
@@ -39,25 +39,30 @@ DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = layout/xul/base/test
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
-_TEST_FILES = 	test_bug381167.xhtml \
+_TEST_FILES = 	test_bug511075.html \
+		test_splitter.xul \
+		$(NULL)
+
+_CHROME_FILES =	test_bug381167.xhtml \
 		test_bug393970.xul \
 		test_bug477754.xul \
 		test_stack.xul \
-		test_bug511075.html \
-		test_splitter.xul \
 		$(NULL)
 
 ifneq (mobile,$(MOZ_BUILD_APP))
 _TEST_FILES +=	test_resizer.xul \
 		window_resizer.xul \
 		window_resizer_element.xul \
 		$(NULL)
 endif
 
+libs:: $(_CHROME_FILES)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
+
 libs:: $(_TEST_FILES)
 	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/layout/xul/base/test/test_bug381167.xhtml
+++ b/layout/xul/base/test/test_bug381167.xhtml
@@ -1,17 +1,17 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=381167
 -->
 <head>
   <title>Test for Bug 381167</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=381167">Mozilla Bug 381167</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <xul:tree>
@@ -23,17 +23,16 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 381167 **/
 
 SimpleTest.waitForExplicitFinish();
 
 function closeit() {
-  netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   var evt = document.createEvent('KeyEvents');
                                  evt.initKeyEvent('keypress', true, true,
                                  window,
                                  true, false, false, false,
                                  'W'.charCodeAt(0), 0);
   window.dispatchEvent(evt);
 
   setTimeout(finish, 200);
--- a/layout/xul/base/test/test_bug393970.xul
+++ b/layout/xul/base/test/test_bug393970.xul
@@ -1,19 +1,19 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 <?xml-stylesheet href="data:text/css,description {min-width: 1px; padding: 2px;}" type="text/css"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=393970
 -->
 <window title="Mozilla Bug 393970"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js" />
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=393970"
      target="_blank">Mozilla Bug 393970</a>
   </body>
 
   <hbox flex="1" pack="start" style="visibility: hidden;">
--- a/layout/xul/base/test/test_bug477754.xul
+++ b/layout/xul/base/test/test_bug477754.xul
@@ -1,18 +1,18 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=477754
 -->
 <window title="Mozilla Bug 477754"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js" />
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=477754"
      target="_blank">Mozilla Bug 477754</a>
   </body>
 
   <hbox pack="center">
--- a/layout/xul/base/test/test_stack.xul
+++ b/layout/xul/base/test/test_stack.xul
@@ -1,16 +1,16 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
+<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 
 <window align="start" title="XUL stack tests" onload="runTest()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js" />
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <!-- a * before an expected value means an offset from the right or bottom edge -->
   <stack id="stack">
     <hbox id="left-top" left="10" top="12" width="20" height="24"
                         expectedleft="10" expectedtop="12" expectedright="30" expectedbottom="36"
                         stackwidth="30" stackheight="36"/>
     <hbox id="start-top" start="10" top="12" width="20" height="24"
                          expectedleft="10" expectedtop="12" expectedright="30" expectedbottom="36"