mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge fx-team to mozilla-central a=merge
This commit is contained in:
commit
390422817c
@ -677,7 +677,9 @@ let MozLoopServiceInternal = {
|
||||
// Make the call to get the GUEST session regardless of whether the FXA
|
||||
// request fails.
|
||||
|
||||
this._getCalls(LOOP_SESSION_TYPE.FXA, version).catch(() => {});
|
||||
if (MozLoopService.userProfile) {
|
||||
this._getCalls(LOOP_SESSION_TYPE.FXA, version).catch(() => {});
|
||||
}
|
||||
this._getCalls(LOOP_SESSION_TYPE.GUEST, version).catch(
|
||||
error => {this._hawkRequestError(error);});
|
||||
},
|
||||
|
@ -52,6 +52,10 @@ function run_test()
|
||||
{
|
||||
setupFakeLoopServer();
|
||||
|
||||
// Setup fake login (profile) state so we get FxA requests.
|
||||
const serviceGlobal = Cu.import("resource:///modules/loop/MozLoopService.jsm", {});
|
||||
serviceGlobal.gFxAOAuthProfile = {email: "test@example.com", uid: "abcd1234"};
|
||||
|
||||
// For each notification received from the PushServer, MozLoopService will first query
|
||||
// for any pending calls on the FxA hawk session and then again using the guest session.
|
||||
// A pair of response objects in the callsResponses array will be consumed for each
|
||||
@ -97,6 +101,9 @@ function run_test()
|
||||
// Revert original Chat.open implementation
|
||||
Chat.open = openChatOrig;
|
||||
|
||||
// Revert fake login state
|
||||
serviceGlobal.gFxAOAuthProfile = null;
|
||||
|
||||
// clear test pref
|
||||
Services.prefs.clearUserPref("loop.seenToS");
|
||||
});
|
||||
|
@ -3,6 +3,7 @@
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --with-google-api-keyfile=/builds/gapi.data
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.linux32
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --with-google-api-keyfile=/builds/gapi.data
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.linux
|
||||
|
||||
|
@ -8,6 +8,7 @@ ac_add_options --enable-application=browser
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --with-google-api-keyfile=/builds/gapi.data
|
||||
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
@ -14,6 +14,12 @@ else
|
||||
fi
|
||||
ac_add_options --with-google-api-keyfile=${_gapi_keyfile}
|
||||
|
||||
if [ -f /c/builds/google-oauth-api.key ]; then
|
||||
_google_oauth_api_keyfile=/c/builds/google-oauth-api.key
|
||||
else
|
||||
_google_oauth_api_keyfile=/e/builds/google-oauth-api.key
|
||||
fi
|
||||
ac_add_options --with-google-api-keyfile=${_google_oauth_api_keyfile}
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
@ -12,6 +12,13 @@ else
|
||||
fi
|
||||
ac_add_options --with-google-api-keyfile=${_gapi_keyfile}
|
||||
|
||||
if [ -f /c/builds/google-oauth-api.key ]; then
|
||||
_google_oauth_api_keyfile=/c/builds/google-oauth-api.key
|
||||
else
|
||||
_google_oauth_api_keyfile=/e/builds/google-oauth-api.key
|
||||
fi
|
||||
ac_add_options --with-google-api-keyfile=${_google_oauth_api_keyfile}
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
||||
|
@ -98,7 +98,10 @@ this.UITour = {
|
||||
["help", {query: "#PanelUI-help"}],
|
||||
["home", {query: "#home-button"}],
|
||||
["loop", {query: "#loop-call-button"}],
|
||||
["forget", {query: "#panic-button"}],
|
||||
["forget", {
|
||||
query: "#panic-button",
|
||||
widgetName: "panic-button",
|
||||
allowAdd: true }],
|
||||
["privateWindow", {query: "#privatebrowsing-button"}],
|
||||
["quit", {query: "#PanelUI-quit"}],
|
||||
["search", {
|
||||
@ -434,6 +437,15 @@ this.UITour = {
|
||||
ResetProfile.openConfirmationDialog(window);
|
||||
break;
|
||||
}
|
||||
|
||||
case "addNavBarWidget": {
|
||||
// Add a widget to the toolbar
|
||||
let targetPromise = this.getTarget(window, data.name);
|
||||
targetPromise.then(target => {
|
||||
this.addNavBarWidget(target, contentDocument, data.callbackID);
|
||||
}).then(null, Cu.reportError);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.originTabs.has(window))
|
||||
@ -698,6 +710,7 @@ this.UITour = {
|
||||
removeTargetListener: targetObject.removeTargetListener,
|
||||
targetName: aTargetName,
|
||||
widgetName: targetObject.widgetName,
|
||||
allowAdd: targetObject.allowAdd,
|
||||
});
|
||||
}).then(null, Cu.reportError);
|
||||
return deferred.promise;
|
||||
@ -1177,6 +1190,24 @@ this.UITour = {
|
||||
});
|
||||
},
|
||||
|
||||
addNavBarWidget: function (aTarget, aContentDocument, aCallbackID) {
|
||||
if (aTarget.node) {
|
||||
Cu.reportError("UITour: can't add a widget already present: " + data.target);
|
||||
return;
|
||||
}
|
||||
if (!aTarget.allowAdd) {
|
||||
Cu.reportError("UITour: not allowed to add this widget: " + data.target);
|
||||
return;
|
||||
}
|
||||
if (!aTarget.widgetName) {
|
||||
Cu.reportError("UITour: can't add a widget without a widgetName property: " + data.target);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomizableUI.addWidgetToArea(aTarget.widgetName, CustomizableUI.AREA_NAVBAR);
|
||||
this.sendPageCallback(aContentDocument, aCallbackID);
|
||||
},
|
||||
|
||||
_addAnnotationPanelMutationObserver: function(aPanelEl) {
|
||||
#ifdef XP_LINUX
|
||||
let observer = this._annotationPanelMutationObservers.get(aPanelEl);
|
||||
|
@ -277,6 +277,31 @@ let tests = [
|
||||
|
||||
gContentAPI.getConfiguration("appinfo", callback);
|
||||
},
|
||||
function test_addToolbarButton(done) {
|
||||
let placement = CustomizableUI.getPlacementOfWidget("panic-button");
|
||||
is(placement, null, "default UI has panic button in the palette");
|
||||
|
||||
gContentAPI.getConfiguration("availableTargets", (data) => {
|
||||
let available = (data.targets.indexOf("forget") != -1);
|
||||
ok(!available, "Forget button should not be available by default");
|
||||
|
||||
gContentAPI.addNavBarWidget("forget", () => {
|
||||
info("addNavBarWidget callback successfully called");
|
||||
|
||||
let placement = CustomizableUI.getPlacementOfWidget("panic-button");
|
||||
is(placement.area, CustomizableUI.AREA_NAVBAR);
|
||||
|
||||
gContentAPI.getConfiguration("availableTargets", (data) => {
|
||||
let available = (data.targets.indexOf("forget") != -1);
|
||||
ok(available, "Forget button should now be available");
|
||||
|
||||
// Cleanup
|
||||
CustomizableUI.removeWidgetFromArea("panic-button");
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// Make sure this test is last in the file so the appMenu gets left open and done will confirm it got tore down.
|
||||
function cleanupMenus(done) {
|
||||
|
@ -183,4 +183,11 @@ if (typeof Mozilla == 'undefined') {
|
||||
_sendEvent('resetFirefox');
|
||||
};
|
||||
|
||||
Mozilla.UITour.addNavBarWidget= function(name, callback) {
|
||||
_sendEvent('addNavBarWidget', {
|
||||
name: name,
|
||||
callbackID: _waitForCallback(callback),
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -13,7 +13,7 @@
|
||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#D7D7DC"/>
|
||||
<solid android:color="@color/new_tablet_highlight"/>
|
||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
||||
</shape>
|
||||
</inset>
|
||||
@ -28,7 +28,7 @@
|
||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#C0C9D0"/>
|
||||
<solid android:color="@color/new_tablet_highlight_focused"/>
|
||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
||||
</shape>
|
||||
</inset>
|
||||
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!-- private pressed state -->
|
||||
<item gecko:state_private="true"
|
||||
android:state_pressed="true"
|
||||
android:drawable="@color/new_tablet_highlight_pb"/>
|
||||
|
||||
<!-- focused state -->
|
||||
<item gecko:state_private="true"
|
||||
android:state_focused="true"
|
||||
android:state_pressed="false"
|
||||
android:drawable="@color/new_tablet_highlight_focused_pb"/>
|
||||
|
||||
<!-- pressed state -->
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@color/new_tablet_highlight"/>
|
||||
|
||||
<!-- focused state -->
|
||||
<item android:state_focused="true"
|
||||
android:state_pressed="false"
|
||||
android:drawable="@color/new_tablet_highlight_focused"/>
|
||||
|
||||
<!-- private browsing mode -->
|
||||
<item gecko:state_private="true"
|
||||
android:drawable="@color/background_private"/>
|
||||
|
||||
<!-- normal mode -->
|
||||
<item android:drawable="@color/background_normal"/>
|
||||
|
||||
</selector>
|
@ -32,7 +32,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:src="@drawable/new_tablet_ic_menu_back"
|
||||
android:contentDescription="@string/back"
|
||||
android:background="@drawable/url_bar_nav_button"/>
|
||||
android:background="@drawable/new_tablet_url_bar_nav_button"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
|
||||
style="@style/UrlBar.Button"
|
||||
|
@ -33,6 +33,7 @@
|
||||
<item name="android:layout_marginTop">11.5dp</item>
|
||||
<item name="android:layout_marginBottom">11.5dp</item>
|
||||
<item name="android:src">@drawable/new_tablet_ic_menu_forward</item>
|
||||
<item name="android:background">@drawable/new_tablet_url_bar_nav_button</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.ImageButton.TabCount.NewTablet">
|
||||
|
@ -13,6 +13,12 @@
|
||||
<color name="highlight_dark">#33FFFFFF</color>
|
||||
<color name="highlight_dark_focused">#1AFFFFFF</color>
|
||||
|
||||
<!-- (bug 1077195) Focused state values are temporary. -->
|
||||
<color name="new_tablet_highlight">#D7D7DC</color>
|
||||
<color name="new_tablet_highlight_focused">#C0C9D0</color>
|
||||
<color name="new_tablet_highlight_pb">#222222</color>
|
||||
<color name="new_tablet_highlight_focused_pb">#363B40</color>
|
||||
|
||||
<!-- highlight on shaped button: 20% white over background_tabs -->
|
||||
<color name="highlight_shaped">#FF696D71</color>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user