зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 15e815413234 (bug 1351980) for asserting on Android, e.g. in test_pseudoElement-get-animations.html. r=backout
This commit is contained in:
Родитель
93f23173cb
Коммит
d4679cd05d
|
@ -7,6 +7,7 @@
|
|||
window.performance.mark('gecko-shell-loadstart');
|
||||
|
||||
Cu.import('resource://gre/modules/NotificationDB.jsm');
|
||||
Cu.import('resource://gre/modules/UserAgentOverrides.jsm');
|
||||
Cu.import('resource://gre/modules/Keyboard.jsm');
|
||||
Cu.import('resource://gre/modules/ErrorPage.jsm');
|
||||
Cu.import('resource://gre/modules/AlertsHelper.jsm');
|
||||
|
@ -406,6 +407,7 @@ var shell = {
|
|||
this.contentBrowser.addEventListener('mozbrowsercaretstatechanged', this);
|
||||
|
||||
CustomEventManager.init();
|
||||
UserAgentOverrides.init();
|
||||
CaptivePortalLoginHelper.init();
|
||||
|
||||
this.contentBrowser.src = homeURL;
|
||||
|
@ -435,6 +437,8 @@ var shell = {
|
|||
this.contentBrowser.removeEventListener('mozbrowserscrollviewchange', this, true);
|
||||
this.contentBrowser.removeEventListener('mozbrowsercaretstatechanged', this);
|
||||
ppmm.removeMessageListener("content-handler", this);
|
||||
|
||||
UserAgentOverrides.uninit();
|
||||
},
|
||||
|
||||
// If this key event represents a hardware button which needs to be send as
|
||||
|
|
|
@ -251,6 +251,8 @@ var whitelist = new Set([
|
|||
{file: "resource://gre/modules/PropertyListUtils.jsm", platforms: ["linux", "win"]},
|
||||
// Bug 1351093
|
||||
{file: "resource://gre/modules/Sntp.jsm"},
|
||||
// Bug 1351980
|
||||
{file: "resource://gre/modules/UserAgentOverrides.jsm"},
|
||||
// Bug 1351097
|
||||
{file: "resource://gre/modules/accessibility/AccessFu.jsm"},
|
||||
// Bug 1351099
|
||||
|
|
|
@ -357,8 +357,6 @@
|
|||
@RESPATH@/components/BrowserElementParent.js
|
||||
@RESPATH@/components/FeedProcessor.manifest
|
||||
@RESPATH@/components/FeedProcessor.js
|
||||
@RESPATH@/components/UserAgentOverrides.js
|
||||
@RESPATH@/components/UserAgentOverrides.manifest
|
||||
@RESPATH@/components/WellKnownOpportunisticUtils.js
|
||||
@RESPATH@/components/WellKnownOpportunisticUtils.manifest
|
||||
#ifndef XP_MACOSX
|
||||
|
|
|
@ -43,6 +43,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
|
||||
"resource://gre/modules/Downloads.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UserAgentOverrides",
|
||||
"resource://gre/modules/UserAgentOverrides.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent",
|
||||
"resource://gre/modules/LoginManagerContent.jsm");
|
||||
|
||||
|
@ -456,6 +459,7 @@ var BrowserApp = {
|
|||
CharacterEncoding.init();
|
||||
ActivityObserver.init();
|
||||
RemoteDebugger.init();
|
||||
UserAgentOverrides.init();
|
||||
DesktopUserAgent.init();
|
||||
Distribution.init();
|
||||
Tabs.init();
|
||||
|
|
|
@ -277,8 +277,6 @@
|
|||
@BINPATH@/components/BrowserElementParent.js
|
||||
@BINPATH@/components/FeedProcessor.manifest
|
||||
@BINPATH@/components/FeedProcessor.js
|
||||
@BINPATH@/components/UserAgentOverrides.js
|
||||
@BINPATH@/components/UserAgentOverrides.manifest
|
||||
@BINPATH@/components/WellKnownOpportunisticUtils.js
|
||||
@BINPATH@/components/WellKnownOpportunisticUtils.manifest
|
||||
@BINPATH@/components/mozProtocolHandler.js
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/UserAgentOverrides.jsm");
|
||||
|
||||
function UserAgentOverridesComponent() {
|
||||
}
|
||||
|
||||
UserAgentOverridesComponent.prototype = {
|
||||
init: function uaoc_init() {
|
||||
Services.obs.addObserver(this, "xpcom-shutdown", false);
|
||||
UserAgentOverrides.init();
|
||||
},
|
||||
|
||||
observe: function uaoc_observe(aSubject, aTopic, aData) {
|
||||
if (aTopic == "app-startup") {
|
||||
this.init();
|
||||
} else if (aTopic == "xpcom-shutdown") {
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
UserAgentOverrides.uninit();
|
||||
}
|
||||
},
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
||||
classID: Components.ID("{965b0ca8-155b-11e7-93ae-92361f002671}")
|
||||
};
|
||||
|
||||
const components = [UserAgentOverridesComponent];
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
|
@ -1,4 +0,0 @@
|
|||
# UserAgentOverrides.js
|
||||
component {965b0ca8-155b-11e7-93ae-92361f002671} UserAgentOverrides.js process=main
|
||||
contract @mozilla.org/network/useragentoverrides;1 {965b0ca8-155b-11e7-93ae-92361f002671}
|
||||
category app-startup UserAgentOverrides service,@mozilla.org/network/useragentoverrides;1
|
|
@ -121,8 +121,6 @@ LOCAL_INCLUDES += [
|
|||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'UserAgentOverrides.js',
|
||||
'UserAgentOverrides.manifest',
|
||||
'WellKnownOpportunisticUtils.js',
|
||||
'WellKnownOpportunisticUtils.manifest',
|
||||
]
|
||||
|
|
|
@ -231,6 +231,11 @@ function testOverrides(callback) {
|
|||
});
|
||||
}
|
||||
|
||||
SpecialPowers.loadChromeScript(_ => {
|
||||
Components.utils.import("resource://gre/modules/UserAgentOverrides.jsm");
|
||||
UserAgentOverrides.init();
|
||||
});
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.requestCompleteLog();
|
||||
SimpleTest.requestLongerTimeout(5);
|
||||
|
|
|
@ -200,13 +200,15 @@ SpecialPowers.pushPrefEnv({
|
|||
[PREF_APP_UPDATE_TIMERMINIMUMDELAY, 0]
|
||||
]
|
||||
}, function () {
|
||||
chromeScript.sendSyncMessage("UAO-uninit");
|
||||
|
||||
// Sets the OVERRIDES var in the chrome script.
|
||||
// We do this to avoid code duplication.
|
||||
chromeScript.sendSyncMessage("set-overrides", OVERRIDES);
|
||||
|
||||
// testProfileLoad, testDownload, and testProfileSave must run in this order
|
||||
// because testDownload depends on testProfileLoad and testProfileSave depends
|
||||
// on testDownload to save overrides to the profile
|
||||
// because testDownload depends on testProfileLoad to call UAO.init()
|
||||
// and testProfileSave depends on testDownload to save overrides to the profile
|
||||
chromeScript.sendAsyncMessage("testProfileLoad", location.hostname);
|
||||
});
|
||||
|
||||
|
@ -216,8 +218,13 @@ const chromeScript = SpecialPowers.loadChromeScript(_ => {
|
|||
Components.classes["@mozilla.org/updates/timer-manager;1"].getService(
|
||||
Components.interfaces.nsIObserver).observe(null, "utm-test-init", "");
|
||||
|
||||
Components.utils.import("resource://gre/modules/UserAgentOverrides.jsm");
|
||||
|
||||
var _notifyOnUpdate = false;
|
||||
|
||||
var UAO = UserAgentOverrides;
|
||||
UAO.uninit();
|
||||
|
||||
Components.utils.import("resource://gre/modules/FileUtils.jsm");
|
||||
var FU = FileUtils;
|
||||
|
||||
|
@ -311,6 +318,8 @@ const chromeScript = SpecialPowers.loadChromeScript(_ => {
|
|||
addMessageListener("testProfileSave", testProfileSave);
|
||||
addMessageListener("testProfileLoad", testProfileLoad);
|
||||
addMessageListener("set-overrides", function(overrides) { OVERRIDES = overrides});
|
||||
addMessageListener("UAO-init", function() { UAO.init(); });
|
||||
addMessageListener("UAO-uninit", function() { UAO.uninit(); });
|
||||
addMessageListener("notify-on-update", () => { _notifyOnUpdate = true });
|
||||
});
|
||||
|
||||
|
@ -319,6 +328,9 @@ chromeScript.addMessageListener("testProfileLoadDone", function() {
|
|||
SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_UPDATES_ENABLED, true]]
|
||||
}, function () {
|
||||
// initialize UserAgentOverrides.jsm and
|
||||
// UserAgentUpdates.jsm and load saved file
|
||||
chromeScript.sendSyncMessage("UAO-init");
|
||||
(function waitForLoad() {
|
||||
var ifr = document.createElement('IFRAME');
|
||||
ifr.src = location.origin;
|
||||
|
|
Загрузка…
Ссылка в новой задаче