Bug 542660. Move universalchardet tests that use XPConnect to mochi-chrome. r=smontagu
authorJonathan Griffin <jgriffin@mozilla.com>
Wed, 03 Feb 2010 13:35:15 -0800
changeset 37881 91ba24bd17ed6198ba9c8655ab6d3dbbb9123c3b
parent 37880 5ea413d845bf711f939ad53941abb11ae36a6b60
child 37882 9ffbf751fdcc3e3a7712f0b359e46618385260dd
push id11475
push userjgriffin@mozilla.com
push dateWed, 03 Feb 2010 21:35:41 +0000
treeherdermozilla-central@91ba24bd17ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs542660
milestone1.9.3a1pre
Bug 542660. Move universalchardet tests that use XPConnect to mochi-chrome. r=smontagu
extensions/universalchardet/tests/CharsetDetectionTests.js
extensions/universalchardet/tests/Makefile.in
extensions/universalchardet/tests/test_bug171813.html
extensions/universalchardet/tests/test_bug306272.html
extensions/universalchardet/tests/test_bug421271.html
extensions/universalchardet/tests/test_bug426271-euc-jp.html
extensions/universalchardet/tests/test_bug426271-utf-8.html
extensions/universalchardet/tests/test_bug431054-japanese.html
extensions/universalchardet/tests/test_bug431054.html
extensions/universalchardet/tests/test_bug488426.html
extensions/universalchardet/tests/test_bug9357.html
--- a/extensions/universalchardet/tests/CharsetDetectionTests.js
+++ b/extensions/universalchardet/tests/CharsetDetectionTests.js
@@ -12,17 +12,16 @@ function CharsetDetectionTests(aTestFile
 
     $("testframe").src = aTestFile;
 
     SimpleTest.waitForExplicitFinish();
 }
 
 function InitDetectorTests()
 {
-    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
     var prefService = Components.classes["@mozilla.org/preferences-service;1"]
 	.getService(Components.interfaces.nsIPrefBranch);
     var str =  Components.classes["@mozilla.org/supports-string;1"]
 	.createInstance(Components.interfaces.nsISupportsString);
 
     try {
 	gOldPref = prefService
 	    .getComplexValue("intl.charset.detector",
@@ -32,17 +31,16 @@ function InitDetectorTests()
     }
     SetDetectorPref(gDetectorList[0]);
     gTestIndex = 0;
     $("testframe").onload = DoDetectionTest;
 }
 
 function SetDetectorPref(aPrefValue)
 {
-    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
     var prefService = Components.classes["@mozilla.org/preferences-service;1"]
 	           .getService(Components.interfaces.nsIPrefBranch);
     var str =  Components.classes["@mozilla.org/supports-string;1"]
               .createInstance(Components.interfaces.nsISupportsString);
     str.data = aPrefValue;
     prefService.setComplexValue("intl.charset.detector",
 				Components.interfaces.nsISupportsString, str);
     gCurrentDetector = aPrefValue;
--- a/extensions/universalchardet/tests/Makefile.in
+++ b/extensions/universalchardet/tests/Makefile.in
@@ -64,9 +64,9 @@ relativesrcdir = extensions/universalcha
 		bug431054_text.html \
 		test_bug431054.html \
 		test_bug431054-japanese.html \
 		bug488426_text.html \
 		test_bug488426.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/extensions/universalchardet/tests/test_bug171813.html
+++ b/extensions/universalchardet/tests/test_bug171813.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=171813
 -->
 <head>
   <title>Test for Bug 171813</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=171813">Mozilla Bug 171813</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug306272.html
+++ b/extensions/universalchardet/tests/test_bug306272.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=306272
 -->
 <head>
   <title>Test for Bug 306272</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=306272">Mozilla Bug 306272</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug421271.html
+++ b/extensions/universalchardet/tests/test_bug421271.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=421271
 -->
 <head>
   <title>Test for Bug 421271</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=421271">Mozilla Bug 421271</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug426271-euc-jp.html
+++ b/extensions/universalchardet/tests/test_bug426271-euc-jp.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=426271
 -->
 <head>
   <title>Test for Bug 426271</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=426271">Mozilla Bug 426271</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug426271-utf-8.html
+++ b/extensions/universalchardet/tests/test_bug426271-utf-8.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=426271
 -->
 <head>
   <title>Test for Bug 426271</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=426271">Mozilla Bug 426271</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug431054-japanese.html
+++ b/extensions/universalchardet/tests/test_bug431054-japanese.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=431054
 -->
 <head>
   <title>Test for Bug 431054</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=426271">Mozilla Bug 431054</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug431054.html
+++ b/extensions/universalchardet/tests/test_bug431054.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=431054
 -->
 <head>
   <title>Test for Bug 431054</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=426271">Mozilla Bug 431054</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug488426.html
+++ b/extensions/universalchardet/tests/test_bug488426.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=488426
 -->
 <head>
   <title>Test for Bug 488426</title>
-  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=426271">Mozilla Bug 488426</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">
--- a/extensions/universalchardet/tests/test_bug9357.html
+++ b/extensions/universalchardet/tests/test_bug9357.html
@@ -1,19 +1,23 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=9357
 -->
 <head>
   <title>Test for Bug 9357</title>
-  <script type="text/javascript" src="/MochiKit/packed.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="text/javascript" 
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js">
+          </script>
   <script type="text/javascript" src="CharsetDetectionTests.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <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=9357">Mozilla Bug 9357</a>
 <p id="display"></p>
 <div id="content" style="display: none">  
 </div>
 <iframe id="testframe"></iframe>
 <pre id="test">