Bug 601194 - Update fennec browser-chrome tests for mochikit.jar [r=mbrubeck]
authorJoel Maher <jmaher>
Fri, 01 Oct 2010 11:33:00 -0700
changeset 66773 967d0094cf3715b2e69da55530220b8e4f9ca4a8
parent 66772 1c4bec548d2078f444a689dfddfbf8b9c341c058
child 66774 98eda2ad1aefe0794586013523fff71916d68afb
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs601194
Bug 601194 - Update fennec browser-chrome tests for mochikit.jar [r=mbrubeck]
mobile/chrome/tests/browser_bookmarks.js
mobile/chrome/tests/browser_bookmarks_star.js
mobile/chrome/tests/browser_bookmarks_tags.js
mobile/chrome/tests/browser_click_content.js
mobile/chrome/tests/browser_forms.js
mobile/chrome/tests/browser_navigation.js
mobile/chrome/tests/browser_select.js
mobile/chrome/tests/browser_sessionstore.js
mobile/chrome/tests/browser_tabs.js
mobile/chrome/tests/browser_tapping.js
mobile/chrome/tests/browser_viewport.js
mobile/chrome/tests/head.js
--- a/mobile/chrome/tests/browser_bookmarks.js
+++ b/mobile/chrome/tests/browser_bookmarks.js
@@ -1,16 +1,16 @@
 /*
  * Bug 486490 - Fennec browser-chrome tests to verify correct implementation of chrome
  *              code in mobile/chrome/content in terms of integration with Places
  *              component, specifically for bookmark management.
  */
 
-var testURL_01 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
-var testURL_02 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_02.html";
+var testURL_01 = chromeRoot + "browser_blank_01.html";
+var testURL_02 = chromeRoot + "browser_blank_02.html";
 
 // A queue to order the tests and a handle for each test
 var gTests = [];
 var gCurrentTest = null;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
--- a/mobile/chrome/tests/browser_bookmarks_star.js
+++ b/mobile/chrome/tests/browser_bookmarks_star.js
@@ -1,16 +1,16 @@
 /*
  * Bug 486490 - Fennec browser-chrome tests to verify correct implementation of chrome 
  *              code in mobile/chrome/content in terms of integration with Places
  *              component, specifically for bookmark management.
  */
 
-var testURL_01 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
-var testURL_02 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_02.html";
+var testURL_01 = chromeRoot + "browser_blank_01.html";
+var testURL_02 = chromeRoot + "browser_blank_02.html";
 
 // A queue to order the tests and a handle for each test
 var gTests = [];
 var gCurrentTest = null;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
--- a/mobile/chrome/tests/browser_bookmarks_tags.js
+++ b/mobile/chrome/tests/browser_bookmarks_tags.js
@@ -1,16 +1,16 @@
 /*
  * Bug 486490 - Fennec browser-chrome tests to verify correct implementation of chrome
  *              code in mobile/chrome/content in terms of integration with Places
  *              component, specifically for bookmark management.
  */
 
-var testURL_01 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
-var testURL_02 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_02.html";
+var testURL_01 = chromeRoot + "browser_blank_01.html";
+var testURL_02 = chromeRoot + "browser_blank_02.html";
 
 // A queue to order the tests and a handle for each test
 var gTests = [];
 var gCurrentTest = null;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
--- a/mobile/chrome/tests/browser_click_content.js
+++ b/mobile/chrome/tests/browser_click_content.js
@@ -1,9 +1,9 @@
-let testURL_click = "chrome://mochikit/content/browser/mobile/chrome/browser_click_content.html";
+let testURL_click = chromeRoot + "browser_click_content.html";
 
 let currentTab;
 let element;
 let isClickFired = false;
 let clickPosition = { x: null, y: null};
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
--- a/mobile/chrome/tests/browser_forms.js
+++ b/mobile/chrome/tests/browser_forms.js
@@ -1,10 +1,10 @@
-let testURL = "chrome://mochikit/content/browser/mobile/chrome/browser_forms.html";
-messageManager.loadFrameScript("chrome://mochikit/content/browser/mobile/chrome/remote_forms.js", true);
+let testURL = chromeRoot + "browser_forms.html";
+messageManager.loadFrameScript(chromeRoot + "remote_forms.js", true);
 
 let newTab = null;
 let isLoading = function() {
   return !newTab.isLoading() && newTab.browser.currentURI.spec != "about:blank";
 };
 
 function test() {
   // This test is async
--- a/mobile/chrome/tests/browser_navigation.js
+++ b/mobile/chrome/tests/browser_navigation.js
@@ -1,12 +1,12 @@
-var testURL_01 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
-var testURL_02 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_02.html";
-var testURL_03 = "chrome://mochikit/content/browser/mobile/chrome/browser_english_title.html";
-var testURL_04 = "chrome://mochikit/content/browser/mobile/chrome/browser_no_title.html";
+var testURL_01 = chromeRoot + "browser_blank_01.html";
+var testURL_02 = chromeRoot + "browser_blank_02.html";
+var testURL_03 = chromeRoot + "browser_english_title.html";
+var testURL_04 = chromeRoot + "browser_no_title.html";
 var pngURL = "data:image/gif;base64,R0lGODlhCwALAIAAAAAA3pn/ZiH5BAEAAAEALAAAAAALAAsAAAIUhA+hkcuO4lmNVindo7qyrIXiGBYAOw==";
 
 // A queue to order the tests and a handle for each test
 var gTests = [];
 var gCurrentTest = null;
 
 var back = document.getElementById("tool-back");
 var forward = document.getElementById("tool-forward");
--- a/mobile/chrome/tests/browser_select.js
+++ b/mobile/chrome/tests/browser_select.js
@@ -1,9 +1,9 @@
-let testURL = "chrome://mochikit/content/browser/mobile/chrome/browser_select.html";
+let testURL = chromeRoot + "browser_select.html";
 let new_tab = null;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
   // This test is async
   waitForExplicitFinish();
 
--- a/mobile/chrome/tests/browser_sessionstore.js
+++ b/mobile/chrome/tests/browser_sessionstore.js
@@ -1,9 +1,9 @@
-var testURL = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
+var testURL = chromeRoot + "browser_blank_01.html";
 
 // A queue to order the tests and a handle for each test
 var gTests = [];
 var gCurrentTest = null;
 var ss = null;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
--- a/mobile/chrome/tests/browser_tabs.js
+++ b/mobile/chrome/tests/browser_tabs.js
@@ -1,11 +1,11 @@
-let testURL_01 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
-let testURL_02 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_02.html";
-let testURL_03 = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html#tab3";
+let testURL_01 = chromeRoot + "browser_blank_01.html";
+let testURL_02 = chromeRoot + "browser_blank_02.html";
+let testURL_03 = chromeRoot + "browser_blank_01.html#tab3";
 
 let new_tab_01;
 let new_tab_02;
 let new_tab_03;
 
 //------------------------------------------------------------------------------
 // Entry point (must be named "test")
 function test() {
--- a/mobile/chrome/tests/browser_tapping.js
+++ b/mobile/chrome/tests/browser_tapping.js
@@ -1,14 +1,14 @@
 /*
  * Testing the tapping interactions:
  *   single tap, double tap & long tap
  */
 
-let testURL = "chrome://mochikit/content/browser/mobile/chrome/browser_tap_content.html";
+let testURL = chromeRoot + "browser_tap_content.html";
 
 let gTests = [];
 let gCurrentTest = null;
 let gCurrentTab;
 
 let gEvents = [];
 function dumpEvents(aEvent) {
   gEvents.push(aEvent.type);
--- a/mobile/chrome/tests/browser_viewport.js
+++ b/mobile/chrome/tests/browser_viewport.js
@@ -33,20 +33,19 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-
-let testURL_blank = "chrome://mochikit/content/browser/mobile/chrome/browser_blank_01.html";
+let testURL_blank = chromeRoot + "browser_blank_01.html";
 let testURL = function testURL(n) {
-  return "chrome://mochikit/content/browser/mobile/chrome/browser_viewport_" +
+  return chromeRoot + "browser_viewport_" +
          (n<10 ? "0" : "") + n + ".html";
 }
 
 let working_tab;
 function pageLoaded(url) {
   dump("------- pageLoaded: " + url + "\n")
   return function() {
     dump("------- waiting for pageLoaded: " + working_tab.browser.currentURI.spec + "\n")
--- a/mobile/chrome/tests/head.js
+++ b/mobile/chrome/tests/head.js
@@ -62,10 +62,11 @@ let AsyncTests = {
   receiveMessage: function(aMessage) {
     let test = this._tests[aMessage.name];
     let callback = test.shift();
     if (callback)
       callback(aMessage.json);
   }
 };
 
-messageManager.loadFrameScript("chrome://mochikit/content/browser/mobile/chrome/remote_head.js", true);
+let chromeRoot = getRootDirectory(gTestPath);
+messageManager.loadFrameScript(chromeRoot + "remote_head.js", true);
 messageManager.loadFrameScript("chrome://mochikit/content/tests/SimpleTest/EventUtils.js", true);