From a3a9a2c311afc9d76e4e6bfc036e5897fa988bc1 Mon Sep 17 00:00:00 2001 From: "ctalbert@mozilla.com" Date: Mon, 10 Sep 2007 15:01:06 -0700 Subject: [PATCH] Bug 395466 Checking in patch by Ben_H for QA Extension --- testing/extensions/community/README | 2 +- testing/extensions/community/build.xml | 33 +- testing/extensions/community/chrome.manifest | 8 +- .../community/chrome/content/accountcreate.js | 188 +++---- .../chrome/content/accountcreate.xul | 138 ++--- .../chrome/content/browserOverlays.xul | 104 ++-- .../community/chrome/content/common.js | 218 ++++---- .../community/chrome/content/litmus.js | 493 +++++++++--------- .../chrome/content/litmusReporter.js | 392 +++++++------- .../community/chrome/content/notifications.js | 436 ++++++++-------- .../community/chrome/content/prefs.js | 218 ++++---- .../extensions/community/chrome/content/qa.js | 55 +- .../community/chrome/content/qa.xul | 94 ++-- .../community/chrome/content/settings.js | 466 ++++++++--------- .../community/chrome/content/setup.xul | 90 ++-- .../chrome/content/tabs/bugAccess.js | 325 ++++++++++++ .../community/chrome/content/tabs/bugzilla.js | 205 ++++++++ .../chrome/content/tabs/bugzilla.xul | 160 +++--- .../community/chrome/content/tabs/chat.xul | 108 ++-- .../community/chrome/content/tabs/help.xul | 76 +-- .../community/chrome/content/tabs/litmus.xul | 189 +++---- .../community/chrome/content/tabs/qmo.js | 206 ++++---- .../community/chrome/content/tabs/qmo.xul | 117 +++-- .../chrome/content/tabs/selecttests.js | 115 ++-- .../chrome/content/tabs/selecttests.xul | 158 +++--- .../chrome/content/tabs/settings.xul | 117 +++-- .../community/chrome/locale/en-US/qa.dtd | 131 +++-- .../chrome/locale/en-US/qa.properties | 38 +- .../chrome/locale/en-US/urls.properties | 37 ++ .../community/chrome/skin/browserOverlays.css | 42 +- .../community/chrome/skin/highlight-end.png | Bin 0 -> 3112 bytes .../chrome/skin/highlight-hover-end.png | Bin 0 -> 3104 bytes .../chrome/skin/highlight-hover-mid.png | Bin 0 -> 2859 bytes .../chrome/skin/highlight-hover-start.png | Bin 0 -> 3143 bytes .../community/chrome/skin/highlight-mid.png | Bin 0 -> 2864 bytes .../community/chrome/skin/highlight-start.png | Bin 0 -> 3169 bytes .../extensions/community/chrome/skin/qa.css | 404 +++++++------- .../community/defaults/preferences/qa.js | 40 +- testing/extensions/community/install.rdf | 40 +- .../extensions/community/jar-chrome.manifest | 9 +- .../platform/Darwin/chrome/skin/platform.css | 77 ++- .../platform/WINNT/chrome/skin/platform.css | 5 + 42 files changed, 3219 insertions(+), 2315 deletions(-) create mode 100644 testing/extensions/community/chrome/content/tabs/bugAccess.js create mode 100644 testing/extensions/community/chrome/content/tabs/bugzilla.js create mode 100644 testing/extensions/community/chrome/skin/highlight-end.png create mode 100644 testing/extensions/community/chrome/skin/highlight-hover-end.png create mode 100644 testing/extensions/community/chrome/skin/highlight-hover-mid.png create mode 100644 testing/extensions/community/chrome/skin/highlight-hover-start.png create mode 100644 testing/extensions/community/chrome/skin/highlight-mid.png create mode 100644 testing/extensions/community/chrome/skin/highlight-start.png diff --git a/testing/extensions/community/README b/testing/extensions/community/README index cd76bd095bd3..19ec137979d8 100644 --- a/testing/extensions/community/README +++ b/testing/extensions/community/README @@ -8,4 +8,4 @@ License is MPL 1.1/GPL 2.0/LGPL 2.1 tri-license as described in the various srouce files. MochiKit (c) 2005 Bob Ippolito, Academic Free License. Chatzilla (used under MPL/GPL) is modified slightly to run in a different chrome path to not -conflict with standard installations. \ No newline at end of file +conflict with standard installations. diff --git a/testing/extensions/community/build.xml b/testing/extensions/community/build.xml index fde69ffdba9b..51092f928e70 100644 --- a/testing/extensions/community/build.xml +++ b/testing/extensions/community/build.xml @@ -1,33 +1,32 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + diff --git a/testing/extensions/community/chrome.manifest b/testing/extensions/community/chrome.manifest index 909ab9192085..54435ab05c43 100644 --- a/testing/extensions/community/chrome.manifest +++ b/testing/extensions/community/chrome.manifest @@ -1,10 +1,10 @@ -content qa chrome/content/ -skin qa classic/1.0 chrome/skin/ -locale qa en-US chrome/locale/en-US/ +content qa chrome/content/ +skin qa classic/1.0 chrome/skin/ +locale qa en-US chrome/locale/en-US/ overlay chrome://browser/content/browser.xul chrome://qa/content/browserOverlays.xul content chatzilla_qa jar:chatzilla.jar!/content/chatzilla/ skin chatzilla_qa modern/1.0 jar:chatzilla.jar!/skin/modern/chatzilla/ locale chatzilla_qa en-US jar:chatzilla.jar!/locale/en-US/chatzilla/ -content chatzillaservice_qa components/chatzilla-service.js \ No newline at end of file +content chatzillaservice_qa components/chatzilla-service.js diff --git a/testing/extensions/community/chrome/content/accountcreate.js b/testing/extensions/community/chrome/content/accountcreate.js index 126036e8296e..9badb3f9cc0e 100644 --- a/testing/extensions/community/chrome/content/accountcreate.js +++ b/testing/extensions/community/chrome/content/accountcreate.js @@ -1,108 +1,80 @@ - - -var accountCreate = { - oldPassword: null, //TODO: is this secure? - oldUsername: null, - updateFunction : null, - loadSetup : function() { - document.getElementById('qa-setup-createaccount-iframe').src = - litmus.baseURL+'extension.cgi?createAccount=1'; - accountCreate.updateFunction = window.arguments[0]; - - accountCreate.oldPassword = qaPref.litmus.getPassword(); - accountCreate.oldUsername = qaPref.litmus.getUsername(); - }, - validateAccount : function() { - // we're creating a new account, so get the uname and passwd - // from the account created page: - var page = document.getElementById('qa-setup-createaccount-iframe'). - contentDocument; - if (!page) { - alert("create account page is missing"); - return false; - } - if (page.wrappedJSObject == null) - page.wrappedJSObject = page; - if (page.forms[0] && page.forms[0].wrappedJSObject == null) - page.forms[0].wrappedJSObject = page.forms[0]; - - if (page.location == litmus.baseURL+'extension.cgi?createAccount=1' - && qaSetup.didSubmitForm==0) { - page.forms[0].wrappedJSObject.submit(); - qaSetup.didSubmitForm = 1; - setTimeout("qaSetup.validateAccount()", 5000); - return false; - } - if (qaSetup.didSubmitForm == 1 && ! page.forms || - ! page.forms[0].wrappedJSObject || - ! page.forms[0].wrappedJSObject.email && - ! page.forms[0].wrappedJSObject.email.value) - {qaSetup.didSubmitForm = 2; - setTimeout("qaSetup.validateAccount()", 4000); - return false;} - var e = ''; - var p = ''; - if (page.forms && page.forms[0].wrappedJSObject && - page.forms[0].wrappedJSObject.email && - page.forms[0].wrappedJSObject.email.value) - { e=page.forms[0].wrappedJSObject.email.value } - if (page.forms && page.forms[0].wrappedJSObject && - page.forms[0].wrappedJSObject.password && - page.forms[0].wrappedJSObject.password.value) - { p=page.forms[0].wrappedJSObject.password.value } - // e is account, p is password - - var uname = e; - var passwd = p; - - - if (e == '' || p == '') { - alert("No username or password has been registered."); - return false; //we need better error handling. - } - qaPref.litmus.setPassword(uname, passwd); - accountCreate.updateFunction(); - - // TODO: ideally we would validate against litmus, but... - return true; - }, - - handleCancel : function() { - qaPref.litmus.setPassword(oldUsername, oldPassword); - } -} + - - - - - - - - + @@ -89,13 +101,11 @@ - + - + - - - \ No newline at end of file + diff --git a/testing/extensions/community/chrome/content/settings.js b/testing/extensions/community/chrome/content/settings.js index 7699e02836e2..df760e1c832e 100755 --- a/testing/extensions/community/chrome/content/settings.js +++ b/testing/extensions/community/chrome/content/settings.js @@ -19,6 +19,7 @@ * * Contributor(s): * Zach Lipton + * Ben Hsieh * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -36,247 +37,234 @@ var qaPrefsWindow = { - lastSelectedTab : null, - - onSwitchTab : function() { - var newSelection = $('qa_tabrow').selectedItem; - - // user is switching to the prefs tab: - if ($('qa_tabrow').selectedItem == $('qa-tabbar-prefs')) { - qaPrefsWindow.loadPrefsWindow(); - } - - // user is switching away from the prefs tab: - if (qaPrefsWindow.lastSelectedTab != null && - qaPrefsWindow.lastSelectedTab == $('qa-tabbar-prefs')) { - qaPrefsWindow.savePrefsWindow(); - } - - qaPrefsWindow.lastSelectedTab = newSelection; - }, + lastSelectedTab : null, - loadPrefsWindow : function() { - prefsTabOpen = true; - document.getElementById('qa-preferences-litmus-username').value = - qaPref.litmus.getUsername() || ''; - document.getElementById('qa-preferences-litmus-password').value = - qaPref.litmus.getPassword() || ''; - - // load notification settings: - var prefs = qaPref.getPref(qaPref.prefBase+'.notificationSettings', 'char'); - prefs = prefs.split(","); - var notify = $('qa-prefs-notify').childNodes; - var prefCounter = 0; - for (var i=0; i + @@ -49,7 +49,7 @@ width="850" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> - + @@ -79,22 +79,22 @@ - + - +