From d75fb0c29ad4196a8ab94034c400ed31b227a7bb Mon Sep 17 00:00:00 2001 From: ffxbld Date: Mon, 28 Jun 2010 20:01:25 -0700 Subject: [PATCH 01/11] Automated checkin: version bump remove "pre" from version number for firefox 4.0b1 release on GECKO20b1_20100628_RELBRANCH CLOSED TREE --HG-- branch : GECKO20b1_20100628_RELBRANCH --- browser/config/version.txt | 2 +- config/milestone.txt | 2 +- js/src/config/milestone.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/config/version.txt b/browser/config/version.txt index 2d2021b00593..e15fdb70cd02 100644 --- a/browser/config/version.txt +++ b/browser/config/version.txt @@ -1 +1 @@ -3.7a6pre +4.0b1 diff --git a/config/milestone.txt b/config/milestone.txt index 4f19240a7a81..8989558d1ccc 100644 --- a/config/milestone.txt +++ b/config/milestone.txt @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -1.9.3a6pre +2.0b1 diff --git a/js/src/config/milestone.txt b/js/src/config/milestone.txt index 4f19240a7a81..8989558d1ccc 100644 --- a/js/src/config/milestone.txt +++ b/js/src/config/milestone.txt @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -1.9.3a6pre +2.0b1 From 713ed5795a3a420d929121998445bc8fe63fdb24 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Mon, 28 Jun 2010 20:01:27 -0700 Subject: [PATCH 02/11] Added tag FIREFOX_4_0b1_BUILD1 for changeset 9874f5c5cb63. CLOSED TREE --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 75cb27deebfe..2ec7179158c4 100644 --- a/.hgtags +++ b/.hgtags @@ -38,3 +38,4 @@ fe9cc55b8db7f56f7e68a246acba363743854979 UPDATE_PACKAGING_R8 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R9 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R10 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R11 +9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_BUILD1 From 957682b3c7953a8aca09d00bb01809edd8c5f836 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Mon, 28 Jun 2010 20:01:29 -0700 Subject: [PATCH 03/11] Added tag FIREFOX_4_0b1_RELEASE for changeset 9874f5c5cb63. CLOSED TREE --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2ec7179158c4..3e62c2d3d64b 100644 --- a/.hgtags +++ b/.hgtags @@ -39,3 +39,4 @@ fe9cc55b8db7f56f7e68a246acba363743854979 UPDATE_PACKAGING_R8 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R10 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R11 9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_BUILD1 +9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_RELEASE From a545781f3db1565d52a5a96598f169611e1e5ffc Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Tue, 29 Jun 2010 11:38:21 -0700 Subject: [PATCH 04/11] Bug 575566: Feedback/TestPilot not packaged into windows installer for 4.0b1 build1. r=bsmedberg --HG-- branch : GECKO20b1_20100628_RELBRANCH --- browser/installer/package-manifest.in | 117 +++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index f2e733bc00d1..4ed1ffc518e7 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -365,7 +365,122 @@ @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png #if MOZ_UPDATE_CHANNEL == beta -@BINPATH@/extensions/testpilot@labs.mozilla.com/* +@BINPATH@/extensions/testpilot@labs.mozilla.com/chrome.manifest +@BINPATH@/extensions/testpilot@labs.mozilla.com/components/TestPilot.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/all-studies-window.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/all-studies-window.xul +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/browser.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/browser.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/debug.html +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/experiment-page.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/feedback-browser.xul +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.colorhelpers.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.colorhelpers.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.crosshair.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.crosshair.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.image.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.image.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.navigate.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.navigate.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.selection.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.selection.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.stack.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.stack.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.threshold.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.flot.threshold.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/flot/jquery.min.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/raw-data-dialog.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/raw-data-dialog.xul +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/screen.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/status-quit.html +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/status.html +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/survey-generator.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/take-survey.html +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/tp-browser.xul +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/welcome-page.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/welcome.html +@BINPATH@/extensions/testpilot@labs.mozilla.com/content/window-utils.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/defaults/preferences/preferences.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/install.rdf +@BINPATH@/extensions/testpilot@labs.mozilla.com/instrument/chrome.manifest +@BINPATH@/extensions/testpilot@labs.mozilla.com/instrument/install.rdf +@BINPATH@/extensions/testpilot@labs.mozilla.com/instrument/instrument.jsm +@BINPATH@/extensions/testpilot@labs.mozilla.com/instrument/instrument.xul +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/dbutils.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/experiment_data_store.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/extension-update.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/feedback.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/jar-code-store.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/cuddlefish.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/memory.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/observer-service.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/plain-text-console.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/preferences-service.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/securable-module.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/timer.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/traceback.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/unit-test.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/unload.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/lib/url.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/log4moz.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/metadata.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/Observers.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/remote-experiment-loader.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/setup.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/string_sanitizer.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/modules/tasks.js +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/badge-default.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/bg.jpg +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/css/screen-standalone.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/dino_32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/bg-status.jpg +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/callout.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/callout_continue.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/data1.jpg +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/data2.jpg +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_comments.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_computer.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_continue.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_quit.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_results.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_twitter.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/images/home_upcoming.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/logo.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/mozilla-logo.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/status-completed.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/status-ejected.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/status-missed.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/testpilot_16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/testPilot_200x200.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/testpilot_32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-completedstudies-32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-currentstudies-32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-generic-32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-learned-32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-results-48x48.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-settings-32x32.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-study-48x48.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/all/tp-submit-48x48.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/linux/close_button.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/linux/feedback-frown-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/linux/feedback-smile-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/linux/feedback.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/close_button.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/feedback-frown-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/feedback-smile-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/feedback.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/notification-tail-down.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/mac/notification-tail-up.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/close_button.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/feedback-frown-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/feedback-smile-16x16.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/feedback.css +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/notification-tail-down.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/skin/win/notification-tail-up.png +@BINPATH@/extensions/testpilot@labs.mozilla.com/tests/test_data_store.js #endif @BINPATH@/chrome/toolkit.jar @BINPATH@/chrome/toolkit.manifest From d7450e6138e1cb8c2198fb8c969a466880288ee3 Mon Sep 17 00:00:00 2001 From: Robert Strong Date: Tue, 29 Jun 2010 12:19:23 -0700 Subject: [PATCH 05/11] Bug 575524: browser_bug562890.js fails with other application extensions installed. r=dtownsend --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .../test/browser/browser_bug562890.js | 126 ++++++++++-------- 1 file changed, 68 insertions(+), 58 deletions(-) diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug562890.js b/toolkit/mozapps/extensions/test/browser/browser_bug562890.js index c555cb337323..a440d911203f 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_bug562890.js +++ b/toolkit/mozapps/extensions/test/browser/browser_bug562890.js @@ -1,58 +1,68 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -/** - * Tests the Preferences button for addons in list view - */ - -function test() { - waitForExplicitFinish(); - - var addonPrefsURI = TESTROOT + "addon_prefs.xul"; - - var gProvider = new MockProvider(); - gProvider.createAddons([{ - id: "test1@tests.mozilla.org", - name: "Test add-on 1", - description: "foo" - }, - { - id: "test2@tests.mozilla.org", - name: "Test add-on 2", - description: "bar", - optionsURL: addonPrefsURI - }]); - - open_manager(null, function(aWindow) { - var addonList = aWindow.document.getElementById("addon-list"); - var addonItem = addonList.childNodes[0]; - var prefsBtn = aWindow.document.getAnonymousElementByAttribute(addonItem, - "anonid", - "preferences-btn"); - is(prefsBtn.hidden, true, "Prefs button should be hidden for addon with no optionsURL set") - - addonItem = addonList.childNodes[1]; - prefsBtn = aWindow.document.getAnonymousElementByAttribute(addonItem, - "anonid", - "preferences-btn"); - is(prefsBtn.hidden, false, "Prefs button should be shown for addon with a optionsURL set") - - Services.ww.registerNotification(function(aSubject, aTopic, aData) { - if (aTopic == "domwindowclosed") { - Services.ww.unregisterNotification(arguments.callee); - } else if (aTopic == "domwindowopened") { - let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget); - win.documentURI, addonPrefsURI, "The correct addon pref window should open" - waitForFocus(function() { - win.close(); - aWindow.close(); - finish(); - }, win); - } - }); - - EventUtils.synthesizeMouse(prefsBtn, 2, 2, { }, aWindow); - }); - -} +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/** + * Tests the Preferences button for addons in list view + */ + +function test() { + waitForExplicitFinish(); + + var addonPrefsURI = TESTROOT + "addon_prefs.xul"; + + var gProvider = new MockProvider(); + gProvider.createAddons([{ + id: "test1@tests.mozilla.org", + name: "Test add-on 1", + description: "foo" + }, + { + id: "test2@tests.mozilla.org", + name: "Test add-on 2", + description: "bar", + optionsURL: addonPrefsURI + }]); + + open_manager(null, function(aWindow) { + var addonList = aWindow.document.getElementById("addon-list"); + for (var i = 0; i < addonList.childNodes.length; i++) { + var addonItem = addonList.childNodes[i]; + if (addonItem.hasAttribute("name") && + addonItem.getAttribute("name") == "Test add-on 1") + break; + } + var prefsBtn = aWindow.document.getAnonymousElementByAttribute(addonItem, + "anonid", + "preferences-btn"); + is(prefsBtn.hidden, true, "Prefs button should be hidden for addon with no optionsURL set") + + for (i = 0; i < addonList.childNodes.length; i++) { + addonItem = addonList.childNodes[i]; + if (addonItem.hasAttribute("name") && + addonItem.getAttribute("name") == "Test add-on 2") + break; + } + prefsBtn = aWindow.document.getAnonymousElementByAttribute(addonItem, + "anonid", + "preferences-btn"); + is(prefsBtn.hidden, false, "Prefs button should be shown for addon with a optionsURL set") + + Services.ww.registerNotification(function(aSubject, aTopic, aData) { + if (aTopic == "domwindowclosed") { + Services.ww.unregisterNotification(arguments.callee); + } else if (aTopic == "domwindowopened") { + let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget); + win.documentURI, addonPrefsURI, "The correct addon pref window should open" + waitForFocus(function() { + win.close(); + aWindow.close(); + finish(); + }, win); + } + }); + + EventUtils.synthesizeMouse(prefsBtn, 2, 2, { }, aWindow); + }); + +} From 66f45a02179a83a009af72e815d2cd29c61943dd Mon Sep 17 00:00:00 2001 From: Ben Parr Date: Tue, 29 Jun 2010 16:11:03 -0700 Subject: [PATCH 06/11] Bug 575559: Remove nsAddonRepository.js on updates. r=dtownsend --HG-- branch : GECKO20b1_20100628_RELBRANCH --- browser/installer/removed-files.in | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/installer/removed-files.in b/browser/installer/removed-files.in index 841be24fa947..d6fd236b37ef 100644 --- a/browser/installer/removed-files.in +++ b/browser/installer/removed-files.in @@ -47,6 +47,7 @@ components/history.xpt components/microsummaries.xpt components/myspell/en-US.aff components/myspell/en-US.dic +components/nsAddonRepository.js components/nsBackgroundUpdateService.js components/nsBookmarkTransactionManager.js components/nsCloseAllWindows.js From 5e86f08379d20f1fd299497d44c8fc7cbd1483a5 Mon Sep 17 00:00:00 2001 From: Jono S Xia Date: Tue, 29 Jun 2010 16:06:40 -0700 Subject: [PATCH 07/11] Bug 575597: Stop Feedback notifications from appearing early and make sure the toolbar button is immediately visible. r=dtownsend --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .../content/browser.js | 27 +++++++++++++++ .../modules/setup.js | 34 +------------------ .../modules/tasks.js | 7 ++-- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js index 5386664694f2..4641d68d99ac 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js @@ -150,6 +150,8 @@ var TestPilotMenuUtils; * after startup is complete. It's hacky, but the benefit is that * TestPilotSetup.onWindowLoad can treat all windows the same no matter * whether they opened with Firefox on startup or were opened later. */ + TestPilotWindowHandlers.setUpToolbarFeedbackButton(); + if (TestPilotSetup.startupComplete) { TestPilotSetup.onWindowLoad(window); } else { @@ -165,6 +167,31 @@ var TestPilotMenuUtils; } }, + setUpToolbarFeedbackButton: function() { + /* If this is first run, and it's ffx4 beta version, and the feedback + * button is not in the expected place, put it there! + * (copied from MozReporterButtons extension) */ + if (!window.document.getElementById("feedback-menu-happy-button")) { + return; + } + let firefoxnav = window.document.getElementById("nav-bar"); + let curSet = firefoxnav.currentSet; + + if (-1 == curSet.indexOf("feedback-menu-button")) { + // place the buttons after the search box. + let newSet = curSet + ",feedback-menu-button"; + + firefoxnav.setAttribute("currentset", newSet); + firefoxnav.currentSet = newSet; + window.document.persist("nav-bar", "currentset"); + // if you don't do the following call, funny things happen. + try { + BrowserToolboxCustomizeDone(true); + } catch (e) { + } + } + }, + onWindowUnload: function() { TestPilotSetup.onWindowUnload(window); } diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js index 7ddec9292d23..8be9462cff7e 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js @@ -213,35 +213,6 @@ let TestPilotSetup = { } }, - _setUpToolbarFeedbackButton: function TPS_toolbarFeedbackButton() { - /* If this is first run, and it's ffx4 beta version, and the feedback - * button is not in the expected place, put it there! - * (copied from MozReporterButtons extension) */ - let logger = this._logger; - try { - let win = this._getFrontBrowserWindow(); - let firefoxnav = win.document.getElementById("nav-bar"); - let curSet = firefoxnav.currentSet; - - if (-1 == curSet.indexOf("feedback-menu-button")) { - logger.info("Feedback toolbar button not present: Adding it."); - // place the buttons after the search box. - let newSet = curSet + ",feedback-menu-button"; - - firefoxnav.setAttribute("currentset", newSet); - firefoxnav.currentSet = newSet; - win.document.persist("nav-bar", "currentset"); - // if you don't do the following call, funny things happen. - try { - BrowserToolboxCustomizeDone(true); - } catch (e) { - } - } - } catch (e) { - logger.warn("Error in setUpToolbarFeedbackButton: " + e); - } - }, - globalStartup: function TPS__doGlobalSetup() { // Only ever run this stuff ONCE, on the first window restore. // Should get called by the Test Pilot component. @@ -296,11 +267,8 @@ let TestPilotSetup = { let url = self._prefs.getValue(FIRST_RUN_PREF, ""); let tab = browser.addTab(url); browser.selectedTab = tab; - } else { - // Don't show first run page in ffx4 beta version... but do - // set up the Feedback button in the toolbar. - self._setUpToolbarFeedbackButton(); } + // Don't show first run page in ffx4 beta version. } // Install tasks. (This requires knowing the version, so it is diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js index 3599154e9246..021aa923508e 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js @@ -209,6 +209,9 @@ var TestPilotTask = { }, changeStatus: function TPS_changeStatus(newStatus, suppressNotification) { + // TODO we always suppress notifications except when new status is + // "finished"; maybe remove that argument and only fire notification + // when status is "finished". let logger = Log4Moz.repository.getLogger("TestPilot.Task"); logger.info("Changing task " + this._id + " status to " + newStatus); this._status = newStatus; @@ -584,7 +587,7 @@ TestPilotExperiment.prototype = { this._reschedule(); } else { // Normal case is reset to new. - this.changeStatus(TaskConstants.STATUS_NEW); + this.changeStatus(TaskConstants.STATUS_NEW, true); // increment count of how many times this recurring test has run let numTimesRun = this._numTimesRun; @@ -610,7 +613,7 @@ TestPilotExperiment.prototype = { } // clear the data before starting. this._dataStore.wipeAllData(); - this.changeStatus(TaskConstants.STATUS_STARTING); + this.changeStatus(TaskConstants.STATUS_STARTING, true); Application.prefs.setValue(GUID_PREF_PREFIX + this._id, uuid); this.onExperimentStartup(); } From df9546f0dafead4313ebac9297632717da79f827 Mon Sep 17 00:00:00 2001 From: Jono S Xia Date: Wed, 30 Jun 2010 10:54:21 -0700 Subject: [PATCH 08/11] Bug 575767: Stop Feedback from collection data until the user has been notified. r=dtownsend --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .../modules/setup.js | 46 ++++++++++++------- .../modules/tasks.js | 28 +++++++---- 2 files changed, 48 insertions(+), 26 deletions(-) diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js index 8be9462cff7e..6ec33d51e4a9 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js @@ -62,7 +62,7 @@ let TestPilotSetup = { startupComplete: false, _shortTimer: null, _longTimer: null, - _remoteExperimentLoader: null, + _remoteExperimentLoader: null, // TODO make this a lazy initializer too? taskList: [], version: "", @@ -372,10 +372,16 @@ let TestPilotSetup = { iconClass, showSubmit, showAlwaysSubmitCheckbox, linkText, linkUrl, - isExtensionUpdate) { + isExtensionUpdate, + onCloseCallback) { + /* TODO: Refactor the arguments of this function, it's getting really + * unweildly.... maybe pass in an object, or even make a notification an + * object that you create and then call .show() on. */ + // If there are multiple windows, show notifications in the frontmost // window. - let doc = this._getFrontBrowserWindow().document; + let window = this._getFrontBrowserWindow(); + let doc = window.document; let popup = doc.getElementById("pilot-notification-popup"); let anchor; @@ -422,14 +428,14 @@ let TestPilotSetup = { "testpilot.notification.update")); submitBtn.onclick = function() { this._extensionUpdater.check(EXTENSION_ID); - self._hideNotification(); + self._hideNotification(window, onCloseCallback); }; } else { submitBtn.setAttribute("label", this._stringBundle.GetStringFromName("testpilot.submit")); // Functionality for submit button: submitBtn.onclick = function() { - self._hideNotification(); + self._hideNotification(window, onCloseCallback); if (showAlwaysSubmitCheckbox && alwaysSubmitCheckbox.checked) { self._prefs.setValue(ALWAYS_SUBMIT_DATA, true); } @@ -464,7 +470,7 @@ let TestPilotSetup = { } else { self._openChromeless(linkUrl); } - self._hideNotification(); + self._hideNotification(window, onCloseCallback); } }; link.setAttribute("hidden", false); @@ -473,7 +479,7 @@ let TestPilotSetup = { } closeBtn.onclick = function() { - self._hideNotification(); + self._hideNotification(window, onCloseCallback); }; // Show the popup: @@ -487,13 +493,19 @@ let TestPilotSetup = { window.TestPilotWindowUtils.openChromeless(url); }, - _hideNotification: function TPS__hideNotification() { - let window = this._getFrontBrowserWindow(); + _hideNotification: function TPS__hideNotification(window, onCloseCallback) { + /* Note - we take window as an argument instead of just using the frontmost + * window because the window order might have changed since the notification + * appeared and we want to be sure we close the notification in the same + * window as we opened it in! */ let popup = window.document.getElementById("pilot-notification-popup"); popup.hidden = true; popup.setAttribute("open", "false"); popup.removeAttribute("tpisextensionupdate"); popup.hidePopup(); + if (onCloseCallback) { + onCloseCallback(); + } }, _isShowingUpdateNotification : function() { @@ -543,11 +555,11 @@ let TestPilotSetup = { if (this._prefs.getValue(POPUP_SHOW_ON_NEW, false)) { for (i = 0; i < this.taskList.length; i++) { task = this.taskList[i]; - if (task.status == TaskConstants.STATUS_STARTING || + if (task.status == TaskConstants.STATUS_PENDING || task.status == TaskConstants.STATUS_NEW) { if (task.taskType == TaskConstants.TYPE_EXPERIMENT) { this._showNotification( - task, true, + task, false, this._stringBundle.formatStringFromName( "testpilot.notification.newTestPilotStudy.message", [task.title], 1), @@ -555,14 +567,16 @@ let TestPilotSetup = { "testpilot.notification.newTestPilotStudy"), "new-study", false, false, this._stringBundle.GetStringFromName("testpilot.moreInfo"), - task.defaultUrl); - // Having shown the notification, update task status so that this - // notification won't be shown again. - task.changeStatus(TaskConstants.STATUS_IN_PROGRESS, true); + task.defaultUrl, false, function() { + /* on close callback (Bug 575767) -- when the "new study + * starting" popup is dismissed, then the study can start. */ + task.changeStatus(TaskConstants.STATUS_IN_PROGRESS, true); + TestPilotSetup.reloadRemoteExperiments(); + }); return; } else if (task.taskType == TaskConstants.TYPE_SURVEY) { this._showNotification( - task, true, + task, false, this._stringBundle.formatStringFromName( "testpilot.notification.newTestPilotSurvey.message", [task.title], 1), diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js index 021aa923508e..fad488bc6668 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js @@ -203,6 +203,7 @@ var TestPilotTask = { }, onDetailPageOpened: function TestPilotTask_onDetailPageOpened(){ + // TODO fold this into loadPage()? }, checkDate: function TestPilotTask_checkDate() { @@ -444,14 +445,9 @@ TestPilotExperiment.prototype = { }, experimentIsRunning: function TestPilotExperiment_isRunning() { - if (this._optInRequired) { - return (this._status == TaskConstants.STATUS_STARTING || - this._status == TaskConstants.STATUS_IN_PROGRESS); - } else { - // Tests that don't require extra opt-in should start running even - // if you haven't seen them yet. - return (this._status < TaskConstants.STATUS_FINISHED); - } + // bug 575767 + return (this._status == TaskConstants.STATUS_STARTING || + this._status == TaskConstants.STATUS_IN_PROGRESS); }, // Pass events along to handlers: @@ -599,11 +595,23 @@ TestPilotExperiment.prototype = { } } - // No-opt-in required tests skip PENDING and go straight to STARTING. + // If the notify-on-new-study pref is turned off, and the test doesn't + // require opt-in, then it can jump straight ahead to STARTING. if (!this._optInRequired && - this._status < TaskConstants.STATUS_STARTING && + !Application.prefs.getValue("extensions.testpilot.popup.showOnNewStudy", + false) && + (this._status == TaskConstants.STATUS_NEW || + this._status == TaskConstants.STATUS_PENDING)) { + this._logger.info("Skipping pending and going straight to starting."); + this.changeStatus(TaskConstants.STATUS_STARTING, true); + } + + // If a study is STARTING, and we're in the right date range, + // then start it, and move it to IN_PROGRESS. + if ( this._status == TaskConstants.STATUS_STARTING && currentDate >= this._startDate && currentDate <= this._endDate) { + this._logger.info("Study now starting."); let uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); let uuid = uuidGenerator.generateUUID().toString(); From da56491d7fb178fcfd89196e1c9687b352144917 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Wed, 30 Jun 2010 13:03:44 -0700 Subject: [PATCH 09/11] Added tag FIREFOX_4_0b1_BUILD2 for changeset 65c30e4ee631. CLOSED TREE --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3e62c2d3d64b..0fcf7cb5e312 100644 --- a/.hgtags +++ b/.hgtags @@ -40,3 +40,4 @@ fe9cc55b8db7f56f7e68a246acba363743854979 UPDATE_PACKAGING_R8 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R11 9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_BUILD1 9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_RELEASE +65c30e4ee631158408970e91fd14b3924ab18497 FIREFOX_4_0b1_BUILD2 From 3431fc2a0b6e37fca4f390734a9b20242e0bcea9 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Wed, 30 Jun 2010 13:03:47 -0700 Subject: [PATCH 10/11] Added tag FIREFOX_4_0b1_RELEASE for changeset 65c30e4ee631. CLOSED TREE --HG-- branch : GECKO20b1_20100628_RELBRANCH --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index 0fcf7cb5e312..1ec25f63e55e 100644 --- a/.hgtags +++ b/.hgtags @@ -41,3 +41,5 @@ fe9cc55b8db7f56f7e68a246acba363743854979 UPDATE_PACKAGING_R8 9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_BUILD1 9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_RELEASE 65c30e4ee631158408970e91fd14b3924ab18497 FIREFOX_4_0b1_BUILD2 +9874f5c5cb630dee83d80aa1d8565cfe0269f9fe FIREFOX_4_0b1_RELEASE +65c30e4ee631158408970e91fd14b3924ab18497 FIREFOX_4_0b1_RELEASE