mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge b2g-inbound to m-c
This commit is contained in:
commit
1e982337ed
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a4baf82a131a7853cf7e7f9cf74253927b2f355"/>
|
||||
@ -131,6 +131,6 @@
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="acbdbe5196f06589da05c3bd1f14b27a6cae69c2"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="dd94b2e17a146cb782d71933d25dcaa9c060e6ce"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="e0972cffef81e3833a5dad03a338651ebe55135f"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="1997f7f20aebbe95fb10111465c0db945bd041fe"/>
|
||||
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
|
||||
</manifest>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a4baf82a131a7853cf7e7f9cf74253927b2f355"/>
|
||||
@ -141,7 +141,7 @@
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
|
||||
<project name="platform/system/core" path="system/core" revision="bbf7212289fc8311e43f9d11e10788e310d36a08"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="e0972cffef81e3833a5dad03a338651ebe55135f"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="1997f7f20aebbe95fb10111465c0db945bd041fe"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
|
||||
</manifest>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "0f3d04108981c22084194c729bb20bc042f2bfc6",
|
||||
"revision": "2838c1b561aa929af18e45518cb002927dee4eaa",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a4baf82a131a7853cf7e7f9cf74253927b2f355"/>
|
||||
@ -127,7 +127,7 @@
|
||||
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="e0972cffef81e3833a5dad03a338651ebe55135f"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="1997f7f20aebbe95fb10111465c0db945bd041fe"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7db23414f2d632f4d00b5023ac1090b6045dc5fd"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b61129780e085636d09406f2a46e922d0f8b9757"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="996b5c6a2fd2b8a0124c0eab80eb72a4daece7bc"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -5,6 +5,7 @@
|
||||
import mozcrash
|
||||
import threading
|
||||
import os
|
||||
import posixpath
|
||||
import Queue
|
||||
import re
|
||||
import shutil
|
||||
@ -228,6 +229,11 @@ class B2GRemoteAutomation(Automation):
|
||||
self._devicemanager._runCmd(['shell', 'stop', 'b2g'])
|
||||
time.sleep(5)
|
||||
|
||||
# For some reason user.js in the profile doesn't get picked up.
|
||||
# Manually copy it over to prefs.js. See bug 1009730 for more details.
|
||||
self._devicemanager.moveTree(posixpath.join(self._remoteProfile, 'user.js'),
|
||||
posixpath.join(self._remoteProfile, 'prefs.js'))
|
||||
|
||||
# relaunch b2g inside b2g instance
|
||||
instance = self.B2GInstance(self._devicemanager, env=env)
|
||||
|
||||
|
@ -342,12 +342,17 @@ this.InterAppCommService = {
|
||||
let pubApp = appsService.getAppByManifestURL(aPubAppManifestURL);
|
||||
let subApp = appsService.getAppByManifestURL(aSubAppManifestURL);
|
||||
|
||||
let isPubAppCertified =
|
||||
(pubApp.appStatus == Ci.nsIPrincipal.APP_STATUS_CERTIFIED);
|
||||
|
||||
let isSubAppCertified =
|
||||
(subApp.appStatus == Ci.nsIPrincipal.APP_STATUS_CERTIFIED);
|
||||
|
||||
// TODO Bug 907068 In the initiative step, we only expose this API to
|
||||
// certified apps to meet the time line. Eventually, we need to make
|
||||
// it available for the non-certified apps as well. For now, only the
|
||||
// certified apps can match the rules.
|
||||
if (pubApp.appStatus != Ci.nsIPrincipal.APP_STATUS_CERTIFIED ||
|
||||
subApp.appStatus != Ci.nsIPrincipal.APP_STATUS_CERTIFIED) {
|
||||
if (!isPubAppCertified || !isSubAppCertified) {
|
||||
if (DEBUG) {
|
||||
debug("Only certified apps are allowed to do connections.");
|
||||
}
|
||||
@ -373,15 +378,15 @@ this.InterAppCommService = {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check installOrigins.
|
||||
if (!this._matchInstallOrigins(aPubRules, subApp.installOrigin) ||
|
||||
!this._matchInstallOrigins(aSubRules, pubApp.installOrigin)) {
|
||||
// Check installOrigins. Note that we only check the install origin for the
|
||||
// non-certified app, because the certified app doesn't have install origin.
|
||||
if ((!isSubAppCertified &&
|
||||
!this._matchInstallOrigins(aPubRules, subApp.installOrigin)) ||
|
||||
(!isPubAppCertified &&
|
||||
!this._matchInstallOrigins(aSubRules, pubApp.installOrigin))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check developers.
|
||||
// TODO Do we really want to check this? This one seems naive.
|
||||
|
||||
if (DEBUG) debug("All rules are matched.");
|
||||
return true;
|
||||
},
|
||||
|
@ -262,12 +262,12 @@ this.PermissionsTable = { geolocation: {
|
||||
},
|
||||
"audio-channel-telephony": {
|
||||
app: DENY_ACTION,
|
||||
privileged: DENY_ACTION,
|
||||
privileged: ALLOW_ACTION,
|
||||
certified: ALLOW_ACTION
|
||||
},
|
||||
"audio-channel-ringer": {
|
||||
app: DENY_ACTION,
|
||||
privileged: DENY_ACTION,
|
||||
privileged: ALLOW_ACTION,
|
||||
certified: ALLOW_ACTION
|
||||
},
|
||||
"audio-channel-publicnotification": {
|
||||
|
@ -822,19 +822,19 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
|
||||
nsRefPtr<ContentParent> p = sAppContentParents->Get(manifestURL);
|
||||
|
||||
if (!p && Preferences::GetBool("dom.ipc.reuse_parent_app")) {
|
||||
nsAutoString parentAppURL;
|
||||
nsAutoString parentAppManifestURL;
|
||||
aFrameElement->GetAttr(kNameSpaceID_None,
|
||||
nsGkAtoms::parentapp, parentAppURL);
|
||||
nsAdoptingString systemAppURL =
|
||||
Preferences::GetString("browser.homescreenURL");
|
||||
nsGkAtoms::parentapp, parentAppManifestURL);
|
||||
nsAdoptingString systemAppManifestURL =
|
||||
Preferences::GetString("browser.manifestURL");
|
||||
nsCOMPtr<nsIAppsService> appsService =
|
||||
do_GetService(APPS_SERVICE_CONTRACTID);
|
||||
if (!parentAppURL.IsEmpty() &&
|
||||
!parentAppURL.Equals(systemAppURL) &&
|
||||
if (!parentAppManifestURL.IsEmpty() &&
|
||||
!parentAppManifestURL.Equals(systemAppManifestURL) &&
|
||||
appsService) {
|
||||
nsCOMPtr<mozIApplication> parentApp;
|
||||
nsCOMPtr<mozIApplication> app;
|
||||
appsService->GetAppByManifestURL(parentAppURL,
|
||||
appsService->GetAppByManifestURL(parentAppManifestURL,
|
||||
getter_AddRefs(parentApp));
|
||||
appsService->GetAppByManifestURL(manifestURL,
|
||||
getter_AddRefs(app));
|
||||
@ -849,7 +849,7 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
|
||||
NS_SUCCEEDED(parentApp->GetAppStatus(&parentAppStatus)) &&
|
||||
parentAppStatus == nsIPrincipal::APP_STATUS_CERTIFIED) {
|
||||
// Check if we can re-use the process of the parent app.
|
||||
p = sAppContentParents->Get(parentAppURL);
|
||||
p = sAppContentParents->Get(parentAppManifestURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,6 +171,10 @@ GrallocTextureClientOGL::GetAsDrawTarget()
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(mMappedBuffer, "Calling TextureClient::GetAsDrawTarget without locking :(");
|
||||
|
||||
if (!IsValid() || !IsAllocated()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mDrawTarget) {
|
||||
return mDrawTarget;
|
||||
}
|
||||
|
@ -285,18 +285,20 @@ GrallocTextureHostOGL::GrallocTextureHostOGL(TextureFlags aFlags,
|
||||
const NewSurfaceDescriptorGralloc& aDescriptor)
|
||||
: TextureHost(aFlags)
|
||||
{
|
||||
gfx::SurfaceFormat format = gfx::SurfaceFormat::UNKNOWN;
|
||||
mGrallocHandle = aDescriptor;
|
||||
|
||||
android::GraphicBuffer* graphicBuffer = GetGraphicBufferFromDesc(mGrallocHandle).get();
|
||||
if (!graphicBuffer) {
|
||||
NS_RUNTIMEABORT("Invalid SurfaceDescriptor passed in");
|
||||
}
|
||||
MOZ_ASSERT(graphicBuffer);
|
||||
|
||||
mSize = aDescriptor.size();
|
||||
gfx::SurfaceFormat format =
|
||||
SurfaceFormatForAndroidPixelFormat(graphicBuffer->getPixelFormat(),
|
||||
aFlags & TextureFlags::RB_SWAPPED);
|
||||
|
||||
if (graphicBuffer) {
|
||||
format =
|
||||
SurfaceFormatForAndroidPixelFormat(graphicBuffer->getPixelFormat(),
|
||||
aFlags & TextureFlags::RB_SWAPPED);
|
||||
} else {
|
||||
NS_WARNING("gralloc buffer is nullptr");
|
||||
}
|
||||
mTextureSource = new GrallocTextureSourceOGL(nullptr,
|
||||
graphicBuffer,
|
||||
format);
|
||||
|
@ -367,7 +367,7 @@ class ReftestOptions(OptionParser):
|
||||
self.automation.addCommonOptions(self)
|
||||
self.add_option("--appname",
|
||||
action = "store", type = "string", dest = "app",
|
||||
default = os.path.join(SCRIPT_DIRECTORY, automation.DEFAULT_APP),
|
||||
default = os.path.join(SCRIPT_DIRECTORY, self.automation.DEFAULT_APP),
|
||||
help = "absolute path to application, overriding default")
|
||||
self.add_option("--extra-profile-file",
|
||||
action = "append", dest = "extraProfileFiles",
|
||||
|
@ -24,12 +24,9 @@ import moznetwork
|
||||
|
||||
class B2GOptions(ReftestOptions):
|
||||
|
||||
def __init__(self, automation=None, **kwargs):
|
||||
def __init__(self, **kwargs):
|
||||
defaults = {}
|
||||
if not automation:
|
||||
automation = B2GRemoteAutomation(None, "fennec", context_chrome=True)
|
||||
|
||||
ReftestOptions.__init__(self, automation)
|
||||
ReftestOptions.__init__(self)
|
||||
|
||||
self.add_option("--browser-arg", action="store",
|
||||
type = "string", dest = "browser_arg",
|
||||
@ -88,12 +85,12 @@ class B2GOptions(ReftestOptions):
|
||||
self.add_option("--http-port", action = "store",
|
||||
type = "string", dest = "httpPort",
|
||||
help = "ip address where the remote web server is hosted at")
|
||||
defaults["httpPort"] = automation.DEFAULT_HTTP_PORT
|
||||
defaults["httpPort"] = None
|
||||
|
||||
self.add_option("--ssl-port", action = "store",
|
||||
type = "string", dest = "sslPort",
|
||||
help = "ip address where the remote web server is hosted at")
|
||||
defaults["sslPort"] = automation.DEFAULT_SSL_PORT
|
||||
defaults["sslPort"] = None
|
||||
|
||||
self.add_option("--pidfile", action = "store",
|
||||
type = "string", dest = "pidFile",
|
||||
@ -125,7 +122,11 @@ class B2GOptions(ReftestOptions):
|
||||
dest="desktop",
|
||||
help="Run the tests on a B2G desktop build")
|
||||
defaults["desktop"] = False
|
||||
defaults["remoteTestRoot"] = "/data/local/tests"
|
||||
self.add_option("--enable-oop", action="store_true",
|
||||
dest="oop",
|
||||
help="Run the tests out of process")
|
||||
defaults["oop"] = False
|
||||
defaults["remoteTestRoot"] = None
|
||||
defaults["logFile"] = "reftest.log"
|
||||
defaults["autorun"] = True
|
||||
defaults["closeWhenDone"] = True
|
||||
@ -134,16 +135,17 @@ class B2GOptions(ReftestOptions):
|
||||
|
||||
self.set_defaults(**defaults)
|
||||
|
||||
def verifyRemoteOptions(self, options):
|
||||
def verifyRemoteOptions(self, options, auto):
|
||||
if options.runTestsInParallel:
|
||||
self.error("Cannot run parallel tests here")
|
||||
|
||||
if not options.remoteTestRoot:
|
||||
options.remoteTestRoot = self.automation._devicemanager.getDeviceRoot() + "/reftest"
|
||||
options.remoteTestRoot = auto._devicemanager.getDeviceRoot() + "/reftest"
|
||||
|
||||
options.remoteProfile = options.remoteTestRoot + "/profile"
|
||||
|
||||
productRoot = options.remoteTestRoot + "/" + self.automation._product
|
||||
if options.utilityPath == self.automation.DIST_BIN:
|
||||
productRoot = options.remoteTestRoot + "/" + auto._product
|
||||
if options.utilityPath == auto.DIST_BIN:
|
||||
options.utilityPath = productRoot + "/bin"
|
||||
|
||||
if options.remoteWebServer == None:
|
||||
@ -155,6 +157,12 @@ class B2GOptions(ReftestOptions):
|
||||
|
||||
options.webServer = options.remoteWebServer
|
||||
|
||||
if not options.httpPort:
|
||||
options.httpPort = auto.DEFAULT_HTTP_PORT
|
||||
|
||||
if not options.sslPort:
|
||||
options.sslPort = auto.DEFAULT_SSL_PORT
|
||||
|
||||
if options.geckoPath and not options.emulator:
|
||||
self.error("You must specify --emulator if you specify --gecko-path")
|
||||
|
||||
@ -240,7 +248,6 @@ class B2GRemoteReftest(RefTest):
|
||||
self.localLogName = options.localLogName
|
||||
self.remoteLogFile = options.remoteLogFile
|
||||
self.bundlesDir = '/system/b2g/distribution/bundles'
|
||||
self.userJS = '/data/local/user.js'
|
||||
self.remoteMozillaPath = '/data/b2g/mozilla'
|
||||
self.remoteProfilesIniPath = os.path.join(self.remoteMozillaPath, 'profiles.ini')
|
||||
self.originalProfilesIni = None
|
||||
@ -282,10 +289,6 @@ class B2GRemoteReftest(RefTest):
|
||||
self._devicemanager.removeDir(self.remoteProfile)
|
||||
self._devicemanager.removeDir(self.remoteTestRoot)
|
||||
|
||||
# Restore the original user.js.
|
||||
self._devicemanager._checkCmd(['shell', 'rm', '-f', self.userJS])
|
||||
self._devicemanager._checkCmd(['shell', 'dd', 'if=%s.orig' % self.userJS, 'of=%s' % self.userJS])
|
||||
|
||||
# We've restored the original profile, so reboot the device so that
|
||||
# it gets picked up.
|
||||
self.automation.rebootDevice()
|
||||
@ -417,6 +420,7 @@ class B2GRemoteReftest(RefTest):
|
||||
profileDir = profile.profile
|
||||
|
||||
prefs = {}
|
||||
|
||||
# Turn off the locale picker screen
|
||||
prefs["browser.firstrun.show.localepicker"] = False
|
||||
prefs["browser.homescreenURL"] = "app://test-container.gaiamobile.org/index.html"
|
||||
@ -434,6 +438,11 @@ class B2GRemoteReftest(RefTest):
|
||||
prefs["toolkit.telemetry.prompted"] = 999
|
||||
prefs["toolkit.telemetry.notifiedOptOut"] = 999
|
||||
|
||||
if options.oop:
|
||||
prefs['browser.tabs.remote'] = True
|
||||
prefs['browser.tabs.remote.autostart'] = True
|
||||
prefs['reftest.browser.iframe.enabled'] = True
|
||||
|
||||
# Set the extra prefs.
|
||||
profile.set_preferences(prefs)
|
||||
|
||||
@ -458,12 +467,6 @@ class B2GRemoteReftest(RefTest):
|
||||
print "Automation Error: Unable to copy extensions to device."
|
||||
raise
|
||||
|
||||
# In B2G, user.js is always read from /data/local, not the profile
|
||||
# directory. Backup the original user.js first so we can restore it.
|
||||
self._devicemanager._checkCmd(['shell', 'rm', '-f', '%s.orig' % self.userJS])
|
||||
self._devicemanager._checkCmd(['shell', 'dd', 'if=%s' % self.userJS, 'of=%s.orig' % self.userJS])
|
||||
self._devicemanager.pushFile(os.path.join(profileDir, "user.js"), self.userJS)
|
||||
|
||||
self.updateProfilesIni(self.remoteProfile)
|
||||
|
||||
options.profilePath = self.remoteProfile
|
||||
@ -523,7 +526,7 @@ def run_remote_reftests(parser, options, args):
|
||||
dm = DeviagerADB(**kwargs)
|
||||
auto.setDeviceManager(dm)
|
||||
|
||||
options = parser.verifyRemoteOptions(options)
|
||||
options = parser.verifyRemoteOptions(options, auto)
|
||||
|
||||
if (options == None):
|
||||
print "ERROR: Invalid options specified, use --help for a list of valid options"
|
||||
|
@ -154,7 +154,6 @@ class B2GUpdateTestCase(MarionetteTestCase):
|
||||
|
||||
MAX_OTA_WAIT = 60 * 2 # 2 minutes
|
||||
MAX_FOTA_WAIT = 60 * 10 # 10 minutes
|
||||
REMOTE_USER_JS = '/data/local/user.js'
|
||||
|
||||
def __init__(self, marionette_weakref, **kwargs):
|
||||
if 'runner' in kwargs:
|
||||
@ -286,7 +285,6 @@ class B2GUpdateTestCase(MarionetteTestCase):
|
||||
'adb_path': self.runner.adb.tool,
|
||||
'update_xml': update_xml,
|
||||
'only_override': kwargs.get('only_override', False),
|
||||
'remote_prefs_js': self.REMOTE_USER_JS
|
||||
}
|
||||
for key in ('complete_mar', 'partial_mar', 'url_template', 'update_dir'):
|
||||
test_kwargs[key] = kwargs.get(key)
|
||||
|
@ -75,7 +75,6 @@ class Emulator(object):
|
||||
self._tmp_sdcard = None
|
||||
self._tmp_userdata = None
|
||||
self._adb_started = False
|
||||
self.remote_user_js = '/data/local/user.js'
|
||||
self.logcat_dir = logcat_dir
|
||||
self.logcat_proc = None
|
||||
self.arch = arch
|
||||
@ -314,13 +313,6 @@ waitFor(
|
||||
self.dm = devicemanagerADB.DeviceManagerADB(adbPath=self.adb,
|
||||
deviceSerial='emulator-%d' % self.port)
|
||||
|
||||
def add_prefs_to_profile(self, prefs=()):
|
||||
local_user_js = tempfile.mktemp(prefix='localuserjs')
|
||||
self.dm.getFile(self.remote_user_js, local_user_js)
|
||||
with open(local_user_js, 'a') as f:
|
||||
f.write('%s\n' % '\n'.join(prefs))
|
||||
self.dm.pushFile(local_user_js, self.remote_user_js)
|
||||
|
||||
def start(self):
|
||||
self._check_for_b2g()
|
||||
self.start_adb()
|
||||
|
@ -147,7 +147,6 @@ class B2GRunner(RemoteRunner):
|
||||
self.test_script_args = test_script_args
|
||||
self.remote_profiles_ini = '/data/b2g/mozilla/profiles.ini'
|
||||
self.bundles_dir = '/system/b2g/distribution/bundles'
|
||||
self.user_js = '/data/local/user.js'
|
||||
|
||||
@property
|
||||
def command(self):
|
||||
@ -174,6 +173,11 @@ class B2GRunner(RemoteRunner):
|
||||
|
||||
self.dm.shellCheckOutput(['stop', 'b2g'])
|
||||
|
||||
# For some reason user.js in the profile doesn't get picked up.
|
||||
# Manually copy it over to prefs.js. See bug 1009730 for more details.
|
||||
self.dm.moveTree(posixpath.join(self.remote_profile, 'user.js'),
|
||||
posixpath.join(self.remote_profile, 'prefs.js'))
|
||||
|
||||
self.kp_kwargs.update({'stream': sys.stdout,
|
||||
'processOutputLine': self.on_output,
|
||||
'onTimeout': self.on_timeout,})
|
||||
@ -220,6 +224,12 @@ class B2GRunner(RemoteRunner):
|
||||
|
||||
|
||||
def start_tests(self):
|
||||
#self.marionette.execute_script("""
|
||||
# var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
# var homeUrl = prefs.getCharPref("browser.homescreenURL");
|
||||
# dump(homeURL + "\n");
|
||||
#""")
|
||||
|
||||
# run the script that starts the tests
|
||||
if os.path.isfile(self.test_script):
|
||||
script = open(self.test_script, 'r')
|
||||
@ -329,11 +339,6 @@ class B2GRunner(RemoteRunner):
|
||||
self.backup_file(self.remote_profiles_ini)
|
||||
self.dm.pushFile(new_profiles_ini.name, self.remote_profiles_ini)
|
||||
|
||||
# In B2G, user.js is always read from /data/local, not the profile
|
||||
# directory. Backup the original user.js first so we can restore it.
|
||||
self.backup_file(self.user_js)
|
||||
self.dm.pushFile(os.path.join(self.profile.profile, "user.js"), self.user_js)
|
||||
|
||||
def cleanup(self):
|
||||
RemoteRunner.cleanup(self)
|
||||
if getattr(self.marionette, 'instance', False):
|
||||
|
Loading…
Reference in New Issue
Block a user