Bug 911864 - Convert toolkit widget xul tests to chrome tests. r=smaug, a=bajaj
authorBobby Holley <bobbyholley@gmail.com>
Fri, 01 Nov 2013 15:31:56 +0100
changeset 167436 1a11cd391d5c2c2addeac3ece74a325379ba9655
parent 167435 5d4bce7354108984783f904f557dd1bb1f7c4069
child 167437 601188bdcabf6c3c83ce5a2c91a71dd95719fc33
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, bajaj
bugs911864
milestone27.0a2
Bug 911864 - Convert toolkit widget xul tests to chrome tests. r=smaug, a=bajaj We also remove test_menubar_gtk.xul, which is unreferenced by the build system and references a file that doesn't exist in the tree.
toolkit/content/tests/widgets/Makefile.in
toolkit/content/tests/widgets/chrome.ini
toolkit/content/tests/widgets/test_contextmenu_nested.xul
toolkit/content/tests/widgets/test_menubar.xul
toolkit/content/tests/widgets/test_menubar_gtk.xul
toolkit/content/tests/widgets/test_popupanchor.xul
toolkit/content/tests/widgets/window_menubar.xul
--- a/toolkit/content/tests/widgets/Makefile.in
+++ b/toolkit/content/tests/widgets/Makefile.in
@@ -1,18 +1,16 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MOCHITEST_FILES =	\
-		test_contextmenu_nested.xul \
 		tree_shared.js \
 		test_mousecapture_area.html \
-		popup_shared.js \
 		test_videocontrols.html \
 		test_videocontrols_audio.html \
 		test_videocontrols_video_direction.html \
 		test_videocontrols_audio_direction.html \
 		test_audiocontrols_dimensions.html \
 		videocontrols_direction-1-ref.html \
 		videocontrols_direction-1a.html \
 		videocontrols_direction-1b.html \
@@ -27,20 +25,8 @@ MOCHITEST_FILES =	\
 		videocontrols_direction-2e.html \
 		videocontrols_direction_test.js \
 		$(topsrcdir)/content/media/test/audio.wav \
 		$(topsrcdir)/browser/base/content/test/general/audio.ogg \
 		$(topsrcdir)/content/media/test/seek_with_sound.ogg \
 		videomask.css \
 		test_bug898940.html \
 		$(NULL)
-
-ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-MOCHITEST_FILES += test_menubar.xul \
-               window_menubar.xul
-endif
-
-# popup anchor tests don't work on android.
-ifneq (android,$(MOZ_WIDGET_TOOLKIT))
-MOCHITEST_FILES += \
-		test_popupanchor.xul \
-		$(NULL)
-endif
--- a/toolkit/content/tests/widgets/chrome.ini
+++ b/toolkit/content/tests/widgets/chrome.ini
@@ -1,6 +1,14 @@
 [DEFAULT]
-support-files = tree_shared.js
+support-files =
+  tree_shared.js
+  popup_shared.js
+  window_menubar.xul
 
+[test_contextmenu_nested.xul]
 [test_editor_currentURI.xul]
+[test_menubar.xul]
+skip-if = os == 'mac'
+[test_popupanchor.xul]
+skip-if = os == 'android'
 [test_popupreflows.xul]
 [test_tree_column_reorder.xul]
--- a/toolkit/content/tests/widgets/test_contextmenu_nested.xul
+++ b/toolkit/content/tests/widgets/test_contextmenu_nested.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"?>
 
 <window title="Nested Context Menu Tests"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <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="popup_shared.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>
 
 <menupopup id="outercontext">
   <menuitem label="Context One"/>
   <menu id="outercontextmenu" label="Sub">
     <menupopup id="innercontext">
       <menuitem id="innercontextmenu" label="Sub Context One"/>
     </menupopup>
   </menu>
--- a/toolkit/content/tests/widgets/test_menubar.xul
+++ b/toolkit/content/tests/widgets/test_menubar.xul
@@ -3,17 +3,17 @@
 <?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
 
 <window title="Menubar 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>Menubar Popup Tests</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
 <script>
 SimpleTest.waitForExplicitFinish();
 function runTest()
 {
   window.open("window_menubar.xul", "_blank", "width=600,height=600");
 }
 </script>
deleted file mode 100644
--- a/toolkit/content/tests/widgets/test_menubar_gtk.xul
+++ /dev/null
@@ -1,30 +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"?>
-
-<window title="Menubar 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>Menubar Popup Tests</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
-
-<script>
-SimpleTest.waitForExplicitFinish();
-function runTest()
-{
-  window.open("window_menubar_gtk.xul", "_blank", "width=600,height=600");
-}
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>
--- a/toolkit/content/tests/widgets/test_popupanchor.xul
+++ b/toolkit/content/tests/widgets/test_popupanchor.xul
@@ -8,17 +8,17 @@
 
   <title>Popup Popup Tests</title>
 
   <panel id="testPanel"
          type="arrow"
          noautohide="true">
   </panel>
 
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
 <script>
 <![CDATA[
 var anchor, panel, arrow;
 
 function is_close(got, exp, msg) {
   // on some platforms we see differences of a fraction of a pixel - so
   // allow any difference of < 1 pixels as being OK.
--- a/toolkit/content/tests/widgets/window_menubar.xul
+++ b/toolkit/content/tests/widgets/window_menubar.xul
@@ -4,18 +4,18 @@
 <!-- the condition in the focus event handler is because pressing Tab
      unfocuses and refocuses the window on Windows -->
 
 <window title="Popup Tests"
   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="/tests/SimpleTest/EventUtils.js"></script>      
-  <script type="application/javascript" src="popup_shared.js"></script>      
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="popup_shared.js"></script>
 
 <!--
   Need to investigate these tests a bit more. Some of the accessibility events
   are firing multiple times or in different orders in different circumstances.
   Note that this was also the case before bug 279703.
   -->
 
 <hbox style="margin-left: 275px; margin-top: 275px;">