Bug 508710 - moving toolkit/content/tests/widgets/*.xul from mochitest to mochitest-chrome. r=enn, a=test-only
authorJoel Maher <jmaher@mozilla.com>
Fri, 24 Jun 2011 12:39:13 -0400
changeset 71674 c65f1fb0449d470709639c9bba937021f2756b55
parent 71673 97e9557660e900ff54b553c3c6d77a8cd5582430
child 71675 4ede291d2e4c9dff7e75c2062db29e62f8e81984
push id226
push userjmaher@mozilla.com
push dateFri, 24 Jun 2011 16:40:06 +0000
treeherdermozilla-inbound@c65f1fb0449d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenn, test-only
bugs508710
milestone7.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 508710 - moving toolkit/content/tests/widgets/*.xul from mochitest to mochitest-chrome. r=enn, a=test-only
testing/mochitest/harness-overlay.xul
toolkit/content/tests/chrome/Makefile.in
toolkit/content/tests/chrome/frame_popupremoving_frame.xul
toolkit/content/tests/chrome/popup_childframe_node.xul
toolkit/content/tests/chrome/popup_trigger.js
toolkit/content/tests/chrome/test_bug360220.xul
toolkit/content/tests/chrome/test_bug365773.xul
toolkit/content/tests/chrome/test_bug382990.xul
toolkit/content/tests/chrome/test_bug457632.xul
toolkit/content/tests/chrome/test_bug460942.xul
toolkit/content/tests/chrome/test_bug509732.xul
toolkit/content/tests/chrome/test_bug554279.xul
toolkit/content/tests/chrome/test_bug557987.xul
toolkit/content/tests/chrome/test_bug562554.xul
toolkit/content/tests/chrome/test_button.xul
toolkit/content/tests/chrome/test_closemenu_attribute.xul
toolkit/content/tests/chrome/test_colorpicker_popup.xul
toolkit/content/tests/chrome/test_contextmenu_list.xul
toolkit/content/tests/chrome/test_focus_anons.xul
toolkit/content/tests/chrome/test_hiddenitems.xul
toolkit/content/tests/chrome/test_hiddenpaging.xul
toolkit/content/tests/chrome/test_menu.xul
toolkit/content/tests/chrome/test_menu_hide.xul
toolkit/content/tests/chrome/test_menuitem_blink.xul
toolkit/content/tests/chrome/test_menulist.xul
toolkit/content/tests/chrome/test_menulist_keynav.xul
toolkit/content/tests/chrome/test_notificationbox.xul
toolkit/content/tests/chrome/test_panelfrommenu.xul
toolkit/content/tests/chrome/test_popup_attribute.xul
toolkit/content/tests/chrome/test_popup_button.xul
toolkit/content/tests/chrome/test_popup_coords.xul
toolkit/content/tests/chrome/test_popup_keys.xul
toolkit/content/tests/chrome/test_popup_preventdefault.xul
toolkit/content/tests/chrome/test_popup_recreate.xul
toolkit/content/tests/chrome/test_popup_scaled.xul
toolkit/content/tests/chrome/test_popup_tree.xul
toolkit/content/tests/chrome/test_popuphidden.xul
toolkit/content/tests/chrome/test_popupincontent.xul
toolkit/content/tests/chrome/test_popupremoving.xul
toolkit/content/tests/chrome/test_popupremoving_frame.xul
toolkit/content/tests/chrome/test_position.xul
toolkit/content/tests/chrome/test_progressmeter.xul
toolkit/content/tests/chrome/test_props.xul
toolkit/content/tests/chrome/test_radio.xul
toolkit/content/tests/chrome/test_richlist_direction.xul
toolkit/content/tests/chrome/test_scale.xul
toolkit/content/tests/chrome/test_scrollbar.xul
toolkit/content/tests/chrome/test_sorttemplate.xul
toolkit/content/tests/chrome/test_statusbar.xul
toolkit/content/tests/chrome/test_tabbox.xul
toolkit/content/tests/chrome/test_tabindex.xul
toolkit/content/tests/chrome/test_textbox_emptytext.xul
toolkit/content/tests/chrome/test_textbox_number.xul
toolkit/content/tests/chrome/test_textbox_search.xul
toolkit/content/tests/chrome/test_timepicker.xul
toolkit/content/tests/chrome/test_toolbar.xul
toolkit/content/tests/chrome/test_tooltip.xul
toolkit/content/tests/chrome/test_tooltip_noautohide.xul
toolkit/content/tests/chrome/test_tree.xul
toolkit/content/tests/chrome/test_tree_single.xul
toolkit/content/tests/chrome/test_tree_view.xul
toolkit/content/tests/chrome/window_popup_attribute.xul
toolkit/content/tests/chrome/window_popup_button.xul
toolkit/content/tests/chrome/xul_selectcontrol.js
toolkit/content/tests/widgets/Makefile.in
toolkit/content/tests/widgets/frame_popupremoving_frame.xul
toolkit/content/tests/widgets/popup_childframe_node.xul
toolkit/content/tests/widgets/popup_trigger.js
toolkit/content/tests/widgets/test_bug359754.xul
toolkit/content/tests/widgets/test_bug360220.xul
toolkit/content/tests/widgets/test_bug365773.xul
toolkit/content/tests/widgets/test_bug382990.xul
toolkit/content/tests/widgets/test_bug457632.xul
toolkit/content/tests/widgets/test_bug460942.xul
toolkit/content/tests/widgets/test_bug509732.xul
toolkit/content/tests/widgets/test_bug554279.xul
toolkit/content/tests/widgets/test_bug557987.xul
toolkit/content/tests/widgets/test_bug562554.xul
toolkit/content/tests/widgets/test_button.xul
toolkit/content/tests/widgets/test_closemenu_attribute.xul
toolkit/content/tests/widgets/test_colorpicker_popup.xul
toolkit/content/tests/widgets/test_contextmenu_list.xul
toolkit/content/tests/widgets/test_focus_anons.xul
toolkit/content/tests/widgets/test_hiddenitems.xul
toolkit/content/tests/widgets/test_hiddenpaging.xul
toolkit/content/tests/widgets/test_menu.xul
toolkit/content/tests/widgets/test_menu_hide.xul
toolkit/content/tests/widgets/test_menuitem_blink.xul
toolkit/content/tests/widgets/test_menulist.xul
toolkit/content/tests/widgets/test_menulist_keynav.xul
toolkit/content/tests/widgets/test_notificationbox.xul
toolkit/content/tests/widgets/test_panelfrommenu.xul
toolkit/content/tests/widgets/test_popup_attribute.xul
toolkit/content/tests/widgets/test_popup_button.xul
toolkit/content/tests/widgets/test_popup_coords.xul
toolkit/content/tests/widgets/test_popup_keys.xul
toolkit/content/tests/widgets/test_popup_preventdefault.xul
toolkit/content/tests/widgets/test_popup_recreate.xul
toolkit/content/tests/widgets/test_popup_scaled.xul
toolkit/content/tests/widgets/test_popup_tree.xul
toolkit/content/tests/widgets/test_popuphidden.xul
toolkit/content/tests/widgets/test_popupincontent.xul
toolkit/content/tests/widgets/test_popupremoving.xul
toolkit/content/tests/widgets/test_popupremoving_frame.xul
toolkit/content/tests/widgets/test_position.xul
toolkit/content/tests/widgets/test_progressmeter.xul
toolkit/content/tests/widgets/test_props.xul
toolkit/content/tests/widgets/test_radio.xul
toolkit/content/tests/widgets/test_richlist_direction.xul
toolkit/content/tests/widgets/test_scale.xul
toolkit/content/tests/widgets/test_scrollbar.xul
toolkit/content/tests/widgets/test_sorttemplate.xul
toolkit/content/tests/widgets/test_statusbar.xul
toolkit/content/tests/widgets/test_tabbox.xul
toolkit/content/tests/widgets/test_tabindex.xul
toolkit/content/tests/widgets/test_textbox_emptytext.xul
toolkit/content/tests/widgets/test_textbox_number.xul
toolkit/content/tests/widgets/test_textbox_search.xul
toolkit/content/tests/widgets/test_timepicker.xul
toolkit/content/tests/widgets/test_toolbar.xul
toolkit/content/tests/widgets/test_tooltip.xul
toolkit/content/tests/widgets/test_tooltip_noautohide.xul
toolkit/content/tests/widgets/test_tree.xul
toolkit/content/tests/widgets/test_tree_single.xul
toolkit/content/tests/widgets/test_tree_view.xul
toolkit/content/tests/widgets/window_popup_attribute.xul
toolkit/content/tests/widgets/window_popup_button.xul
toolkit/content/tests/widgets/xul_selectcontrol.js
--- a/testing/mochitest/harness-overlay.xul
+++ b/testing/mochitest/harness-overlay.xul
@@ -74,17 +74,17 @@ function loadTests()
           <h2 id="fail">Todo: <span id="todo-count">0</span></h2>
         </div>
         <div class="clear"></div>
         <div id="current-test">
           <b>Currently Executing: <span id="current-test-path">_</span></b>
         </div>
         <div class="clear"></div>
         <div class="frameholder">
-          <iframe scrolling="no" id="testframe" width="500"></iframe>
+          <iframe type="content" scrolling="no" id="testframe" width="550" height="350"></iframe>
         </div>
         <div class="clear"></div>
         <div class="toggle">
           <a href="#" id="toggleNonTests">Show Non-Tests</a>
           <br />
         </div>
         <div id="wrapper">
           <table cellpadding="0" cellspacing="0">
--- a/toolkit/content/tests/chrome/Makefile.in
+++ b/toolkit/content/tests/chrome/Makefile.in
@@ -102,16 +102,84 @@ include $(topsrcdir)/config/rules.mk
 		window_subframe_origin.xul \
 		frame_subframe_origin_subframe1.xul \
 		frame_subframe_origin_subframe2.xul \
 		RegisterUnregisterChrome.js \
 		test_panel.xul \
 		window_panel.xul \
 		$(NULL)
 
+
+_TEST_FILES +=  \
+		test_bug360220.xul \
+		test_bug365773.xul \
+		test_bug382990.xul \
+		test_bug457632.xul \
+		test_bug460942.xul \
+		test_bug509732.xul \
+		test_bug554279.xul \
+		test_bug557987.xul\
+		test_bug562554.xul \
+		test_button.xul \
+		test_closemenu_attribute.xul \
+		test_colorpicker_popup.xul \
+		test_menulist.xul \
+		test_menuitem_blink.xul \
+		test_menulist_keynav.xul \
+		test_popup_coords.xul \
+		test_popup_recreate.xul \
+		test_popup_preventdefault.xul \
+		test_notificationbox.xul \
+		test_scale.xul \
+		test_radio.xul \
+		test_tabbox.xul \
+		test_progressmeter.xul \
+		test_props.xul \
+		test_statusbar.xul \
+		test_timepicker.xul \
+		test_tree.xul \
+		test_tree_view.xul \
+		test_tree_single.xul \
+		test_textbox_emptytext.xul \
+		test_textbox_number.xul \
+		test_textbox_search.xul \
+		test_toolbar.xul \
+		xul_selectcontrol.js \
+		test_popupincontent.xul \
+		test_panelfrommenu.xul \
+		test_hiddenitems.xul \
+		test_hiddenpaging.xul \
+		test_popup_tree.xul \
+		test_popup_keys.xul \
+		test_popuphidden.xul \
+		test_popup_scaled.xul \
+		test_popupremoving.xul \
+		test_popupremoving_frame.xul \
+		frame_popupremoving_frame.xul \
+		test_position.xul \
+		test_menu.xul \
+		test_menu_hide.xul \
+		test_focus_anons.xul \
+		test_tabindex.xul \
+		test_scrollbar.xul \
+		test_sorttemplate.xul \
+		test_contextmenu_list.xul \
+		test_richlist_direction.xul \
+		test_tooltip.xul \
+		test_popup_attribute.xul \
+		window_popup_attribute.xul \
+                test_popup_button.xul \
+                window_popup_button.xul \
+               	popup_childframe_node.xul \
+		popup_trigger.js \
+		test_tooltip_noautohide.xul \
+		$(NULL)
+
+
+
 # test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
 # textboxes and lists only, so skip this test on Mac
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 _TEST_FILES += test_panel_focus.xul \
                window_panel_focus.xul \
                test_chromemargin.xul \
                window_chromemargin.xul
 else
rename from toolkit/content/tests/widgets/frame_popupremoving_frame.xul
rename to toolkit/content/tests/chrome/frame_popupremoving_frame.xul
rename from toolkit/content/tests/widgets/popup_childframe_node.xul
rename to toolkit/content/tests/chrome/popup_childframe_node.xul
rename from toolkit/content/tests/widgets/popup_trigger.js
rename to toolkit/content/tests/chrome/popup_trigger.js
--- a/toolkit/content/tests/widgets/popup_trigger.js
+++ b/toolkit/content/tests/chrome/popup_trigger.js
@@ -412,17 +412,16 @@ var popupTests = [
     gExpectedTriggerNode = null;
     is(gMenuPopup.anchorNode, null, testname + " anchorNode");
     is(gMenuPopup.triggerNode, gCachedEvent.target, testname + " triggerNode");
     is(document.popupNode, gCachedEvent.target, testname + " document.popupNode");
 
     var childframe = document.getElementById("childframe");
     if (childframe) {
       for (var t = 0; t < 2; t++) {
-        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
         var child = childframe.contentDocument; 
         var evt = child.createEvent("Event");
         evt.initEvent("click", true, true);
         child.documentElement.dispatchEvent(evt);
         is(child.documentElement.getAttribute("data"), "xnull",
            "cannot get popupNode from other document");
         child.documentElement.setAttribute("data", "none");
         // now try again with document.popupNode set explicitly
rename from toolkit/content/tests/widgets/test_bug360220.xul
rename to toolkit/content/tests/chrome/test_bug360220.xul
--- a/toolkit/content/tests/widgets/test_bug360220.xul
+++ b/toolkit/content/tests/chrome/test_bug360220.xul
@@ -1,21 +1,21 @@
 <?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=360220
 -->
 <window title="Mozilla Bug 360220"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Test for Bug 360220</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <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>      
 
 <body  xmlns="http://www.w3.org/1999/xhtml">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=360220">Mozilla Bug 360220</a>
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
rename from toolkit/content/tests/widgets/test_bug365773.xul
rename to toolkit/content/tests/chrome/test_bug365773.xul
--- a/toolkit/content/tests/widgets/test_bug365773.xul
+++ b/toolkit/content/tests/chrome/test_bug365773.xul
@@ -1,21 +1,21 @@
 <?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=365773
 -->
 <window title="Mozilla Bug 365773"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Test for Bug 365773</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <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>      
 
 <body  xmlns="http://www.w3.org/1999/xhtml">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=365773">Mozilla Bug 365773</a>
 <p id="display">
   <radiogroup id="group" collapsed="true" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
     <radio id="item" label="Item"/>
   </radiogroup>
 </p>
rename from toolkit/content/tests/widgets/test_bug382990.xul
rename to toolkit/content/tests/chrome/test_bug382990.xul
--- a/toolkit/content/tests/widgets/test_bug382990.xul
+++ b/toolkit/content/tests/chrome/test_bug382990.xul
@@ -1,20 +1,20 @@
 <?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=382990
 -->
 <window title="Mozilla Bug 382990"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="startThisTest()">
-  <script type="application/javascript" src="/MochiKit/packed.js" />
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.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=382990"
      target="_blank">Mozilla Bug 382990</a>
   </body>
 
     <tree id="testTree" height="200px">
rename from toolkit/content/tests/widgets/test_bug457632.xul
rename to toolkit/content/tests/chrome/test_bug457632.xul
--- a/toolkit/content/tests/widgets/test_bug457632.xul
+++ b/toolkit/content/tests/chrome/test_bug457632.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"?>
 <!--
   XUL Widget Test for bug 457632
   -->
 <window title="Bug 457632" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
+  <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>  
 
   <notificationbox id="nb"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"
         onload="test()"/>
 
   <!-- test code goes here -->
rename from toolkit/content/tests/widgets/test_bug460942.xul
rename to toolkit/content/tests/chrome/test_bug460942.xul
--- a/toolkit/content/tests/widgets/test_bug460942.xul
+++ b/toolkit/content/tests/chrome/test_bug460942.xul
@@ -1,19 +1,19 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
-<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
+<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=460942
 -->
 <window title="Mozilla Bug 460942"
         onload="runTests()"
         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=460942"
      target="_blank">Mozilla Bug 460942</a>
   </body>
 
   <!-- test code goes here -->
rename from toolkit/content/tests/widgets/test_bug509732.xul
rename to toolkit/content/tests/chrome/test_bug509732.xul
--- a/toolkit/content/tests/widgets/test_bug509732.xul
+++ b/toolkit/content/tests/chrome/test_bug509732.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"?>
 <!--
   XUL Widget Test for bug 509732
   -->
 <window title="Bug 509732" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
+  <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>  
 
     <notificationbox id="nb" hidden="true"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"
         onload="test()"/>
 
   <!-- test code goes here -->
rename from toolkit/content/tests/widgets/test_bug554279.xul
rename to toolkit/content/tests/chrome/test_bug554279.xul
--- a/toolkit/content/tests/widgets/test_bug554279.xul
+++ b/toolkit/content/tests/chrome/test_bug554279.xul
@@ -1,17 +1,17 @@
 <?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 title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="startTest();">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <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>
 
   <toolbox>
     <toolbarpalette id="palette"/>
 
     <toolbar id="tb1" currentset="p1"/>
   </toolbox>
 
   <!-- test resuls are displayed in the html:body -->
rename from toolkit/content/tests/widgets/test_bug557987.xul
rename to toolkit/content/tests/chrome/test_bug557987.xul
--- a/toolkit/content/tests/widgets/test_bug557987.xul
+++ b/toolkit/content/tests/chrome/test_bug557987.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"?>
 <!--
   XUL Widget Test for bug 557987
   -->
 <window title="Bug 557987" width="400" height="400"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 
   <toolbarbutton id="button" type="menu-button" label="Test bug 557987"
                                                onclick="eventReceived('click');"
                                                oncommand="eventReceived('command');">
     <menupopup onpopupshowing="eventReceived('popupshowing'); return false;" />
   </toolbarbutton>
   <menulist id="menulist" editable="true" value="Test bug 557987" 
                                           onfocus="eventReceived('focus')" />
rename from toolkit/content/tests/widgets/test_bug562554.xul
rename to toolkit/content/tests/chrome/test_bug562554.xul
--- a/toolkit/content/tests/widgets/test_bug562554.xul
+++ b/toolkit/content/tests/chrome/test_bug562554.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"?>
 <!--
   XUL Widget Test for bug 562554
   -->
 <window title="Bug 557987" width="400" height="400"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 
   <toolbarbutton type="menu" id="toolbarmenu" height="200px">
     <menupopup id="menupopup" onpopupshowing="eventReceived('popupshowing'); return false;"/>
     <stack>
        <button width="100px" left="0px" height="30px" id="button1"
         allowevents="true" onclick="eventReceived('clickbutton1'); return false;"/>
 
        <button width="100px" left="70px" id="button2"
rename from toolkit/content/tests/widgets/test_button.xul
rename to toolkit/content/tests/chrome/test_button.xul
--- a/toolkit/content/tests/widgets/test_button.xul
+++ b/toolkit/content/tests/chrome/test_button.xul
@@ -1,24 +1,24 @@
 <?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"?>
 <!--
   XUL Widget Test for button
   -->
 <window title="Button Test"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript" 
-          src="/MochiKit/packed.js"></script>
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="application/javascript"
-          src="/tests/SimpleTest/SimpleTest.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>      
   <script type="application/javascript"
-          src="/tests/SimpleTest/EventUtils.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
-<button id="one" label="One"/>
+<button id="one" label="One" />
 <button id="two" label="Two"/>
 <hbox>
   <button id="three" label="Three" open="true"/>
 </hbox>
 <hbox>
   <button id="four" type="menu" label="Four"/>
   <button id="five" type="panel" label="Five"/>
   <button id="six" label="Six"/>
rename from toolkit/content/tests/widgets/test_closemenu_attribute.xul
rename to toolkit/content/tests/chrome/test_closemenu_attribute.xul
--- a/toolkit/content/tests/widgets/test_closemenu_attribute.xul
+++ b/toolkit/content/tests/chrome/test_closemenu_attribute.xul
@@ -1,21 +1,21 @@
 <?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 title="Menu closemenu Attribute Tests"
   onload="setTimeout(nextTest, 0);"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Menulist Key Navigation Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <button id="menu" type="menu" label="Menu" onpopuphidden="popupHidden(event)">
   <menupopup id="p1" onpopupshown="if (event.target == this) this.firstChild.open = true">
     <menu id="l1" label="One">
       <menupopup id="p2" onpopupshown="if (event.target == this) this.firstChild.open = true">
         <menu id="l2" label="Two">
           <menupopup id="p3" onpopupshown="executeMenuItem()">
             <menuitem id="l3" label="Three"/>
rename from toolkit/content/tests/widgets/test_colorpicker_popup.xul
rename to toolkit/content/tests/chrome/test_colorpicker_popup.xul
--- a/toolkit/content/tests/widgets/test_colorpicker_popup.xul
+++ b/toolkit/content/tests/chrome/test_colorpicker_popup.xul
@@ -1,23 +1,23 @@
 <?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 title="Colorpicker Tests"
   onload="setTimeout(runTests, 0);"
   onpopupshown="popupShown();"
   onpopuphidden="popupHiding();"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Colorpicker Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <colorpicker id="colorpicker-popup" type="button" color="#FF0000" tabindex="1"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 var gTestPhase = -1;
 var gCp = null;
rename from toolkit/content/tests/widgets/test_contextmenu_list.xul
rename to toolkit/content/tests/chrome/test_contextmenu_list.xul
--- a/toolkit/content/tests/widgets/test_contextmenu_list.xul
+++ b/toolkit/content/tests/chrome/test_contextmenu_list.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"?>
 
 <window title="Context Menu on List Tests"
         onload="setTimeout(startTest, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <spacer height="5"/>
 
 <hbox style="padding-left: 10px;">
   <spacer width="5"/>
   <richlistbox id="list" context="themenu" style="padding: 0;" oncontextmenu="checkContextMenu(event)">
     <richlistitem id="item1" style="padding-top: 3px; margin: 0;"><button label="One"/></richlistitem>
     <richlistitem id="item2" height="22"><checkbox label="Checkbox"/></richlistitem>
rename from toolkit/content/tests/widgets/test_focus_anons.xul
rename to toolkit/content/tests/chrome/test_focus_anons.xul
--- a/toolkit/content/tests/widgets/test_focus_anons.xul
+++ b/toolkit/content/tests/chrome/test_focus_anons.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"?>
 
 <window title="Tests for focus on elements with anonymous focusable children"
         onload="setTimeout(runTests, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <label accesskey="a" control="menulist"/>
 <label accesskey="b" control="textbox"/>
 <label accesskey="c" control="scale"/>
 
 <menulist id="menulist" editable="true">
   <menupopup>
     <menuitem label="One"/>
rename from toolkit/content/tests/widgets/test_hiddenitems.xul
rename to toolkit/content/tests/chrome/test_hiddenitems.xul
--- a/toolkit/content/tests/widgets/test_hiddenitems.xul
+++ b/toolkit/content/tests/chrome/test_hiddenitems.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"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=317422
 -->
 <window title="Mozilla Bug 317422"
   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="/tests/SimpleTest/EventUtils.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.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=317422"
      target="_blank">Mozilla Bug 317422</a>
   </body>
 
   <richlistbox id="richlistbox" seltype="multiple">
rename from toolkit/content/tests/widgets/test_hiddenpaging.xul
rename to toolkit/content/tests/chrome/test_hiddenpaging.xul
--- a/toolkit/content/tests/widgets/test_hiddenpaging.xul
+++ b/toolkit/content/tests/chrome/test_hiddenpaging.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"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=317422
 -->
 <window title="Mozilla Bug 317422"
   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="/tests/SimpleTest/EventUtils.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
 
   <style xmlns="http://www.w3.org/1999/xhtml">
     /* This makes the richlistbox about 4.5 rows high */
     richlistitem {
       height: 30px;
     }
     richlistbox {
       height: 135px;
rename from toolkit/content/tests/widgets/test_menu.xul
rename to toolkit/content/tests/chrome/test_menu.xul
--- a/toolkit/content/tests/widgets/test_menu.xul
+++ b/toolkit/content/tests/chrome/test_menu.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"?>
 
 <window title="Menu Destruction Test"
   onload="runTests();"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <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>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 
   <menubar>
     <menu label="top" id="top">
       <menupopup>
         <menuitem label="top item"/>
 
         <menu label="hello" id="nested">
           <menupopup>
rename from toolkit/content/tests/widgets/test_menu_hide.xul
rename to toolkit/content/tests/chrome/test_menu_hide.xul
--- a/toolkit/content/tests/widgets/test_menu_hide.xul
+++ b/toolkit/content/tests/chrome/test_menu_hide.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"?>
 
 <window title="Menu Destruction Test"
   onload="setTimeout(runTests, 0);"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <menu id="menu">
   <menupopup onpopupshown="this.firstChild.open = true" onpopuphidden="if (event.target == this) done()">
     <menu id="submenu" label="One">
       <menupopup onpopupshown="submenuOpened();">
         <menuitem label="Two"/>
       </menupopup>
     </menu>
rename from toolkit/content/tests/widgets/test_menuitem_blink.xul
rename to toolkit/content/tests/chrome/test_menuitem_blink.xul
--- a/toolkit/content/tests/widgets/test_menuitem_blink.xul
+++ b/toolkit/content/tests/chrome/test_menuitem_blink.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"?>
 
 <window title="Blinking Context Menu Item Tests"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
   <menulist id="menulist">
     <menupopup id="menupopup">
       <menuitem label="Menu Item" id="menuitem"/>
     </menupopup>
   </menulist>
 <script class="testbody" type="application/javascript">
 <![CDATA[
rename from toolkit/content/tests/widgets/test_menulist.xul
rename to toolkit/content/tests/chrome/test_menulist.xul
--- a/toolkit/content/tests/widgets/test_menulist.xul
+++ b/toolkit/content/tests/chrome/test_menulist.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"?>
 
 <window title="Menulist Tests"
         onload="setTimeout(testtag_menulists, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
   <script type="application/javascript" src="xul_selectcontrol.js"></script>      
 
 <vbox id="scroller" style="overflow: auto" height="60">
   <menulist id="menulist" onpopupshown="test_menulist_open(this, this.parentNode)"
             onpopuphidden="$('menulist-in-listbox').open = true;">
     <menupopup id="menulist-popup"/>
   </menulist>
   <button label="Two"/>
rename from toolkit/content/tests/widgets/test_menulist_keynav.xul
rename to toolkit/content/tests/chrome/test_menulist_keynav.xul
--- a/toolkit/content/tests/widgets/test_menulist_keynav.xul
+++ b/toolkit/content/tests/chrome/test_menulist_keynav.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"?>
 
 <window title="Menulist Key Navigation Tests"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <button id="button1" label="One"/>
 <menulist id="list">
   <menupopup id="popup" onpopupshowing="return gShowPopup;">
     <menuitem id="i1" label="One"/>
     <menuitem id="i2" label="Two"/>
     <menuitem id="i2b" disabled="true" label="Two and a Half"/>
     <menuitem id="i3" label="Three"/>
rename from toolkit/content/tests/widgets/test_notificationbox.xul
rename to toolkit/content/tests/chrome/test_notificationbox.xul
--- a/toolkit/content/tests/widgets/test_notificationbox.xul
+++ b/toolkit/content/tests/chrome/test_notificationbox.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"?>
 <!--
   XUL Widget Test for notificationbox
   -->
 <window title="Notification Box" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
+  <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>  
 
   <notificationbox id="nb"/>
   <menupopup id="menupopup" onpopupshown="this.hidePopup()" onpopuphidden="checkPopupClosed()">
     <menuitem label="One"/>
   </menupopup>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
rename from toolkit/content/tests/widgets/test_panelfrommenu.xul
rename to toolkit/content/tests/chrome/test_panelfrommenu.xul
--- a/toolkit/content/tests/widgets/test_panelfrommenu.xul
+++ b/toolkit/content/tests/chrome/test_panelfrommenu.xul
@@ -1,20 +1,20 @@
 <?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 title="Open panel from menuitem"
   onload="setTimeout(runTests, 0);"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <!--
   This test does the following:
    1. Opens the menu, causing the popupshown event to fire, which will call menuOpened.
    2. Keyboard events are fired to cause the first item on the menu to be executed.
    3. The command event handler for the first menuitem opens the panel.
    4. As a menuitem was executed, the menu will roll up, hiding it.
    5. The popuphidden event for the menu calls menuClosed which tests the popup states.
rename from toolkit/content/tests/widgets/test_popup_attribute.xul
rename to toolkit/content/tests/chrome/test_popup_attribute.xul
--- a/toolkit/content/tests/widgets/test_popup_attribute.xul
+++ b/toolkit/content/tests/chrome/test_popup_attribute.xul
@@ -1,20 +1,20 @@
 <?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 title="Popup Attribute Tests"
   onload="setTimeout(runTest, 0);"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Attribute Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <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>      
 
 <script>
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_popup_attribute.xul", "_blank", "width=600,height=700");
 }
 </script>
rename from toolkit/content/tests/widgets/test_popup_button.xul
rename to toolkit/content/tests/chrome/test_popup_button.xul
--- a/toolkit/content/tests/widgets/test_popup_button.xul
+++ b/toolkit/content/tests/chrome/test_popup_button.xul
@@ -1,20 +1,20 @@
 <?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 title="Menu Button Popup Tests"
   onload="setTimeout(runTest, 0);"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Menu Button Popup Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <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>      
 
 <script>
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_popup_button.xul", "_blank", "width=700,height=700");
 }
 </script>
rename from toolkit/content/tests/widgets/test_popup_coords.xul
rename to toolkit/content/tests/chrome/test_popup_coords.xul
--- a/toolkit/content/tests/widgets/test_popup_coords.xul
+++ b/toolkit/content/tests/chrome/test_popup_coords.xul
@@ -1,21 +1,21 @@
 <?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 title="Popup Coordinate Tests"
   onload="setTimeout(openThePopup, 0, 'outer');"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <deck style="margin-top: 5px; padding-top: 5px;">
   <label id="outer" popup="outerpopup" value="Popup"/>
 </deck>
 
 <panel id="outerpopup"
            onpopupshowing="popupShowingEventOccurred(event);"
            onpopupshown="eventOccurred(event); openThePopup('inner')"
rename from toolkit/content/tests/widgets/test_popup_keys.xul
rename to toolkit/content/tests/chrome/test_popup_keys.xul
--- a/toolkit/content/tests/widgets/test_popup_keys.xul
+++ b/toolkit/content/tests/chrome/test_popup_keys.xul
@@ -1,20 +1,20 @@
 <?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 title="Menu ignorekeys Test"
         onkeydown="keyDown()"
         onload="setTimeout(runTests, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <!--
   This test checks that the ignorekeys attribute can be used on a menu to
   disable key navigation. The test is performed twice by opening the menu,
   simulating a cursor down key, and closing the popup. When keys are enabled,
   the first item on the menu should be highlighted, otherwise the first item
   should not be highlighted.
   -->
rename from toolkit/content/tests/widgets/test_popup_preventdefault.xul
rename to toolkit/content/tests/chrome/test_popup_preventdefault.xul
--- a/toolkit/content/tests/widgets/test_popup_preventdefault.xul
+++ b/toolkit/content/tests/chrome/test_popup_preventdefault.xul
@@ -1,20 +1,20 @@
 <?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 title="Popup Prevent Default Tests"
   onload="setTimeout(runTest, 0);"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Prevent Default Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <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>      
 
 <!--
   This tests checks that preventDefault can be called on a popupshowing
   event and that preventDefault has no effect for the popuphiding event.
   -->
 
 <script>
 SimpleTest.waitForExplicitFinish();
rename from toolkit/content/tests/widgets/test_popup_recreate.xul
rename to toolkit/content/tests/chrome/test_popup_recreate.xul
--- a/toolkit/content/tests/widgets/test_popup_recreate.xul
+++ b/toolkit/content/tests/chrome/test_popup_recreate.xul
@@ -1,21 +1,21 @@
 <?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 title="Popup Recreate Test"
   onload="setTimeout(init, 0)"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Recreate Test</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <!--
   This is a test for bug 388361.
 
   This test checks that a menulist's popup is properly created and sized when
   the popup node is removed and another added in its place.
 
   -->
rename from toolkit/content/tests/widgets/test_popup_scaled.xul
rename to toolkit/content/tests/chrome/test_popup_scaled.xul
--- a/toolkit/content/tests/widgets/test_popup_scaled.xul
+++ b/toolkit/content/tests/chrome/test_popup_scaled.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"?>
 
 <window title="Popups in Scaled Content"
         onload="setTimeout(runTests, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <!-- This test checks that the position is correct in two cases:
       - a popup anchored at an element in a scaled document
       - a popup opened at a screen coordinate in a scaled window
   -->
 
 <iframe id="frame" width="60" height="140"
         src="data:text/html,&lt;html&gt;&lt;body&gt;&lt;input size='4' id='one'&gt;&lt;input size='4' id='two'&gt;&lt;/body&gt;&lt;/html&gt;"/>
rename from toolkit/content/tests/widgets/test_popup_tree.xul
rename to toolkit/content/tests/chrome/test_popup_tree.xul
--- a/toolkit/content/tests/widgets/test_popup_tree.xul
+++ b/toolkit/content/tests/chrome/test_popup_tree.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"?>
 
 <window title="Tree in Popup Test"
         onload="setTimeout(runTests, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <panel id="panel" onpopupshown="treeClick()" onpopuphidden="SimpleTest.finish()">
   <tree id="tree" width="350" rows="5">
     <treecols>
       <treecol id="name" label="Name" flex="1"/>
       <treecol id="address" label="Street" flex="1"/>
     </treecols>
     <treechildren id="treechildren">
rename from toolkit/content/tests/widgets/test_popuphidden.xul
rename to toolkit/content/tests/chrome/test_popuphidden.xul
--- a/toolkit/content/tests/widgets/test_popuphidden.xul
+++ b/toolkit/content/tests/chrome/test_popuphidden.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"?>
 
 <window title="Hidden Popup Test"
         onload="setTimeout(runTests, 0, $('popup'));"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-<script type="application/javascript" src="/MochiKit/packed.js"></script>
-<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+<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>      
 
 <menupopup id="popup" hidden="true" onpopupshown="ok(true, 'popupshown'); this.hidePopup()"
                                     onpopuphidden="$('popup-hideonshow').openPopup(null, 'after_start')">
   <menuitem id="i1" label="One"/>
   <menuitem id="i2" label="Two"/>
 </menupopup>
 
 <menupopup id="popup-hideonshow" onpopupshowing="hidePopupWhileShowing(this)"
rename from toolkit/content/tests/widgets/test_popupincontent.xul
rename to toolkit/content/tests/chrome/test_popupincontent.xul
--- a/toolkit/content/tests/widgets/test_popupincontent.xul
+++ b/toolkit/content/tests/chrome/test_popupincontent.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"?>
 
 <window title="Popup in Content Positioning Tests"
         onload="setTimeout(nextTest, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <!--
   This test checks that popups in content areas don't extend past the content area.
   -->
 
 <hbox>
   <spacer width="100"/>
   <menu id="menu" label="Menu">
@@ -50,25 +50,25 @@ function nextTest()
     case "":
       step = "openPopupAtScreen";
       popup.openPopupAtScreen(1000, 1200);
       break;
     case "openPopupAtScreen":
       step = "left and top";
       popup.setAttribute("left", "800");
       popup.setAttribute("top", "2900");
-      synthesizeMouse($("menu"), 2, 2, { });
+      synthesizeMouse(menu, 2, 2, { });
       break;
     case "left and top":
       step = "open near bottom";
       // request that the menu be opened with a target point near the bottom of the window,
       // so that the menu's top margin will push it completely outside the window.
       var bo = document.documentElement.boxObject;
       popup.setAttribute("top", bo.screenY + window.innerHeight - 5);
-      synthesizeMouse($("menu"), 2, 2, { });
+      synthesizeMouse(menu, 2, 2, { });
       break;
     case "open near bottom":
       step = "large menu";
       popup.removeAttribute("left");
       popup.removeAttribute("top");
       for (var i = 0; i < 80; i++)
         menu.appendItem("Test", "");
       synthesizeMouse(menu, 2, 2, { });
rename from toolkit/content/tests/widgets/test_popupremoving.xul
rename to toolkit/content/tests/chrome/test_popupremoving.xul
--- a/toolkit/content/tests/widgets/test_popupremoving.xul
+++ b/toolkit/content/tests/chrome/test_popupremoving.xul
@@ -1,11 +1,11 @@
 <?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 title="Popup Removing Tests"
         onload="setTimeout(nextTest, 0)"
         onDOMAttrModified="modified(event)"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <!--
   This test checks that popup elements can be removed in various ways without
@@ -18,19 +18,19 @@
   tree. This should hide the popups as they are no longer in a document.
 
   A mutation listener is triggered when the fourth menu closes by having its
   open attribute cleared. This listener hides the third popup which causes
   its frame to be removed. Naturally, we want to ensure that this doesn't
   crash when the third menu is removed.
   -->
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <hbox>
 
 <menu id="nestedmenu1" label="1">
     <menupopup id="nestedpopup1" onpopupshown="if (event.target == this) this.firstChild.open = true">
       <menu id="nestedmenu2" label="2">
         <menupopup id="nestedpopup2" onpopupshown="if (event.target == this) this.firstChild.open = true">
           <menu id="nestedmenu3" label="3">
rename from toolkit/content/tests/widgets/test_popupremoving_frame.xul
rename to toolkit/content/tests/chrome/test_popupremoving_frame.xul
--- a/toolkit/content/tests/widgets/test_popupremoving_frame.xul
+++ b/toolkit/content/tests/chrome/test_popupremoving_frame.xul
@@ -1,22 +1,22 @@
 <?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 title="Popup Unload Test"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <!--
   This test checks that popup elements are removed when the document is changed.
   -->
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <iframe id="frame" width="300" height="150" src="frame_popupremoving_frame.xul"/>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 SimpleTest.waitForExplicitFinish();
 
rename from toolkit/content/tests/widgets/test_position.xul
rename to toolkit/content/tests/chrome/test_position.xul
--- a/toolkit/content/tests/widgets/test_position.xul
+++ b/toolkit/content/tests/chrome/test_position.xul
@@ -1,21 +1,21 @@
 <?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"?>
 <!--
   XUL Widget Test for positioning
   -->
 <window title="position" width="500" height="600"
         onload="setTimeout(runTest, 0);"
         style="margin: 0; border: 0; padding; 0;"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 
 <hbox id="box1">
   <button label="0" width="100" height="40" style="margin: 3px;"/>
 </hbox>
 <scrollbox id="box2" orient="vertical" align="start" width="200" height="50"
            style="overflow: hidden; margin-left: 2px; padding: 1px;">
   <deck>
rename from toolkit/content/tests/widgets/test_progressmeter.xul
rename to toolkit/content/tests/chrome/test_progressmeter.xul
--- a/toolkit/content/tests/widgets/test_progressmeter.xul
+++ b/toolkit/content/tests/chrome/test_progressmeter.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"?>
 <!--
   XUL Widget Test for progressmeter
   -->
 <window title="Progressmeter" width="500" height="600"
         onload="doTests()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
+  <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>  
 
   <progressmeter id="n1"/>
   <progressmeter id="n2" mode="undetermined"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
   <!-- test code goes here -->
rename from toolkit/content/tests/widgets/test_props.xul
rename to toolkit/content/tests/chrome/test_props.xul
--- a/toolkit/content/tests/widgets/test_props.xul
+++ b/toolkit/content/tests/chrome/test_props.xul
@@ -1,25 +1,25 @@
 <?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"?>
 <!--
   XUL Widget Test for basic properties - this test checks that the basic
   properties defined in general.xml and inherited by a number of elements
   work properly.
   -->
 <window title="Basic Properties Test"
         onload="setTimeout(test_props, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript" 
-          src="/MochiKit/packed.js"></script>
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="application/javascript"
-          src="/tests/SimpleTest/SimpleTest.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>      
   <script type="application/javascript"
-          src="/tests/SimpleTest/EventUtils.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <command id="cmd_nothing"/>
 <command id="cmd_action"/>
 
 <button id="button" label="Button" accesskey="B"
         crop="end" image="happy.png" command="cmd_nothing"/>
 <checkbox id="checkbox" label="Checkbox" accesskey="B"
           crop="end" image="happy.png" command="cmd_nothing"/>
rename from toolkit/content/tests/widgets/test_radio.xul
rename to toolkit/content/tests/chrome/test_radio.xul
--- a/toolkit/content/tests/widgets/test_radio.xul
+++ b/toolkit/content/tests/chrome/test_radio.xul
@@ -1,20 +1,20 @@
 <?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"?>
 <!--
   XUL Widget Test for radio buttons
   -->
 <window title="Radio Buttons" width="500" height="600"
         onload="setTimeout(test_radio, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
   <script type="application/javascript" src="xul_selectcontrol.js"/>
 
 <radiogroup id="radiogroup"/>
 
 <radiogroup id="radiogroup-initwithvalue" value="two">
   <radio label="One" value="one"/>
   <radio label="Two" value="two"/>
   <radio label="Three" value="three"/>
rename from toolkit/content/tests/widgets/test_richlist_direction.xul
rename to toolkit/content/tests/chrome/test_richlist_direction.xul
--- a/toolkit/content/tests/widgets/test_richlist_direction.xul
+++ b/toolkit/content/tests/chrome/test_richlist_direction.xul
@@ -1,23 +1,23 @@
 <?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"?>
 <!--
   XUL Widget Test for listbox direction
   -->
 <window title="Listbox direction test"
         onload="test_richlistbox()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript"
-          src="/MochiKit/packed.js"></script>
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="application/javascript"
-          src="/tests/SimpleTest/SimpleTest.js"></script>
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript"
-          src="/tests/SimpleTest/EventUtils.js"></script>
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 
   <richlistbox seltype="multiple" id="richlistbox" flex="1" minheight="80" maxheight="80" height="80" />
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
 <script type="application/javascript">
 <![CDATA[
rename from toolkit/content/tests/widgets/test_scale.xul
rename to toolkit/content/tests/chrome/test_scale.xul
--- a/toolkit/content/tests/widgets/test_scale.xul
+++ b/toolkit/content/tests/chrome/test_scale.xul
@@ -1,20 +1,20 @@
 <?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"?>
 <!--
   XUL Widget Test for scale
   -->
 <window title="scale" width="500" height="600"
         onload="setTimeout(testtag_scale, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <hbox>
   <vbox>
     <scale id="scale-horizontal-normal"/>
     <scale id="scale-horizontal-reverse" dir="reverse"/>
   </vbox>
   <scale id="scale-vertical-normal" orient="vertical"/>
   <scale id="scale-vertical-reverse" orient="vertical" dir="reverse"/>
rename from toolkit/content/tests/widgets/test_scrollbar.xul
rename to toolkit/content/tests/chrome/test_scrollbar.xul
--- a/toolkit/content/tests/widgets/test_scrollbar.xul
+++ b/toolkit/content/tests/chrome/test_scrollbar.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"?>
 <!--
   XUL Widget Test for scrollbars
   -->
 <window title="Scrollbar"
   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="/tests/SimpleTest/EventUtils.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js" />
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml"/>
   
   <hbox>
       <scrollbar orient="horizontal"
                  id="scroller"
                  curpos="0"
rename from toolkit/content/tests/widgets/test_sorttemplate.xul
rename to toolkit/content/tests/chrome/test_sorttemplate.xul
--- a/toolkit/content/tests/widgets/test_sorttemplate.xul
+++ b/toolkit/content/tests/chrome/test_sorttemplate.xul
@@ -1,21 +1,21 @@
 <?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,window > |people { display: none }" type="text/css"?>
 <!--
   XUL Widget Test for tabindex
   -->
 <window title="tabindex" width="500" height="600"
         onfocus="runTest()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <people id="famouspeople" xmlns="">
     <person name="Napoleon Bonaparte" gender="male"/>
     <person name="Cleopatra" gender="female"/>
     <person name="Julius Caesar" gender="male"/>
     <person name="Ferdinand Magellan" gender="male"/>
     <person name="Laura Secord" gender="female"/>
 </people>
rename from toolkit/content/tests/widgets/test_statusbar.xul
rename to toolkit/content/tests/chrome/test_statusbar.xul
--- a/toolkit/content/tests/widgets/test_statusbar.xul
+++ b/toolkit/content/tests/chrome/test_statusbar.xul
@@ -1,23 +1,23 @@
 <?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"?>
 <!--
   XUL Widget Test for statusbar
   -->
 <window title="Statusbar Test"
         onload="setTimeout(test_statusbar, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript" 
-          src="/MochiKit/packed.js"></script>
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
   <script type="application/javascript"
-          src="/tests/SimpleTest/SimpleTest.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>      
   <script type="application/javascript"
-          src="/tests/SimpleTest/EventUtils.js"></script>      
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <statusbar>
   <statusbarpanel id="panel" label="OK" image="happy.png"/>
 </statusbar>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
rename from toolkit/content/tests/widgets/test_tabbox.xul
rename to toolkit/content/tests/chrome/test_tabbox.xul
--- a/toolkit/content/tests/widgets/test_tabbox.xul
+++ b/toolkit/content/tests/chrome/test_tabbox.xul
@@ -1,20 +1,20 @@
 <?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"?>
 <!--
   XUL Widget Test for radio buttons
   -->
 <window title="Radio Buttons" width="500" height="600"
         onload="setTimeout(test_tabbox, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
   <script type="application/javascript" src="xul_selectcontrol.js"/>
 
 <tabbox id="tabbox">
   <tabs id="tabs">
     <tab id="tab1" label="Tab 1"/>
     <tab id="tab2" label="Tab 2"/>
   </tabs>
   <tabpanels id="tabpanels">
rename from toolkit/content/tests/widgets/test_tabindex.xul
rename to toolkit/content/tests/chrome/test_tabindex.xul
--- a/toolkit/content/tests/widgets/test_tabindex.xul
+++ b/toolkit/content/tests/chrome/test_tabindex.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"?>
 <!--
   XUL Widget Test for tabindex
   -->
 <window title="tabindex" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <!--
   Elements are navigated in the following order:
     1. tabindex > 0 in tree order
     2. tabindex = 0 in tree order
   Elements with tabindex = -1 are not in the tab order
  -->
 <hbox>
rename from toolkit/content/tests/widgets/test_textbox_emptytext.xul
rename to toolkit/content/tests/chrome/test_textbox_emptytext.xul
--- a/toolkit/content/tests/widgets/test_textbox_emptytext.xul
+++ b/toolkit/content/tests/chrome/test_textbox_emptytext.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"?>
 <!--
   XUL Widget Test for textbox with placeholder
   -->
 <window title="Textbox with placeholder test" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <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>
 
   <hbox>
     <textbox id="t1"/>
   </hbox>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
 
rename from toolkit/content/tests/widgets/test_textbox_number.xul
rename to toolkit/content/tests/chrome/test_textbox_number.xul
--- a/toolkit/content/tests/widgets/test_textbox_number.xul
+++ b/toolkit/content/tests/chrome/test_textbox_number.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"?>
 <!--
   XUL Widget Test for textbox type="number"
   -->
 <window title="Textbox type='number' test" width="500" height="600"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <hbox>
   <textbox id="n1" type="number" size="4"/>
   <textbox id="n2" type="number" value="10" min="5" max="15" wraparound="true"/>
 </hbox>
 <hbox>
   <textbox id="n3" type="number" size="4" value="25" min="1" max="12" increment="3"/>
 </hbox>
rename from toolkit/content/tests/widgets/test_textbox_search.xul
rename to toolkit/content/tests/chrome/test_textbox_search.xul
--- a/toolkit/content/tests/widgets/test_textbox_search.xul
+++ b/toolkit/content/tests/chrome/test_textbox_search.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"?>
 <!--
   XUL Widget Test for search textbox
   -->
 <window title="Search textbox test" width="500" height="600"
         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="/tests/SimpleTest/EventUtils.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
 
   <hbox>
     <textbox id="searchbox"
              type="search"
              oncommand="doSearch(this.value);"
              placeholder="random placeholder"
              timeout="1"/>
   </hbox>
rename from toolkit/content/tests/widgets/test_timepicker.xul
rename to toolkit/content/tests/chrome/test_timepicker.xul
--- a/toolkit/content/tests/widgets/test_timepicker.xul
+++ b/toolkit/content/tests/chrome/test_timepicker.xul
@@ -1,20 +1,20 @@
 <?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"?>
 <!--
   XUL Widget Test for timepicker
   -->
 <window title="timepicker" width="500" height="600"
         onload="setTimeout(testtag_timepicker, 0);"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <timepicker id="timepicker"/>
 
 <body xmlns="http://www.w3.org/1999/xhtml">
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
rename from toolkit/content/tests/widgets/test_toolbar.xul
rename to toolkit/content/tests/chrome/test_toolbar.xul
--- a/toolkit/content/tests/widgets/test_toolbar.xul
+++ b/toolkit/content/tests/chrome/test_toolbar.xul
@@ -1,17 +1,17 @@
 <?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 title="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="startTest();">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <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>
 
   <toolbox id="toolbox">
     <toolbarpalette>
       <toolbarbutton id="p1" label="p1"/>
       <toolbarbutton id="p2" label="p2"/>
       <toolbarbutton id="p3" label="p3"/>
       <toolbarbutton id="p4" label="p4"/>
       <toolbarbutton id="p5" label="p5"/>
rename from toolkit/content/tests/widgets/test_tooltip.xul
rename to toolkit/content/tests/chrome/test_tooltip.xul
--- a/toolkit/content/tests/widgets/test_tooltip.xul
+++ b/toolkit/content/tests/chrome/test_tooltip.xul
@@ -1,36 +1,36 @@
 <?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 title="Tooltip Tests"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Tooltip Tests</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
+  <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>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <script type="application/javascript" src="popup_shared.js"></script>
 
 <tooltip id="thetooltip">
   <label id="label" value="This is a tooltip"/>
 </tooltip>
 
 <box tooltiptext="Box Tooltip">
   <button id="withtext" label="Tooltip Text" tooltiptext="Button Tooltip"
           style="-moz-appearance: none; padding: 0;"/>
   <button id="without" label="No Tooltip" style="-moz-appearance: none; padding: 0;"/>
   <!-- remove the native theme and borders to avoid some platform
        specific sizing differences -->
   <button id="withtooltip" label="Tooltip Element" tooltip="thetooltip"
           class="plain" style="-moz-appearance: none; padding: 0;"/>
   <iframe id="childframe" type="content" width="10" height="10"
-          src="http://sectest2.example.org:80/tests/toolkit/content/tests/widgets/popup_childframe_node.xul"/>
+          src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
 </box>
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 SimpleTest.waitForExplicitFinish();
 var gOriginalWidth = -1;
 var gOriginalHeight = -1;
rename from toolkit/content/tests/widgets/test_tooltip_noautohide.xul
rename to toolkit/content/tests/chrome/test_tooltip_noautohide.xul
--- a/toolkit/content/tests/widgets/test_tooltip_noautohide.xul
+++ b/toolkit/content/tests/chrome/test_tooltip_noautohide.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"?>
 
 <window title="Tooltip Noautohide Tests"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <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>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
 
 <tooltip id="thetooltip" noautohide="true"
          onpopupshown="setTimeout(tooltipStillShown, 6000)"
          onpopuphidden="ok(gChecked, 'tooltip did not hide'); SimpleTest.finish()">
   <label id="label" value="This is a tooltip"/>
 </tooltip>
 
 <button id="button" label="Tooltip Text" tooltip="thetooltip"/>
rename from toolkit/content/tests/widgets/test_tree.xul
rename to toolkit/content/tests/chrome/test_tree.xul
--- a/toolkit/content/tests/widgets/test_tree.xul
+++ b/toolkit/content/tests/chrome/test_tree.xul
@@ -1,20 +1,20 @@
 <?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"?>
 <!--
   XUL Widget Test for tree using multiple row selection
   -->
 <window title="Tree" width="500" height="600"
         onload="setTimeout(testtag_tree, 0, 'tree-simple', 'treechildren-simple', 'multiple', 'simple', 'tree');"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <script src="tree_shared.js"/>
 
 <tree id="tree-simple" rows="4">
   <treecols>
     <treecol id="name" label="Name" sort="label" properties="one two" flex="1"/>
     <treecol id="address" label="Address" flex="1"/>
   </treecols>
rename from toolkit/content/tests/widgets/test_tree_single.xul
rename to toolkit/content/tests/chrome/test_tree_single.xul
--- a/toolkit/content/tests/widgets/test_tree_single.xul
+++ b/toolkit/content/tests/chrome/test_tree_single.xul
@@ -1,21 +1,21 @@
 <?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"?>
 <!--
   XUL Widget Test for single selection tree
   -->
 <window title="Single Selection Tree" width="500" height="600"
         onload="setTimeout(testtag_tree, 0, 'tree-single', 'treechildren-single',
                            'single', 'simple', 'single selection tree');"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <script src="tree_shared.js"/>
 
 <tree id="tree-single" rows="4" seltype="single">
   <treecols>
     <treecol id="name" label="Name" sort="label" properties="one two" flex="1"/>
     <treecol id="address" label="Address" flex="1"/>
   </treecols>
rename from toolkit/content/tests/widgets/test_tree_view.xul
rename to toolkit/content/tests/chrome/test_tree_view.xul
--- a/toolkit/content/tests/widgets/test_tree_view.xul
+++ b/toolkit/content/tests/chrome/test_tree_view.xul
@@ -1,38 +1,37 @@
 <?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"?>
 <!--
   XUL Widget Test for tree using a custom nsITreeView
   -->
 <window title="Tree" onload="init()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>  
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>  
+  <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>  
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>  
 
 <script src="tree_shared.js"/>
 
 <script>
 <![CDATA[
 
-var treeData = [["Mary", "206 Garden Avenue"],
-                ["Chris", "19 Marion Street"],
-                ["Sarah", "702 Fern Avenue"],
-                ["John", "99 Westminster Avenue"]];
-                
 // This is our custom view, based on the treeview interface
 var view =
 {
+  treeData: [["Mary", "206 Garden Avenue"],
+                ["Chris", "19 Marion Street"],
+                ["Sarah", "702 Fern Avenue"],
+                ["John", "99 Westminster Avenue"]],
   value: "",
   rowCount: 8,
-  getCellText: function(row, column) { return treeData[row % 4][column.index]; },
+  getCellText: function(row, column) { return this.treeData[row % 4][column.index]; },
   getCellValue: function(row, column) { return this.value; },
-  setCellText: function(row, column, val) { treeData[row % 4][column.index] = val; },
+  setCellText: function(row, column, val) { this.treeData[row % 4][column.index] = val; },
   setCellValue: function(row, column, val) { this.value = val; },
   setTree: function(tree) { this.tree = tree; },
   isContainer: function(row) { return false; },
   isContainerOpen: function(row) { return false; },
   isContainerEmpty: function(row) { return false; },
   isSeparator: function(row) { return false; },
   isSorted: function(row) { return false; },
   isSelectable: function(row, column) { return true; },
@@ -43,33 +42,32 @@ var view =
   hasNextSibling: function(row, column) { return row != this.rowCount - 1; },
   getImageSrc: function(row, column) { return ""; },
   cycleHeader: function(column) { },
   getRowProperties: function(row, props) { },
   getCellProperties: function(row, column, props) { },
   getColumnProperties: function(column, props)
   {
     if (!column.index) {
-      netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
       var atomService = Components.classes["@mozilla.org/atom-service;1"].
                           getService(Components.interfaces.nsIAtomService);
       props.AppendElement(atomService.getAtom("one"));
       props.AppendElement(atomService.getAtom("two"));
     }
   }
 }
 
 function getCustomTreeViewCellInfo()
 {
   var obj = { rows: [] };
 
   for (var row = 0; row < view.rowCount; row++) {
     var cellInfo = [ ];
     for (var column = 0; column < 1; column++) {
-      cellInfo.push({ label: "" + treeData[row % 4][column],
+      cellInfo.push({ label: "" + view.treeData[row % 4][column],
                       value: "",
                       properties: "",
                       editable: row != 2 || column.index != 1,
                       selectable: true,
                       image: "",
                       mode: Components.interfaces.nsITreeView.PROGRESS_NORMAL });
     }
 
@@ -82,17 +80,16 @@ function getCustomTreeViewCellInfo()
                     parent: -1 });
   }
 
   return obj;
 }
 
 function init()
 {
-  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   var tree = document.getElementById("tree-view");
   tree.view = view;
   tree.treeBoxObject.ensureRowIsVisible(0);
   is(tree.treeBoxObject.getFirstVisibleRow(), 0, "first visible after ensureRowIsVisible on load");
   tree.setAttribute("rows", "4");
 
   setTimeout(testtag_tree, 0, "tree-view", "treechildren-view", "multiple", "simple", "tree view");
 }
rename from toolkit/content/tests/widgets/window_popup_attribute.xul
rename to toolkit/content/tests/chrome/window_popup_attribute.xul
--- a/toolkit/content/tests/widgets/window_popup_attribute.xul
+++ b/toolkit/content/tests/chrome/window_popup_attribute.xul
@@ -1,30 +1,30 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 
 <window title="Popup Attribute Tests"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Attribute Tests</title>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
   <script type="application/javascript" src="popup_shared.js"></script>      
   <script type="application/javascript" src="popup_trigger.js"></script>      
 
 <script>
 window.opener.SimpleTest.waitForFocus(runTests, window);
 </script>
 
 <hbox style="margin-left: 325px; margin-top: 325px;">
   <label id="trigger" popup="thepopup" value="Popup"/>
 </hbox>
 <!-- this frame is used to check that document.popupNode
      is inaccessible from different sources -->
 <iframe id="childframe" type="content" width="10" height="10"
-        src="http://sectest2.example.org:80/tests/toolkit/content/tests/widgets/popup_childframe_node.xul"/>
+        src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
 
 <menupopup id="thepopup">
   <menuitem id="item1" label="First"/>
   <menuitem id="item2" label="Main Item"/>
   <menuitem id="amenu" label="A Menu" accesskey="M"/>
   <menuitem id="item3" label="Third"/>
   <menuitem id="one" label="One"/>
   <menuitem id="fancier" label="Fancier Menu"/>
rename from toolkit/content/tests/widgets/window_popup_button.xul
rename to toolkit/content/tests/chrome/window_popup_button.xul
--- a/toolkit/content/tests/widgets/window_popup_button.xul
+++ b/toolkit/content/tests/chrome/window_popup_button.xul
@@ -1,16 +1,16 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 
 <window title="Popup Tests"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <title>Popup Tests</title>
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>      
   <script type="application/javascript" src="popup_shared.js"></script>      
   <script type="application/javascript" src="popup_trigger.js"></script>
 
 <script>
 window.opener.SimpleTest.waitForFocus(runTests, window);
 </script>
 
 <hbox style="margin-left: 325px; margin-top: 325px;">
@@ -32,11 +32,11 @@ window.opener.SimpleTest.waitForFocus(ru
       <menuitem id="last" label="One Other Menu"/>
     </menupopup>
   </button>
 </hbox>
 
 <!-- this frame is used to check that document.popupNode
      is inaccessible from different sources -->
 <iframe id="childframe" type="content" width="10" height="10"
-        src="http://sectest2.example.org:80/tests/toolkit/content/tests/widgets/popup_childframe_node.xul"/>
+        src="http://sectest2.example.org:80/chrome/toolkit/content/tests/chrome/popup_childframe_node.xul"/>
 
 </window>
rename from toolkit/content/tests/widgets/xul_selectcontrol.js
rename to toolkit/content/tests/chrome/xul_selectcontrol.js
--- a/toolkit/content/tests/widgets/Makefile.in
+++ b/toolkit/content/tests/widgets/Makefile.in
@@ -39,94 +39,37 @@ DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = toolkit/content/tests/widgets
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
-_TEST_FILES = 	test_arrowpanel.xul \
-		test_bug360220.xul \
-		test_bug359754.xul \
-		test_bug365773.xul \
-		test_bug382990.xul \
-		test_bug457632.xul \
-		test_bug460942.xul \
-		test_bug509732.xul \
-		test_bug554279.xul \
-		test_bug557987.xul\
-		test_bug562554.xul \
-		test_button.xul \
-		test_closemenu_attribute.xul \
-		test_colorpicker_popup.xul \
-		test_deck.xul \
-		test_menulist.xul \
-		test_menuitem_blink.xul \
-		test_menulist_keynav.xul \
-		test_menulist_null_value.xul \
-		test_popup_coords.xul \
-		test_popup_recreate.xul \
-		test_popup_button.xul \
-		test_menuchecks.xul \
-		test_popup_attribute.xul \
-		test_popup_preventdefault.xul \
-		test_notificationbox.xul \
-		test_scale.xul \
-		test_radio.xul \
-		test_tabbox.xul \
-		test_tooltip_noautohide.xul \
+_CHROME_FILES = \
 		popup_shared.js \
-		popup_trigger.js \
-		window_popup_button.xul \
-		window_popup_attribute.xul \
-		popup_childframe_node.xul \
-		test_tooltip.xul \
-		test_progressmeter.xul \
-		test_props.xul \
-		test_statusbar.xul \
-		test_datepicker.xul \
-		test_timepicker.xul \
-		test_tree.xul \
-		test_tree_view.xul \
-		test_tree_single.xul \
+		tree_shared.js \
+		$(NULL)
+
+_TEST_FILES =	\
+                test_contextmenu_nested.xul \
+		test_tree_column_reorder.xul \
 		test_tree_hier.xul \
 		test_tree_hier_cell.xul \
-		test_tree_column_reorder.xul \
 		tree_shared.js \
-		test_textbox_emptytext.xul \
-		test_textbox_number.xul \
-		test_textbox_search.xul \
-		test_toolbar.xul \
-		xul_selectcontrol.js \
-		test_popupincontent.xul \
-		test_panelfrommenu.xul \
-		test_hiddenitems.xul \
-		test_hiddenpaging.xul \
-		test_popup_tree.xul \
-		test_popup_keys.xul \
-		test_popuphidden.xul \
-		test_popup_scaled.xul \
-		test_popupremoving.xul \
-		test_popupremoving_frame.xul \
-		frame_popupremoving_frame.xul \
-		test_position.xul \
-		test_menu.xul \
-		test_menu_hide.xul \
+		test_arrowpanel.xul \
+		test_datepicker.xul \
+		test_deck.xul \
+		test_menuchecks.xul \
+		test_menulist_null_value.xul \
 		test_mousecapture.xul \
+		test_mousescroll.xul \
 		test_mousecapture_area.html \
-		test_focus_anons.xul \
-		test_tabindex.xul \
-		test_mousescroll.xul \
-		test_scrollbar.xul \
-		test_sorttemplate.xul \
-		test_contextmenu_list.xul \
-		test_contextmenu_nested.xul \
-		test_videocontrols.html \
-		test_richlist_direction.xul \
+		popup_shared.js \
+                test_videocontrols.html \
 		test_videocontrols_video_direction.html \
 		test_videocontrols_audio_direction.html \
 		videocontrols_direction-1-ref.html \
 		videocontrols_direction-1a.html \
 		videocontrols_direction-1b.html \
 		videocontrols_direction-1c.html \
 		videocontrols_direction-1d.html \
 		videocontrols_direction-1e.html \
@@ -143,10 +86,13 @@ include $(topsrcdir)/config/rules.mk
 		videomask.css \
 		$(NULL)
 
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 _TEST_FILES += test_menubar.xul \
                window_menubar.xul
 endif
 
+libs:: $(_CHROME_FILES)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/../chrome
+
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
deleted file mode 100644
--- a/toolkit/content/tests/widgets/test_bug359754.xul
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=359754
--->
-<window title="Mozilla Bug 359754"
-  xmlns:html="http://www.w3.org/1999/xhtml"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-  <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
-
-<body  xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=359754">Mozilla Bug 359754</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-</body>
-
-<description>
-  Displays a numberbox which ranges from 5 to 10.
-</description>
-
-<textbox id="foo" type="number" min="5" max="10"/>
-
-
-<script class="testbody" type="application/javascript">
-
-function hitIt() {
-  sendKey("up", "foo");
-}
-
-SimpleTest.waitForExplicitFinish();
-
-/** Test for Bug 359754 **/
-setTimeout('document.getElementById("foo").focus()', 0);
-addLoadEvent(function() {
-
-// pay attention to our key events
-netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
-hitIt();
-is($("foo").value, "6", "value is now 6");
-
-hitIt();
-is($("foo").value, "7", "value is now 7");
-
-hitIt();
-is($("foo").value, "8", "value is now 8");
-
-hitIt();
-is($("foo").value, "9", "value is now 9");
-
-// now try to hit it past max
-hitIt();
-is($("foo").value, "10", "value is now 10");
-
-hitIt();
-is($("foo").value, "10", "value is now 10");
-
-hitIt();
-is($("foo").value, "10", "value is now 10");
-
-});
-
-addLoadEvent(SimpleTest.finish);
-</script>
-
-</window>