зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound on a CLOSED TREE.
This commit is contained in:
Коммит
ec23774cc2
|
@ -19,13 +19,13 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -128,7 +128,7 @@
|
|||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="c3ee0c875393607430086f942950d1b3f496ab0e"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c229a9415c8d46924b5f70e06161d7ca22b6242f"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="0a2b7e94dce4989a3740fea6f6e3152978216c88"/>
|
||||
<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="d0aa65b140a45016975ed0ecf35f280dd336e1d3"/>
|
||||
|
|
|
@ -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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="librecovery" patch="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "6c7d7c523464de80214c548afb7da9b39fde9a4d",
|
||||
"revision": "46fb0be835267316bda52a12dedab53978456833",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
|
|
@ -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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
|
|
@ -1249,7 +1249,7 @@ pref("devtools.toolbox.footer.height", 250);
|
|||
pref("devtools.toolbox.sidebar.width", 500);
|
||||
pref("devtools.toolbox.host", "bottom");
|
||||
pref("devtools.toolbox.selectedTool", "webconsole");
|
||||
pref("devtools.toolbox.toolbarSpec", '["splitconsole", "paintflashing toggle","tilt toggle","scratchpad","resize toggle","eyedropper"]');
|
||||
pref("devtools.toolbox.toolbarSpec", '["splitconsole", "paintflashing toggle","tilt toggle","scratchpad","resize toggle","eyedropper","screenshot --fullpage"]');
|
||||
pref("devtools.toolbox.sideEnabled", true);
|
||||
pref("devtools.toolbox.zoomValue", "1");
|
||||
|
||||
|
@ -1261,6 +1261,7 @@ pref("devtools.command-button-tilt.enabled", false);
|
|||
pref("devtools.command-button-scratchpad.enabled", false);
|
||||
pref("devtools.command-button-responsive.enabled", true);
|
||||
pref("devtools.command-button-eyedropper.enabled", false);
|
||||
pref("devtools.command-button-screenshot.enabled", false);
|
||||
|
||||
// Inspector preferences
|
||||
// Enable the Inspector
|
||||
|
|
|
@ -6059,7 +6059,7 @@ function GetSearchFieldBookmarkData(node) {
|
|||
|
||||
|
||||
function AddKeywordForSearchField() {
|
||||
bookmarkData = GetSearchFieldBookmarkData(gContextMenu.target);
|
||||
let bookmarkData = GetSearchFieldBookmarkData(gContextMenu.target);
|
||||
|
||||
PlacesUIUtils.showBookmarkDialog({ action: "add"
|
||||
, type: "bookmark"
|
||||
|
|
|
@ -302,7 +302,7 @@ var gAdvancedPane = {
|
|||
])
|
||||
};
|
||||
|
||||
actualSizeLabel.value = prefStrBundle.getString("actualDiskCacheSizeCalculated");
|
||||
actualSizeLabel.textContent = prefStrBundle.getString("actualDiskCacheSizeCalculated");
|
||||
|
||||
var cacheService =
|
||||
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
|
||||
|
@ -321,7 +321,7 @@ var gAdvancedPane = {
|
|||
var sizeStrings = DownloadUtils.convertByteUnits(deviceInfo.totalSize);
|
||||
var prefStrBundle = document.getElementById("bundlePreferences");
|
||||
var sizeStr = prefStrBundle.getFormattedString("actualAppCacheSize", sizeStrings);
|
||||
actualSizeLabel.value = sizeStr;
|
||||
actualSizeLabel.textContent = sizeStr;
|
||||
}
|
||||
// Do not enumerate entries
|
||||
return false;
|
||||
|
|
|
@ -131,8 +131,7 @@
|
|||
hidden="true"
|
||||
data-category="paneAdvanced">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneAdvanced.title;"/>
|
||||
<label class="header-name">&paneAdvanced.title;</label>
|
||||
</hbox>
|
||||
|
||||
<tabbox id="advancedPrefs"
|
||||
|
@ -159,7 +158,7 @@
|
|||
<tabpanel id="generalPanel" orient="vertical">
|
||||
<!-- Accessibility -->
|
||||
<groupbox id="accessibilityGroup" align="start">
|
||||
<caption label="&accessibility.label;"/>
|
||||
<caption><label>&accessibility.label;</label></caption>
|
||||
|
||||
<checkbox id="useCursorNavigation"
|
||||
label="&useCursorNavigation.label;"
|
||||
|
@ -176,7 +175,7 @@
|
|||
</groupbox>
|
||||
<!-- Browsing -->
|
||||
<groupbox id="browsingGroup" align="start">
|
||||
<caption label="&browsing.label;"/>
|
||||
<caption><label>&browsing.label;</label></caption>
|
||||
|
||||
<checkbox id="useAutoScroll"
|
||||
label="&useAutoScroll.label;"
|
||||
|
@ -200,7 +199,7 @@
|
|||
#ifdef HAVE_SHELL_SERVICE
|
||||
<!-- System Defaults -->
|
||||
<groupbox id="systemDefaultsGroup" orient="vertical">
|
||||
<caption label="&systemDefaults.label;"/>
|
||||
<caption><label>&systemDefaults.label;</label></caption>
|
||||
|
||||
<checkbox id="alwaysCheckDefault" preference="browser.shell.checkDefaultBrowser"
|
||||
label="&alwaysCheckDefault.label;" accesskey="&alwaysCheckDefault.accesskey;"
|
||||
|
@ -211,8 +210,7 @@
|
|||
label="&setDefault.label;" accesskey="&setDefault.accesskey;"
|
||||
oncommand="gAdvancedPane.setDefaultBrowser();"
|
||||
preference="pref.general.disable_button.default_browser"/>
|
||||
<label id="isDefaultLabel"
|
||||
value="&isDefault.label;"/>
|
||||
<label id="isDefaultLabel">&isDefault.label;</label>
|
||||
</deck>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
@ -223,7 +221,7 @@
|
|||
<tabpanel id="dataChoicesPanel" orient="vertical">
|
||||
#ifdef MOZ_TELEMETRY_REPORTING
|
||||
<groupbox>
|
||||
<caption label="&telemetrySection.label;"/>
|
||||
<caption><label>&telemetrySection.label;</label></caption>
|
||||
<description>&telemetryDesc.label;</description>
|
||||
<hbox>
|
||||
<checkbox id="submitTelemetryBox"
|
||||
|
@ -232,14 +230,13 @@
|
|||
accesskey="&enableTelemetry.accesskey;"/>
|
||||
<spacer flex="1"/>
|
||||
<label id="telemetryLearnMore"
|
||||
class="text-link"
|
||||
value="&telemetryLearnMore.label;"/>
|
||||
class="text-link">&telemetryLearnMore.label;</label>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
#endif
|
||||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||
<groupbox>
|
||||
<caption label="&healthReportSection.label;"/>
|
||||
<caption><label>&healthReportSection.label;</label></caption>
|
||||
<description>&healthReportDesc.label;</description>
|
||||
<hbox>
|
||||
<checkbox id="submitHealthReportBox"
|
||||
|
@ -248,14 +245,13 @@
|
|||
accesskey="&enableHealthReport.accesskey;"/>
|
||||
<spacer flex="1"/>
|
||||
<label id="FHRLearnMore"
|
||||
class="text-link"
|
||||
value="&healthReportLearnMore.label;"/>
|
||||
class="text-link">&healthReportLearnMore.label;</label>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
#endif
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
<groupbox>
|
||||
<caption label="&crashReporterSection.label;"/>
|
||||
<caption><label>&crashReporterSection.label;</label></caption>
|
||||
<description>&crashReporterDesc.label;</description>
|
||||
<hbox>
|
||||
<checkbox id="submitCrashesBox"
|
||||
|
@ -265,8 +261,7 @@
|
|||
|
||||
<spacer flex="1"/>
|
||||
<label id="crashReporterLearnMore"
|
||||
class="text-link"
|
||||
value="&crashReporterLearnMore.label;"/>
|
||||
class="text-link">&crashReporterLearnMore.label;</label>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
#endif
|
||||
|
@ -278,7 +273,7 @@
|
|||
|
||||
<!-- Connection -->
|
||||
<groupbox id="connectionGroup">
|
||||
<caption label="&connection.label;"/>
|
||||
<caption><label>&connection.label;</label></caption>
|
||||
|
||||
<hbox align="center">
|
||||
<description flex="1" control="connectionSettings">&connectionDesc.label;</description>
|
||||
|
@ -290,7 +285,7 @@
|
|||
|
||||
<!-- Cache -->
|
||||
<groupbox id="cacheGroup">
|
||||
<caption label="&httpCache.label;"/>
|
||||
<caption><label>&httpCache.label;</label></caption>
|
||||
|
||||
<hbox align="center">
|
||||
<label id="actualDiskCacheSize" flex="1"/>
|
||||
|
@ -305,8 +300,9 @@
|
|||
accesskey="&overrideSmartCacheSize.accesskey;"/>
|
||||
<hbox align="center" class="indent">
|
||||
<label id="useCacheBefore" control="cacheSize"
|
||||
accesskey="&limitCacheSizeBefore.accesskey;"
|
||||
value="&limitCacheSizeBefore.label;"/>
|
||||
accesskey="&limitCacheSizeBefore.accesskey;">
|
||||
&limitCacheSizeBefore.label;
|
||||
</label>
|
||||
<textbox id="cacheSize" type="number" size="4" max="1024"
|
||||
preference="browser.cache.disk.capacity"
|
||||
onsyncfrompreference="return gAdvancedPane.readCacheSize();"
|
||||
|
@ -318,7 +314,7 @@
|
|||
|
||||
<!-- Offline apps -->
|
||||
<groupbox id="offlineGroup">
|
||||
<caption label="&offlineStorage2.label;"/>
|
||||
<caption><label>&offlineStorage2.label;</label></caption>
|
||||
|
||||
<hbox align="center">
|
||||
<label id="actualAppCacheSize" flex="1"/>
|
||||
|
@ -361,7 +357,7 @@
|
|||
<tabpanel id="updatePanel" orient="vertical">
|
||||
#ifdef MOZ_UPDATER
|
||||
<groupbox id="updateApp">
|
||||
<caption label="&updateApp.label;"/>
|
||||
<caption><label>&updateApp.label;</label></caption>
|
||||
<radiogroup id="updateRadioGroup"
|
||||
oncommand="gAdvancedPane.updateWritePrefs();">
|
||||
#ifdef XP_WIN
|
||||
|
@ -372,7 +368,7 @@
|
|||
accesskey="&updateAutoMetro.accesskey;"/>
|
||||
<hbox id="autoMetroIndent"
|
||||
class="indent">
|
||||
<label value="&updateAutoMetroWarn.label;"/>
|
||||
<label>&updateAutoMetroWarn.label;</label>
|
||||
</hbox>
|
||||
#endif
|
||||
#endif
|
||||
|
@ -413,7 +409,7 @@
|
|||
</groupbox>
|
||||
#endif
|
||||
<groupbox id="updateOthers">
|
||||
<caption label="&updateOthers.label;"/>
|
||||
<caption><label>&updateOthers.label;</label></caption>
|
||||
<checkbox id="enableSearchUpdate"
|
||||
label="&enableSearchUpdate.label;"
|
||||
accesskey="&enableSearchUpdate.accesskey;"
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
hidden="true"
|
||||
data-category="paneApplications">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneApplications.title;"/>
|
||||
<label class="header-name">&paneApplications.title;</label>
|
||||
</hbox>
|
||||
|
||||
<vbox id="applicationsContent"
|
||||
|
|
|
@ -33,12 +33,11 @@
|
|||
hidden="true"
|
||||
data-category="paneContent">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneContent.title;"/>
|
||||
<label class="header-name">&paneContent.title;</label>
|
||||
</hbox>
|
||||
|
||||
<groupbox id="miscGroup" data-category="paneContent" hidden="true">
|
||||
<caption label="&popups.label;"/>
|
||||
<caption><label>&popups.label;</label></caption>
|
||||
|
||||
<grid id="contentGrid">
|
||||
<columns>
|
||||
|
@ -63,7 +62,7 @@
|
|||
|
||||
<!-- Fonts and Colors -->
|
||||
<groupbox id="fontsGroup" data-category="paneContent" hidden="true">
|
||||
<caption label="&fontsAndColors.label;"/>
|
||||
<caption><label>&fontsAndColors.label;</label></caption>
|
||||
|
||||
<grid id="fontsGrid">
|
||||
<columns>
|
||||
|
@ -124,7 +123,7 @@
|
|||
|
||||
<!-- Languages -->
|
||||
<groupbox id="languagesGroup" data-category="paneContent" hidden="true">
|
||||
<caption label="&languages.label;"/>
|
||||
<caption><label>&languages.label;</label></caption>
|
||||
|
||||
<hbox id="languagesBox" align="center">
|
||||
<description flex="1" control="chooseLanguage">&chooseLanguage.label;</description>
|
||||
|
|
|
@ -91,18 +91,16 @@
|
|||
class="header"
|
||||
data-category="paneGeneral">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneGeneral.title;"/>
|
||||
<label class="header-name">&paneGeneral.title;</label>
|
||||
</hbox>
|
||||
|
||||
<!-- Startup -->
|
||||
<groupbox id="startupGroup" data-category="paneGeneral">
|
||||
<caption label="&startup.label;"/>
|
||||
<caption><label>&startup.label;</label></caption>
|
||||
|
||||
<hbox align="center">
|
||||
<label value="&startupPage.label;"
|
||||
accesskey="&startupPage.accesskey;"
|
||||
control="browserStartupPage"/>
|
||||
<label accesskey="&startupPage.accesskey;"
|
||||
control="browserStartupPage">&startupPage.label;</label>
|
||||
<menulist id="browserStartupPage"
|
||||
preference="browser.startup.page">
|
||||
<menupopup>
|
||||
|
@ -120,9 +118,8 @@
|
|||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="center">
|
||||
<label value="&homepage.label;"
|
||||
accesskey="&homepage.accesskey;"
|
||||
control="browserHomePage"/>
|
||||
<label accesskey="&homepage.accesskey;"
|
||||
control="browserHomePage">&homepage.label;</label>
|
||||
<textbox id="browserHomePage"
|
||||
class="padded uri-element"
|
||||
flex="1"
|
||||
|
@ -156,7 +153,7 @@
|
|||
|
||||
<!-- Downloads -->
|
||||
<groupbox id="downloadsGroup" data-category="paneGeneral">
|
||||
<caption label="&downloads.label;"/>
|
||||
<caption><label>&downloads.label;</label></caption>
|
||||
|
||||
<radiogroup id="saveWhere"
|
||||
preference="browser.download.useDownloadDir"
|
||||
|
@ -195,7 +192,7 @@
|
|||
|
||||
<!-- Tab preferences -->
|
||||
<groupbox data-category="paneGeneral">
|
||||
<caption label="&tabsGroup.label;"/>
|
||||
<caption><label>&tabsGroup.label;</label></caption>
|
||||
<checkbox id="linkTargeting" label="&newWindowsAsTabs.label;"
|
||||
accesskey="&newWindowsAsTabs.accesskey;"
|
||||
preference="browser.link.open_newwindow"
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
tooltiptext="&paneGeneral.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneGeneral.title;"/>
|
||||
<label class="category-name" flex="1">&paneGeneral.title;</label>
|
||||
</richlistitem>
|
||||
|
||||
<richlistitem id="category-content"
|
||||
|
@ -98,7 +98,7 @@
|
|||
tooltiptext="&paneContent.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneContent.title;"/>
|
||||
<label class="category-name" flex="1">&paneContent.title;</label>
|
||||
</richlistitem>
|
||||
|
||||
<richlistitem id="category-application"
|
||||
|
@ -108,7 +108,7 @@
|
|||
tooltiptext="&paneApplications.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneApplications.title;"/>
|
||||
<label class="category-name" flex="1">&paneApplications.title;</label>
|
||||
</richlistitem>
|
||||
|
||||
<richlistitem id="category-privacy"
|
||||
|
@ -118,7 +118,7 @@
|
|||
tooltiptext="&panePrivacy.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&panePrivacy.title;"/>
|
||||
<label class="category-name" flex="1">&panePrivacy.title;</label>
|
||||
</richlistitem>
|
||||
|
||||
<richlistitem id="category-security"
|
||||
|
@ -128,7 +128,7 @@
|
|||
tooltiptext="&paneSecurity.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneSecurity.title;"/>
|
||||
<label class="category-name" flex="1">&paneSecurity.title;</label>
|
||||
</richlistitem>
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
|
@ -139,7 +139,7 @@
|
|||
tooltiptext="&paneSync.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneSync.title;"/>
|
||||
<label class="category-name" flex="1">&paneSync.title;</label>
|
||||
</richlistitem>
|
||||
#endif
|
||||
|
||||
|
@ -150,7 +150,7 @@
|
|||
tooltiptext="&paneAdvanced.title;"
|
||||
align="center">
|
||||
<image class="category-icon"/>
|
||||
<label class="category-name" flex="1" value="&paneAdvanced.title;"/>
|
||||
<label class="category-name" flex="1">&paneAdvanced.title;</label>
|
||||
</richlistitem>
|
||||
</richlistbox>
|
||||
|
||||
|
|
|
@ -72,13 +72,12 @@
|
|||
hidden="true"
|
||||
data-category="panePrivacy">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&panePrivacy.title;"/>
|
||||
<label class="header-name">&panePrivacy.title;</label>
|
||||
</hbox>
|
||||
|
||||
<!-- Tracking -->
|
||||
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" align="start">
|
||||
<caption label="&tracking.label;"/>
|
||||
<caption><label>&tracking.label;</label></caption>
|
||||
<radiogroup id="doNotTrackSelection" orient="vertical"
|
||||
preference="privacy.donottrackheader.value"
|
||||
onsynctopreference="return gPrivacyPane.setTrackingPrefs()"
|
||||
|
@ -91,13 +90,14 @@
|
|||
accesskey="&dntTrackingNopref.accesskey;" />
|
||||
</radiogroup>
|
||||
<label class="text-link" id="doNotTrackInfo"
|
||||
href="https://www.mozilla.org/dnt"
|
||||
value="&doNotTrackInfo.label;"/>
|
||||
href="https://www.mozilla.org/dnt">
|
||||
&doNotTrackInfo.label;
|
||||
</label>
|
||||
</groupbox>
|
||||
|
||||
<!-- History -->
|
||||
<groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
|
||||
<caption label="&history.label;"/>
|
||||
<caption><label>&history.label;</label></caption>
|
||||
<hbox align="center">
|
||||
<label id="historyModeLabel"
|
||||
control="historyMode"
|
||||
|
@ -230,7 +230,7 @@
|
|||
|
||||
<!-- Location Bar -->
|
||||
<groupbox id="locationBarGroup" data-category="panePrivacy" hidden="true">
|
||||
<caption label="&locationBar.label;"/>
|
||||
<caption><label>&locationBar.label;</label></caption>
|
||||
<hbox align="center">
|
||||
<label id="locationBarSuggestionLabel"
|
||||
control="locationBarSuggestion"
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
hidden="true"
|
||||
data-category="paneSecurity">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneSecurity.title;"/>
|
||||
<label class="header-name">&paneSecurity.title;</label>
|
||||
</hbox>
|
||||
|
||||
<!-- addons, forgery (phishing) UI -->
|
||||
<groupbox id="addonsPhishingGroup" data-category="paneSecurity" hidden="true">
|
||||
<caption label="&general.label;"/>
|
||||
<caption><label>&general.label;</label></caption>
|
||||
|
||||
<hbox id="addonInstallBox">
|
||||
<checkbox id="warnAddonInstall" flex="1"
|
||||
|
@ -70,7 +69,7 @@
|
|||
|
||||
<!-- Passwords -->
|
||||
<groupbox id="passwordsGroup" orient="vertical" data-category="paneSecurity" hidden="true">
|
||||
<caption label="&passwords.label;"/>
|
||||
<caption><label>&passwords.label;</label></caption>
|
||||
|
||||
<hbox id="savePasswordsBox">
|
||||
<checkbox id="savePasswords" flex="1"
|
||||
|
|
|
@ -44,7 +44,7 @@ let gSyncPane = {
|
|||
needsUpdate: function () {
|
||||
this.page = PAGE_NEEDS_UPDATE;
|
||||
let label = document.getElementById("loginError");
|
||||
label.value = Weave.Utils.getErrorString(Weave.Status.login);
|
||||
label.textContent = Weave.Utils.getErrorString(Weave.Status.login);
|
||||
label.className = "error";
|
||||
},
|
||||
|
||||
|
@ -180,7 +180,7 @@ let gSyncPane = {
|
|||
this.needsUpdate();
|
||||
} else {
|
||||
this.page = PAGE_HAS_ACCOUNT;
|
||||
document.getElementById("accountName").value = Weave.Service.identity.account;
|
||||
document.getElementById("accountName").textContent = Weave.Service.identity.account;
|
||||
document.getElementById("syncComputerName").value = Weave.Service.clientsEngine.localName;
|
||||
document.getElementById("tosPP").hidden = this._usingCustomServer;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
hidden="true"
|
||||
data-category="paneSync">
|
||||
<image class="header-icon"/>
|
||||
<label class="header-name"
|
||||
value="&paneSync.title;"/>
|
||||
<label class="header-name">&paneSync.title;</label>
|
||||
</hbox>
|
||||
|
||||
<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
|
||||
|
@ -48,13 +47,15 @@
|
|||
</description>
|
||||
<separator/>
|
||||
<label class="text-link"
|
||||
onclick="event.stopPropagation(); gSyncPane.openSetup(null);"
|
||||
value="&setupButton.label;"/>
|
||||
onclick="event.stopPropagation(); gSyncPane.openSetup(null);">
|
||||
&setupButton.label;
|
||||
</label>
|
||||
<vbox id="pairDevice">
|
||||
<separator/>
|
||||
<label class="text-link"
|
||||
onclick="event.stopPropagation(); gSyncPane.openSetup('pair');"
|
||||
value="&pairDevice.label;"/>
|
||||
onclick="event.stopPropagation(); gSyncPane.openSetup('pair');">
|
||||
&pairDevice.label;
|
||||
</label>
|
||||
</vbox>
|
||||
<spacer flex="3"/>
|
||||
</vbox>
|
||||
|
@ -64,7 +65,7 @@
|
|||
<!-- label is set to account name -->
|
||||
<caption id="accountCaption" align="center">
|
||||
<image id="accountCaptionImage"/>
|
||||
<label id="accountName" value=""/>
|
||||
<label id="accountName"/>
|
||||
</caption>
|
||||
|
||||
<hbox>
|
||||
|
@ -89,12 +90,13 @@
|
|||
<hbox>
|
||||
<label id="syncAddDeviceLabel"
|
||||
class="text-link"
|
||||
onclick="gSyncPane.openAddDevice(); return false;"
|
||||
value="&pairDevice.label;"/>
|
||||
onclick="gSyncPane.openAddDevice(); return false;">
|
||||
&pairDevice.label;
|
||||
</label>
|
||||
</hbox>
|
||||
|
||||
<vbox>
|
||||
<label value="&syncMy.label;" />
|
||||
<label>&syncMy.label;</label>
|
||||
<richlistbox id="syncEnginesList"
|
||||
orient="vertical"
|
||||
onselect="if (this.selectedCount) this.clearSelection();">
|
||||
|
@ -140,9 +142,10 @@
|
|||
</columns>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<label value="&syncDeviceName.label;"
|
||||
accesskey="&syncDeviceName.accesskey;"
|
||||
control="syncComputerName"/>
|
||||
<label accesskey="&syncDeviceName.accesskey;"
|
||||
control="syncComputerName">
|
||||
&syncDeviceName.label;
|
||||
</label>
|
||||
<textbox id="syncComputerName"
|
||||
onchange="gSyncUtils.changeName(this)"/>
|
||||
</row>
|
||||
|
@ -150,59 +153,68 @@
|
|||
</grid>
|
||||
<hbox>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.startOver(true); return false;"
|
||||
value="&unlinkDevice.label;"/>
|
||||
onclick="gSyncPane.startOver(true); return false;">
|
||||
&unlinkDevice.label;
|
||||
</label>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
<hbox id="tosPP" pack="center">
|
||||
<label class="text-link"
|
||||
onclick="event.stopPropagation();gSyncUtils.openToS();"
|
||||
value="&prefs.tosLink.label;"/>
|
||||
onclick="event.stopPropagation();gSyncUtils.openToS();">
|
||||
&prefs.tosLink.label;
|
||||
</label>
|
||||
<label class="text-link"
|
||||
onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();"
|
||||
value="&prefs.ppLink.label;"/>
|
||||
onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();">
|
||||
&prefs.ppLink.label;
|
||||
</label>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<vbox id="needsUpdate" align="center" pack="center">
|
||||
<hbox>
|
||||
<label id="loginError" value=""/>
|
||||
<label id="loginError"/>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.updatePass(); return false;"
|
||||
value="&updatePass.label;"/>
|
||||
onclick="gSyncPane.updatePass(); return false;">
|
||||
&updatePass.label;
|
||||
</label>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.resetPass(); return false;"
|
||||
value="&resetPass.label;"/>
|
||||
onclick="gSyncPane.resetPass(); return false;">
|
||||
&resetPass.label;
|
||||
</label>
|
||||
</hbox>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.startOver(true); return false;"
|
||||
value="&unlinkDevice.label;"/>
|
||||
onclick="gSyncPane.startOver(true); return false;">
|
||||
&unlinkDevice.label;
|
||||
</label>
|
||||
</vbox>
|
||||
|
||||
<!-- These panels are for the Firefox Accounts identity provider -->
|
||||
<vbox id="fxaDeterminingStatus" align="center">
|
||||
<spacer flex="1"/>
|
||||
<label value="&determiningAcctStatus.label;"/>
|
||||
<label>&determiningAcctStatus.label;</label>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="noFxaAccount">
|
||||
<label>&welcome.description;</label>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.signUp(); return false;"
|
||||
value="&welcome.createAccount.label;"/>
|
||||
onclick="gSyncPane.signUp(); return false;">
|
||||
&welcome.createAccount.label;
|
||||
</label>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.signIn(); return false;"
|
||||
value="&welcome.signIn.label;"/>
|
||||
onclick="gSyncPane.signIn(); return false;">
|
||||
&welcome.signIn.label;
|
||||
</label>
|
||||
<separator/>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.openOldSyncSupportPage(); return false;"
|
||||
value="&welcome.useOldSync.label;"/>
|
||||
onclick="gSyncPane.openOldSyncSupportPage(); return false;">
|
||||
&welcome.useOldSync.label;
|
||||
</label>
|
||||
</vbox>
|
||||
|
||||
<vbox id="hasFxaAccount">
|
||||
<groupbox id="fxaGroup">
|
||||
<caption label="&syncBrand.fxAccount.label;"/>
|
||||
<caption><label>&syncBrand.fxAccount.label;</label></caption>
|
||||
|
||||
<deck id="fxaLoginStatus">
|
||||
|
||||
|
@ -211,8 +223,9 @@
|
|||
<label id="fxaEmailAddress1"/>
|
||||
<vbox>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.manageFirefoxAccount();"
|
||||
value="&manage.label;"/>
|
||||
onclick="gSyncPane.manageFirefoxAccount();">
|
||||
&manage.label;
|
||||
</label>
|
||||
</vbox>
|
||||
<spacer flex="1"/>
|
||||
<vbox>
|
||||
|
@ -234,8 +247,9 @@
|
|||
<button oncommand="gSyncPane.verifyFirefoxAccount();"
|
||||
label="&verify.label;"/>
|
||||
<label class="text-link"
|
||||
onclick="/* no warning as account can't have previously synced */ gSyncPane.unlinkFirefoxAccount(false);"
|
||||
value="&forget.label;"/>
|
||||
onclick="/* no warning as account can't have previously synced */ gSyncPane.unlinkFirefoxAccount(false);">
|
||||
&forget.label;
|
||||
</label>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
|
@ -251,15 +265,16 @@
|
|||
<button oncommand="gSyncPane.reSignIn();"
|
||||
label="&signIn.label;"/>
|
||||
<label class="text-link"
|
||||
onclick="gSyncPane.unlinkFirefoxAccount(true);"
|
||||
value="&forget.label;"/>
|
||||
onclick="gSyncPane.unlinkFirefoxAccount(true);">
|
||||
&forget.label;
|
||||
</label>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</deck>
|
||||
</groupbox>
|
||||
|
||||
<groupbox id="syncOptions">
|
||||
<caption label="&syncBrand.shortName.label;"/>
|
||||
<caption><label>&syncBrand.shortName.label;</label></caption>
|
||||
<hbox id="fxaSyncEngines">
|
||||
<vbox>
|
||||
<checkbox label="&engine.tabs.label;"
|
||||
|
@ -296,9 +311,10 @@
|
|||
</hbox>
|
||||
</groupbox>
|
||||
<hbox align="center">
|
||||
<label value="&syncDeviceName.label;"
|
||||
accesskey="&syncDeviceName.accesskey;"
|
||||
control="syncComputerName"/>
|
||||
<label accesskey="&syncDeviceName.accesskey;"
|
||||
control="syncComputerName">
|
||||
&syncDeviceName.label;
|
||||
</label>
|
||||
<textbox id="fxaSyncComputerName"
|
||||
flex="1"
|
||||
onchange="gSyncUtils.changeName(this)"/>
|
||||
|
@ -306,11 +322,13 @@
|
|||
<spacer flex="1"/>
|
||||
<hbox id="tosPP" pack="center">
|
||||
<label class="text-link small"
|
||||
onclick="event.stopPropagation();gSyncUtils.openToS();"
|
||||
value="&prefs.tosLink.label;"/>
|
||||
onclick="event.stopPropagation();gSyncUtils.openToS();">
|
||||
&prefs.tosLink.label;
|
||||
</label>
|
||||
<label class="text-link small"
|
||||
onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();"
|
||||
value="&fxaPrivacyNotice.link.label;"/>
|
||||
onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();">
|
||||
&fxaPrivacyNotice.link.label;
|
||||
</label>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</deck>
|
||||
|
|
|
@ -576,7 +576,8 @@ Toolbox.prototype = {
|
|||
"command-button-paintflashing",
|
||||
"command-button-tilt",
|
||||
"command-button-scratchpad",
|
||||
"command-button-eyedropper"
|
||||
"command-button-eyedropper",
|
||||
"command-button-screenshot"
|
||||
].map(id => {
|
||||
let button = this.doc.getElementById(id);
|
||||
// Some buttons may not exist inside of Browser Toolbox
|
||||
|
|
|
@ -100,7 +100,7 @@ browser.jar:
|
|||
content/browser/devtools/framework/toolbox-window.xul (framework/toolbox-window.xul)
|
||||
content/browser/devtools/framework/toolbox-options.xul (framework/toolbox-options.xul)
|
||||
content/browser/devtools/framework/toolbox-options.js (framework/toolbox-options.js)
|
||||
* content/browser/devtools/framework/toolbox.xul (framework/toolbox.xul)
|
||||
content/browser/devtools/framework/toolbox.xul (framework/toolbox.xul)
|
||||
content/browser/devtools/framework/options-panel.css (framework/options-panel.css)
|
||||
content/browser/devtools/framework/toolbox-process-window.xul (framework/toolbox-process-window.xul)
|
||||
content/browser/devtools/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
|
||||
|
|
|
@ -34,6 +34,8 @@ function startTests() {
|
|||
populateTree();
|
||||
testTreeItemInsertedCorrectly();
|
||||
testAPI();
|
||||
populateUnsortedTree();
|
||||
testUnsortedTreeItemInsertedCorrectly();
|
||||
endTests();
|
||||
}
|
||||
|
||||
|
@ -119,6 +121,41 @@ function testTreeItemInsertedCorrectly() {
|
|||
"Newly added node is inserted at the right location");
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the unsorted tree.
|
||||
*/
|
||||
function populateUnsortedTree() {
|
||||
tree.sorted = false;
|
||||
|
||||
tree.add([{ id: "g-1", label: "g-1"}])
|
||||
tree.add(["g-1", { id: "d-2", label: "d-2.1"}]);
|
||||
tree.add(["g-1", { id: "b-2", label: "b-2.2"}]);
|
||||
tree.add(["g-1", { id: "a-2", label: "a-2.3"}]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if the nodes are inserted correctly in the unsorted tree.
|
||||
*/
|
||||
function testUnsortedTreeItemInsertedCorrectly() {
|
||||
ok(tree.root.items.has("g-1"), "g-1 top level element exists");
|
||||
|
||||
is(tree.root.children.firstChild.lastChild.children.length, 3,
|
||||
"Number of children for g-1 matches");
|
||||
is(tree.root.children.firstChild.dataset.id, JSON.stringify(["g-1"]),
|
||||
"Data id of g-1 matches");
|
||||
is(tree.root.children.firstChild.firstChild.textContent, "g-1",
|
||||
"Text content of g-1 matches");
|
||||
is(tree.root.children.firstChild.lastChild.firstChild.dataset.id,
|
||||
JSON.stringify(["g-1", "d-2"]),
|
||||
"Data id of d-2 matches");
|
||||
is(tree.root.children.firstChild.lastChild.firstChild.textContent, "d-2.1",
|
||||
"Text content of d-2 matches");
|
||||
is(tree.root.children.firstChild.lastChild.firstChild.nextSibling.textContent,
|
||||
"b-2.2", "Text content of b-2 matches");
|
||||
is(tree.root.children.firstChild.lastChild.lastChild.textContent, "a-2.3",
|
||||
"Text content of a-2 matches");
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if the API exposed by TreeWidget works properly
|
||||
*/
|
||||
|
|
|
@ -18,6 +18,8 @@ const EventEmitter = require("devtools/toolkit/event-emitter");
|
|||
* @param {Object} options
|
||||
* - emptyText {string}: text to display when no entries in the table.
|
||||
* - defaultType {string}: The default type of the tree items. For ex. 'js'
|
||||
* - sorted {boolean}: Defaults to true. If true, tree items are kept in
|
||||
* lexical order. If false, items will be kept in insertion order.
|
||||
*/
|
||||
function TreeWidget(node, options={}) {
|
||||
EventEmitter.decorate(this);
|
||||
|
@ -26,9 +28,9 @@ function TreeWidget(node, options={}) {
|
|||
this.window = this.document.defaultView;
|
||||
this._parent = node;
|
||||
|
||||
let {emptyText, defaultType} = options;
|
||||
this.emptyText = emptyText || "";
|
||||
this.defaultType = defaultType;
|
||||
this.emptyText = options.emptyText || "";
|
||||
this.defaultType = options.defaultType;
|
||||
this.sorted = options.sorted !== false;
|
||||
|
||||
this.setupRoot();
|
||||
|
||||
|
@ -245,7 +247,7 @@ TreeWidget.prototype = {
|
|||
* its id.
|
||||
*/
|
||||
add: function(items) {
|
||||
this.root.add(items, this.defaultType);
|
||||
this.root.add(items, this.defaultType, this.sorted);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].attachment) {
|
||||
this.attachments.set(JSON.stringify(
|
||||
|
@ -459,8 +461,11 @@ TreeItem.prototype = {
|
|||
* Same as TreeWidget.add method's argument
|
||||
* @param {string} defaultType
|
||||
* The default type of the item to be used when items[i].type is null
|
||||
* @param {boolean} sorted
|
||||
* true if the tree items are inserted in a lexically sorted manner.
|
||||
* Otherwise, false if the item are to be appended to their parent.
|
||||
*/
|
||||
add: function(items, defaultType) {
|
||||
add: function(items, defaultType, sorted) {
|
||||
if (items.length == this.level) {
|
||||
// This is the exit condition of recursive TreeItem.add calls
|
||||
return;
|
||||
|
@ -470,7 +475,7 @@ TreeItem.prototype = {
|
|||
if (this.items.has(id)) {
|
||||
// An item with same id already exists, thus calling the add method of that
|
||||
// child to add the passed node at correct position.
|
||||
this.items.get(id).add(items, defaultType);
|
||||
this.items.get(id).add(items, defaultType, sorted);
|
||||
return;
|
||||
}
|
||||
// No item with the id `id` exists, so we create one and call the add
|
||||
|
@ -486,19 +491,27 @@ TreeItem.prototype = {
|
|||
}
|
||||
let treeItem = new TreeItem(this.document, this, node || label,
|
||||
items[this.level].type || defaultType);
|
||||
let nextSibling = [...this.items.values()].find(child => {
|
||||
return child.label.textContent >= label;
|
||||
});
|
||||
treeItem.add(items, defaultType);
|
||||
|
||||
treeItem.add(items, defaultType, sorted);
|
||||
treeItem.node.setAttribute("data-id", JSON.stringify(
|
||||
items.slice(0, this.level + 1).map(item => item.id || item)
|
||||
));
|
||||
// Inserting this newly created item at correct position
|
||||
if (nextSibling) {
|
||||
this.children.insertBefore(treeItem.node, nextSibling.node);
|
||||
|
||||
if (sorted) {
|
||||
// Inserting this newly created item at correct position
|
||||
let nextSibling = [...this.items.values()].find(child => {
|
||||
return child.label.textContent >= label;
|
||||
});
|
||||
|
||||
if (nextSibling) {
|
||||
this.children.insertBefore(treeItem.node, nextSibling.node);
|
||||
} else {
|
||||
this.children.appendChild(treeItem.node);
|
||||
}
|
||||
} else {
|
||||
this.children.appendChild(treeItem.node);
|
||||
}
|
||||
|
||||
if (this.label) {
|
||||
this.label.removeAttribute("empty");
|
||||
}
|
||||
|
|
|
@ -3698,6 +3698,10 @@ VariablesView.stringifiers.byObjectKind = {
|
|||
if (attrs.id) {
|
||||
result += "#" + attrs.id;
|
||||
}
|
||||
|
||||
if (attrs.class) {
|
||||
result += "." + attrs.class.trim().replace(/\s+/, ".");
|
||||
}
|
||||
return result + ">";
|
||||
}
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@ support-files =
|
|||
[browser_console_optimized_out_vars.js]
|
||||
[browser_console_private_browsing.js]
|
||||
[browser_console_variables_view.js]
|
||||
[browser_console_variables_view_dom_nodes.js]
|
||||
[browser_console_variables_view_dont_sort_non_sortable_classes_properties.js]
|
||||
[browser_console_variables_view_while_debugging.js]
|
||||
[browser_console_variables_view_while_debugging_and_inspecting.js]
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
/* Test that ensures DOM nodes are rendered correctly in VariablesView. */
|
||||
|
||||
function test() {
|
||||
const TEST_URI = 'data:text/html;charset=utf-8, \
|
||||
<html> \
|
||||
<head> \
|
||||
<title>Test for DOM nodes in variables view</title> \
|
||||
</head> \
|
||||
<body> \
|
||||
<div></div> \
|
||||
<div id="testID"></div> \
|
||||
<div class="single-class"></div> \
|
||||
<div class="multiple-classes another-class"></div> \
|
||||
<div class="class-and-id" id="class-and-id"></div> \
|
||||
<div class="multiple-classes-and-id another-class" \
|
||||
id="multiple-classes-and-id"></div> \
|
||||
<div class=" whitespace-start"></div> \
|
||||
<div class="whitespace-end "></div> \
|
||||
<div class="multiple spaces"></div> \
|
||||
</body> \
|
||||
</html>';
|
||||
|
||||
Task.spawn(runner).then(finishTest);
|
||||
|
||||
function* runner() {
|
||||
const {tab} = yield loadTab(TEST_URI);
|
||||
const hud = yield openConsole(tab);
|
||||
const jsterm = hud.jsterm;
|
||||
|
||||
let deferred = promise.defer();
|
||||
jsterm.once("variablesview-fetched", (_, aVar) => deferred.resolve(aVar));
|
||||
jsterm.execute("inspect(document.querySelectorAll('div'))");
|
||||
|
||||
let variableScope = yield deferred.promise;
|
||||
ok(variableScope, "Variables view opened");
|
||||
|
||||
yield findVariableViewProperties(variableScope, [
|
||||
{ name: "0", value: "<div>"},
|
||||
{ name: "1", value: "<div#testID>"},
|
||||
{ name: "2", value: "<div.single-class>"},
|
||||
{ name: "3", value: "<div.multiple-classes.another-class>"},
|
||||
{ name: "4", value: "<div#class-and-id.class-and-id>"},
|
||||
{ name: "5", value: "<div#multiple-classes-and-id.multiple-classes-and-id.another-class>"},
|
||||
{ name: "6", value: "<div.whitespace-start>"},
|
||||
{ name: "7", value: "<div.whitespace-end>"},
|
||||
{ name: "8", value: "<div.multiple.spaces>"},
|
||||
], { webconsole: hud});
|
||||
|
||||
}
|
||||
}
|
|
@ -125,6 +125,9 @@ screenshotErrorCopying=Error occurred while copying to clipboard.
|
|||
# screenshot is successfully copied to the clipboard.
|
||||
screenshotCopied=Copied to clipboard.
|
||||
|
||||
# LOCALIZATION NOTE (screenshotTooltip) Text displayed as tooltip for screenshot button in devtools ToolBox.
|
||||
screenshotTooltip=Take a fullpage screenshot
|
||||
|
||||
# LOCALIZATION NOTE (restartBrowserDesc) A very short description of the
|
||||
# 'restart' command. This string is designed to be shown in a menu alongside the
|
||||
# command name, which is why it should be as short as possible.
|
||||
|
|
|
@ -25,17 +25,17 @@
|
|||
- the heading of the Inspector group in the options panel. -->
|
||||
<!ENTITY options.context.inspector "Inspector">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.defaultColorUnit.label): This is the label for a
|
||||
- dropdown list that controls the default color unit used in the inspector.
|
||||
- This label is visible in the options panel. -->
|
||||
<!ENTITY options.defaultColorUnit.label "Default color unit">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.showUserAgentStyles.label): This is the label
|
||||
- for the checkbox option to show user agent styles in the Inspector
|
||||
- panel. -->
|
||||
<!ENTITY options.showUserAgentStyles.label "Show Browser Styles">
|
||||
<!ENTITY options.showUserAgentStyles.tooltip "Turning this on will show default styles that are loaded by the browser.">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.defaultColorUnit.label): This is the label for a
|
||||
- dropdown list that controls the default color unit used in the inspector.
|
||||
- This label is visible in the options panel. -->
|
||||
<!ENTITY options.defaultColorUnit.label "Default color unit">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.defaultColorUnit.accesskey): This is the access
|
||||
- key for a dropdown list that controls the default color unit used in the
|
||||
- inspector. This is visible in the options panel. -->
|
||||
|
|
|
@ -157,3 +157,8 @@ a[href] img {
|
|||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.handlersMenuList > .menulist-label-box > .menulist-icon {
|
||||
max-width: 16px;
|
||||
max-height: 16px;
|
||||
}
|
||||
|
|
|
@ -199,6 +199,8 @@ browser.jar:
|
|||
skin/classic/browser/devtools/commandline-icon@2x.png (../shared/devtools/images/commandline-icon@2x.png)
|
||||
skin/classic/browser/devtools/command-paintflashing.png (../shared/devtools/images/command-paintflashing.png)
|
||||
skin/classic/browser/devtools/command-paintflashing@2x.png (../shared/devtools/images/command-paintflashing@2x.png)
|
||||
skin/classic/browser/devtools/command-screenshot.png (../shared/devtools/images/command-screenshot.png)
|
||||
skin/classic/browser/devtools/command-screenshot@2x.png (../shared/devtools/images/command-screenshot@2x.png)
|
||||
skin/classic/browser/devtools/command-responsivemode.png (../shared/devtools/images/command-responsivemode.png)
|
||||
skin/classic/browser/devtools/command-responsivemode@2x.png (../shared/devtools/images/command-responsivemode@2x.png)
|
||||
skin/classic/browser/devtools/command-scratchpad.png (../shared/devtools/images/command-scratchpad.png)
|
||||
|
|
|
@ -149,3 +149,8 @@ a[href] img {
|
|||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.handlersMenuList > .menulist-label-box > .menulist-icon {
|
||||
max-width: 16px;
|
||||
max-height: 16px;
|
||||
}
|
||||
|
|
|
@ -316,6 +316,8 @@ browser.jar:
|
|||
skin/classic/browser/devtools/commandline-icon@2x.png (../shared/devtools/images/commandline-icon@2x.png)
|
||||
skin/classic/browser/devtools/command-paintflashing.png (../shared/devtools/images/command-paintflashing.png)
|
||||
skin/classic/browser/devtools/command-paintflashing@2x.png (../shared/devtools/images/command-paintflashing@2x.png)
|
||||
skin/classic/browser/devtools/command-screenshot.png (../shared/devtools/images/command-screenshot.png)
|
||||
skin/classic/browser/devtools/command-screenshot@2x.png (../shared/devtools/images/command-screenshot@2x.png)
|
||||
skin/classic/browser/devtools/command-responsivemode.png (../shared/devtools/images/command-responsivemode.png)
|
||||
skin/classic/browser/devtools/command-responsivemode@2x.png (../shared/devtools/images/command-responsivemode@2x.png)
|
||||
skin/classic/browser/devtools/command-scratchpad.png (../shared/devtools/images/command-scratchpad.png)
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.2 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.6 KiB |
|
@ -554,6 +554,10 @@
|
|||
background-image: url("chrome://browser/skin/devtools/command-paintflashing.png");
|
||||
}
|
||||
|
||||
#command-button-screenshot > image {
|
||||
background-image: url("chrome://browser/skin/devtools/command-screenshot.png");
|
||||
}
|
||||
|
||||
#command-button-responsive > image {
|
||||
background-image: url("chrome://browser/skin/devtools/command-responsivemode.png");
|
||||
}
|
||||
|
@ -584,6 +588,10 @@
|
|||
background-image: url("chrome://browser/skin/devtools/command-paintflashing@2x.png");
|
||||
}
|
||||
|
||||
#command-button-screenshot > image {
|
||||
background-image: url("chrome://browser/skin/devtools/command-screenshot@2x.png");
|
||||
}
|
||||
|
||||
#command-button-responsive > image {
|
||||
background-image: url("chrome://browser/skin/devtools/command-responsivemode@2x.png");
|
||||
}
|
||||
|
|
|
@ -15,12 +15,16 @@ page {
|
|||
background-image: linear-gradient(#FFFFFF, #EDEDED 100px);
|
||||
}
|
||||
|
||||
* {
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
caption {
|
||||
-moz-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.caption-text {
|
||||
caption > label {
|
||||
font-size: 1.3rem;
|
||||
font-weight: bold;
|
||||
line-height: 22px;
|
||||
|
|
|
@ -157,3 +157,8 @@ a[href] img {
|
|||
vertical-align: middle;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.handlersMenuList > .menulist-label-box > .menulist-icon {
|
||||
max-width: 16px;
|
||||
max-height: 16px;
|
||||
}
|
||||
|
|
|
@ -240,6 +240,8 @@ browser.jar:
|
|||
skin/classic/browser/devtools/commandline.css (devtools/commandline.css)
|
||||
skin/classic/browser/devtools/command-paintflashing.png (../shared/devtools/images/command-paintflashing.png)
|
||||
skin/classic/browser/devtools/command-paintflashing@2x.png (../shared/devtools/images/command-paintflashing@2x.png)
|
||||
skin/classic/browser/devtools/command-screenshot.png (../shared/devtools/images/command-screenshot.png)
|
||||
skin/classic/browser/devtools/command-screenshot@2x.png (../shared/devtools/images/command-screenshot@2x.png)
|
||||
skin/classic/browser/devtools/command-responsivemode.png (../shared/devtools/images/command-responsivemode.png)
|
||||
skin/classic/browser/devtools/command-responsivemode@2x.png (../shared/devtools/images/command-responsivemode@2x.png)
|
||||
skin/classic/browser/devtools/command-scratchpad.png (../shared/devtools/images/command-scratchpad.png)
|
||||
|
@ -629,6 +631,8 @@ browser.jar:
|
|||
skin/classic/aero/browser/devtools/commandline-icon@2x.png (../shared/devtools/images/commandline-icon@2x.png)
|
||||
skin/classic/aero/browser/devtools/command-paintflashing.png (../shared/devtools/images/command-paintflashing.png)
|
||||
skin/classic/aero/browser/devtools/command-paintflashing@2x.png (../shared/devtools/images/command-paintflashing@2x.png)
|
||||
skin/classic/aero/browser/devtools/command-screenshot.png (../shared/devtools/images/command-screenshot.png)
|
||||
skin/classic/aero/browser/devtools/command-screenshot@2x.png (../shared/devtools/images/command-screenshot@2x.png)
|
||||
skin/classic/aero/browser/devtools/command-responsivemode.png (../shared/devtools/images/command-responsivemode.png)
|
||||
skin/classic/aero/browser/devtools/command-responsivemode@2x.png (../shared/devtools/images/command-responsivemode@2x.png)
|
||||
skin/classic/aero/browser/devtools/command-scratchpad.png (../shared/devtools/images/command-scratchpad.png)
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "VorbisTrackEncoder.h"
|
||||
#include "VP8TrackEncoder.h"
|
||||
#include "WebMWriter.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
class WebMVorbisTrackEncoder : public VorbisTrackEncoder
|
||||
{
|
||||
public:
|
||||
bool TestVorbisCreation(int aChannels, int aSamplingRate)
|
||||
{
|
||||
if (NS_SUCCEEDED(Init(aChannels, aSamplingRate))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class WebMVP8TrackEncoder: public VP8TrackEncoder
|
||||
{
|
||||
public:
|
||||
bool TestVP8Creation(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth,
|
||||
int32_t aDisplayHeight, TrackRate aTrackRate)
|
||||
{
|
||||
if (NS_SUCCEEDED(Init(aWidth, aHeight, aDisplayWidth, aDisplayHeight,
|
||||
aTrackRate))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const uint64_t FIXED_DURATION = 1000000;
|
||||
const uint32_t FIXED_FRAMESIZE = 500;
|
||||
|
||||
class TestWebMWriter: public WebMWriter
|
||||
{
|
||||
public:
|
||||
TestWebMWriter(int aTrackTypes)
|
||||
: WebMWriter(aTrackTypes),
|
||||
mTimestamp(0)
|
||||
{}
|
||||
|
||||
void SetVorbisMetadata(int aChannels, int aSampleRate) {
|
||||
WebMVorbisTrackEncoder vorbisEncoder;
|
||||
EXPECT_TRUE(vorbisEncoder.TestVorbisCreation(aChannels, aSampleRate));
|
||||
nsRefPtr<TrackMetadataBase> vorbisMeta = vorbisEncoder.GetMetadata();
|
||||
SetMetadata(vorbisMeta);
|
||||
}
|
||||
void SetVP8Metadata(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth,
|
||||
int32_t aDisplayHeight,TrackRate aTrackRate) {
|
||||
WebMVP8TrackEncoder vp8Encoder;
|
||||
EXPECT_TRUE(vp8Encoder.TestVP8Creation(aWidth, aHeight, aDisplayWidth,
|
||||
aDisplayHeight, aTrackRate));
|
||||
nsRefPtr<TrackMetadataBase> vp8Meta = vp8Encoder.GetMetadata();
|
||||
SetMetadata(vp8Meta);
|
||||
}
|
||||
|
||||
// When we append an I-Frame into WebM muxer, the muxer will treat previous
|
||||
// data as "a cluster".
|
||||
// In these test cases, we will call the function many times to enclose the
|
||||
// previous cluster so that we can retrieve data by |GetContainerData|.
|
||||
void AppendDummyFrame(EncodedFrame::FrameType aFrameType,
|
||||
uint64_t aDuration) {
|
||||
EncodedFrameContainer encodedVideoData;
|
||||
nsTArray<uint8_t> frameData;
|
||||
nsRefPtr<EncodedFrame> videoData = new EncodedFrame();
|
||||
// Create dummy frame data.
|
||||
frameData.SetLength(FIXED_FRAMESIZE);
|
||||
videoData->SetFrameType(aFrameType);
|
||||
videoData->SetTimeStamp(mTimestamp);
|
||||
videoData->SetDuration(aDuration);
|
||||
videoData->SwapInFrameData(frameData);
|
||||
encodedVideoData.AppendEncodedFrame(videoData);
|
||||
WriteEncodedTrack(encodedVideoData, 0);
|
||||
mTimestamp += aDuration;
|
||||
}
|
||||
|
||||
bool HaveValidCluster() {
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
GetContainerData(&encodedBuf, 0);
|
||||
return (encodedBuf.Length() > 0) ? true : false;
|
||||
}
|
||||
|
||||
// Timestamp accumulator that increased by AppendDummyFrame.
|
||||
// Keep it public that we can do some testcases about it.
|
||||
uint64_t mTimestamp;
|
||||
};
|
||||
|
||||
TEST(WebMWriter, Metadata)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
|
||||
// The output should be empty since we didn't set any metadata in writer.
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
|
||||
// Set vorbis metadata.
|
||||
int channel = 1;
|
||||
int sampleRate = 44100;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
|
||||
// No output data since we didn't set both audio/video
|
||||
// metadata in writer.
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
|
||||
// Set vp8 metadata
|
||||
int32_t width = 640;
|
||||
int32_t height = 480;
|
||||
int32_t displayWidth = 640;
|
||||
int32_t displayHeight = 480;
|
||||
TrackRate aTrackRate = 90000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
}
|
||||
|
||||
TEST(WebMWriter, Cluster)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
// Set vorbis metadata.
|
||||
int channel = 1;
|
||||
int sampleRate = 48000;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
// Set vp8 metadata
|
||||
int32_t width = 320;
|
||||
int32_t height = 240;
|
||||
int32_t displayWidth = 320;
|
||||
int32_t displayHeight = 240;
|
||||
TrackRate aTrackRate = 90000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
encodedBuf.Clear();
|
||||
|
||||
uint64_t timestamp = 0;
|
||||
// write the first I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// No data because the cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// The second I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Should have data because the first cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
|
||||
// P-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// No data because the cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// The third I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Should have data because the second cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
}
|
||||
|
||||
TEST(WebMWriter, FLUSH_NEEDED)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
// Set vorbis metadata.
|
||||
int channel = 2;
|
||||
int sampleRate = 44100;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
// Set vp8 metadata
|
||||
int32_t width = 176;
|
||||
int32_t height = 352;
|
||||
int32_t displayWidth = 176;
|
||||
int32_t displayHeight = 352;
|
||||
TrackRate aTrackRate = 100000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
uint64_t timestamp = 0;
|
||||
// write the first I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
|
||||
// P-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// Have data because the metadata is finished.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
// No data because the cluster is not closed and the metatdata had been
|
||||
// retrieved
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
// Have data because the flag ContainerWriter::FLUSH_NEEDED
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
encodedBuf.Clear();
|
||||
|
||||
// P-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// No data because there is no cluster right now. The I-Frame had been
|
||||
// flushed out.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// I-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// No data because a cluster must starts form I-Frame and the
|
||||
// cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// I-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Have data because the previous cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
}
|
|
@ -14,6 +14,7 @@ UNIFIED_SOURCES += [
|
|||
if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
UNIFIED_SOURCES += ['TestVideoTrackEncoder.cpp',
|
||||
'TestVorbisTrackEncoder.cpp',
|
||||
'TestWebMWriter.cpp',
|
||||
]
|
||||
|
||||
EXPORT_LIBRARY = True
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "base/message_loop.h"
|
||||
|
||||
#include "BluetoothCommon.h"
|
||||
|
@ -38,6 +40,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla::dom::gonk;
|
||||
using namespace android;
|
||||
|
@ -496,6 +499,26 @@ AudioManager::~AudioManager() {
|
|||
}
|
||||
}
|
||||
|
||||
static StaticRefPtr<AudioManager> sAudioManager;
|
||||
|
||||
already_AddRefed<AudioManager>
|
||||
AudioManager::GetInstance()
|
||||
{
|
||||
// Avoid createing AudioManager from content process.
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
MOZ_CRASH("Non-chrome processes should not get here.");
|
||||
}
|
||||
|
||||
// Avoid createing multiple AudioManager instance inside main process.
|
||||
if (!sAudioManager) {
|
||||
sAudioManager = new AudioManager();
|
||||
ClearOnShutdown(&sAudioManager);
|
||||
}
|
||||
|
||||
nsRefPtr<AudioManager> audioMgr = sAudioManager.get();
|
||||
return audioMgr.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AudioManager::GetMicrophoneMuted(bool* aMicrophoneMuted)
|
||||
{
|
||||
|
|
|
@ -42,13 +42,12 @@ class AudioManager : public nsIAudioManager
|
|||
, public nsIObserver
|
||||
{
|
||||
public:
|
||||
static already_AddRefed<AudioManager> GetInstance();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIAUDIOMANAGER
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
AudioManager();
|
||||
~AudioManager();
|
||||
|
||||
// When audio backend is dead, recovery task needs to read all volume
|
||||
// settings then set back into audio backend.
|
||||
friend class RecoverTask;
|
||||
|
@ -74,6 +73,9 @@ private:
|
|||
const char* aTopic,
|
||||
const nsCString aAddress);
|
||||
void HandleAudioChannelProcessChanged();
|
||||
|
||||
AudioManager();
|
||||
~AudioManager();
|
||||
};
|
||||
|
||||
} /* namespace gonk */
|
||||
|
|
|
@ -2962,6 +2962,151 @@ this.INFO_REC_EXTENDED_DISPLAY_ORIGINAL_CALLED_NUMBER = 0x99;
|
|||
this.INFO_REC_EXTENDED_DISPLAY_CONNECTED_NUMBER = 0x9A;
|
||||
this.INFO_REC_EXTENDED_DISPLAY_TEXT = 0x9B;
|
||||
|
||||
/**
|
||||
* The table for MCC/MNC which the length of MNC is 3.
|
||||
*
|
||||
* This table is built from below links.
|
||||
* - http://www.itu.int/pub/T-SP-E.212B-2013
|
||||
* - http://en.wikipedia.org/wiki/Mobile_Network_Code
|
||||
*/
|
||||
this.PLMN_HAVING_3DIGITS_MNC = {
|
||||
// Puerto Rico.
|
||||
"330":
|
||||
["110", // América Móvil
|
||||
"120" // PR Wireless
|
||||
],
|
||||
// Trinidad and Tobago.
|
||||
"374":
|
||||
["130", // Digicel Trinidad and Tobago Ltd.
|
||||
"140" // LaqTel Ltd.
|
||||
],
|
||||
// India.
|
||||
"405":
|
||||
["000", // Shyam Telelink Ltd.
|
||||
"005", // Reliance, Delhi
|
||||
"006", // Reliance, Gujarat
|
||||
"007", // Reliance, Haryana
|
||||
"009", // Reliance, J&K
|
||||
"010", // Reliance, Karnataka
|
||||
"011", // Reliance, Kerala
|
||||
"012", // Reliance, Andhra Pradesh
|
||||
"013", // Reliance, Maharashtr
|
||||
"014", // Reliance, Madhya Pradesh
|
||||
"018", // Reliance, Punjab
|
||||
"020", // Reliance, Tamilnadu
|
||||
"021", // Reliance, UP (East)
|
||||
"022", // Reliance, UP (West)
|
||||
"025", // TATA DOCOMO, Andhra Pradesh
|
||||
"026", // TATA DOCOMO, Assam
|
||||
"027", // TATA DOCOMO, Bihar
|
||||
"028", // TATA DOCOMO, Chennai
|
||||
"029", // TATA DOCOMO, Delhi
|
||||
"030", // TATA DOCOMO, Gujarat
|
||||
"031", // TATA DOCOMO, Haryana
|
||||
"032", // TATA DOCOMO, Himachal Pradesh
|
||||
"033", // Reliance, Bihar
|
||||
"034", // TATA DOCOMO, Kamataka
|
||||
"035", // TATA DOCOMO, Kerala
|
||||
"036", // TATA DOCOMO, Kolkata
|
||||
"037", // TATA DOCOMO, Maharashtra
|
||||
"038", // TATA DOCOMO, Madhya Pradesh
|
||||
"039", // TATA DOCOMO, Mumbai
|
||||
"040", // Reliance, Chennai
|
||||
"041", // TATA DOCOMO, Orissa
|
||||
"042", // TATA DOCOMO, Punjab
|
||||
"043", // TATA DOCOMO, Rajasthan
|
||||
"044", // TATA DOCOMO, Tamilnadu
|
||||
"045", // TATA DOCOMO, UP (East)
|
||||
"046", // TATA DOCOMO, UP (West)
|
||||
"047", // TATA DOCOMO, West Bengal
|
||||
"750", // Vodafone IN, J&K
|
||||
"751", // Vodafone IN, Assam
|
||||
"752", // Vodafone IN, Bihar
|
||||
"753", // Vodafone IN, Orissa
|
||||
"754", // Vodafone IN, Himachal Pradesh
|
||||
"755", // Vodafone IN, North East
|
||||
"756", // Vodafone IN, Madhya Pradesh & Chhattisgarh
|
||||
"799", // Idea, MUMBAI
|
||||
"800", // Aircell, Delhi
|
||||
"801", // Aircell, Andhra Pradesh
|
||||
"802", // Aircell, Gujarat
|
||||
"803", // Aircell, Kamataka
|
||||
"804", // Aircell, Maharashtra
|
||||
"805", // Aircell, Mumbai
|
||||
"806", // Aircell, Rajasthan
|
||||
"807", // Aircell, Haryana
|
||||
"808", // Aircell, Madhya Pradesh
|
||||
"809", // Aircell, Kerala
|
||||
"810", // Aircell, Uttar Pradesh (East)
|
||||
"811", // Aircell, Uttar Pradesh (West)
|
||||
"812", // Aircell, Punjab
|
||||
"818", // Uninor, Uttar Pradesh (West)
|
||||
"819", // Uninor, Andhra Pradesh
|
||||
"820", // Uninor, Karnataka
|
||||
"821", // Uninor, Kerala
|
||||
"822", // Uninor, Kolkata
|
||||
"824", // Videocon, Assam
|
||||
"827", // Videocon, Gujarat
|
||||
"834", // Videocon, Madhya Pradesh
|
||||
"840", // Jio, West Bengal
|
||||
"844", // Uninor, Delhi & NCR
|
||||
"845", // IDEA, Assam
|
||||
"846", // IDEA, Jammu & Kashmir
|
||||
"847", // IDEA, Karnataka
|
||||
"848", // IDEA, Kolkata
|
||||
"849", // IDEA, North East
|
||||
"850", // IDEA, Orissa
|
||||
"851", // IDEA, Punjab
|
||||
"852", // IDEA, Tamil Nadu
|
||||
"853", // IDEA, West Bengal
|
||||
"854", // Jio, Andra Pradesh
|
||||
"855", // Jio, Assam
|
||||
"856", // Jio, Bihar
|
||||
"857", // Jio, Gujarat
|
||||
"858", // Jio, Haryana
|
||||
"859", // Jio, Himachal Pradesh
|
||||
"860", // Jio, Jammu Kashmir
|
||||
"861", // Jio, Karnataka
|
||||
"862", // Jio, Kerala
|
||||
"863", // Jio, Madhyya Pradesh
|
||||
"864", // Jio, Maharashtra
|
||||
"865", // Jio, North East
|
||||
"866", // Jio, Orissa
|
||||
"867", // Jio, Punjab
|
||||
"868", // Jio, Rajasthan
|
||||
"869", // Jio, Tamil Nadu Chennai
|
||||
"870", // Jio, Uttar Pradesh West
|
||||
"871", // Jio, Uttar Pradesh East
|
||||
"872", // Jio, Delhi
|
||||
"873", // Jio, Kolkatta
|
||||
"874", // Jio, Mumbai
|
||||
"875", // Uninor, Assam
|
||||
"880", // Uninor, West Bengal
|
||||
"881", // S Tel, Assam
|
||||
"908", // IDEA, Andhra Pradesh
|
||||
"909", // IDEA, Delhi
|
||||
"910", // IDEA, Haryana
|
||||
"911", // Etisalat, Maharashtra
|
||||
"912", // Etisalat, Andhra Pradesh
|
||||
"913", // Etisalat, Delhi & NCR
|
||||
"914", // Etisalat, Gujarat
|
||||
"917", // Etisalat, Kerala
|
||||
"927", // Uninor, Gujarat
|
||||
"929" // Uninor, Maharashtra
|
||||
],
|
||||
// Malaysia.
|
||||
"502":
|
||||
["150", // Tune Talk Sdn Bhd
|
||||
"151", // Baraka Telecom Sdn Bhd (MVNE)
|
||||
"152", // YTL Communications Sdn Bhd
|
||||
"156" // Altel Communications Sdn Bhd
|
||||
],
|
||||
// Brazil.
|
||||
"724":
|
||||
["055" // Sercomtel
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
* The table for MCC which the length of MNC is 3
|
||||
*
|
||||
|
@ -2992,7 +3137,6 @@ this.MCC_TABLE_FOR_MNC_LENGTH_IS_3 = [
|
|||
"365", // Anguilla
|
||||
"366", // Dominica
|
||||
"376", // Turks and Caicos Islands
|
||||
"405", // India
|
||||
"708", // Honduras
|
||||
"722", // Argentina
|
||||
"732", // Colombia
|
||||
|
|
|
@ -14142,9 +14142,16 @@ ICCUtilsHelperObject.prototype = {
|
|||
// MCC is the first 3 digits of IMSI.
|
||||
let mcc = imsi.substr(0,3);
|
||||
if (!mncLength) {
|
||||
// Check the MCC table to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
// Check the MCC/MNC table for MNC length = 3 first for the case we don't
|
||||
// have the 4th byte data from EF_AD.
|
||||
if (PLMN_HAVING_3DIGITS_MNC[mcc] &&
|
||||
PLMN_HAVING_3DIGITS_MNC[mcc].indexOf(imsi.substr(3, 3)) !== -1) {
|
||||
mncLength = 3;
|
||||
} else {
|
||||
// Check the MCC table to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
}
|
||||
}
|
||||
let mnc = imsi.substr(3, mncLength);
|
||||
if (DEBUG) {
|
||||
|
|
|
@ -55,6 +55,23 @@ let emulator = (function() {
|
|||
* Telephony related helper functions.
|
||||
*/
|
||||
(function() {
|
||||
/**
|
||||
* @return Promise
|
||||
*/
|
||||
function delay(ms) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let startTime = Date.now();
|
||||
waitFor(function() {
|
||||
deferred.resolve();
|
||||
},function() {
|
||||
let duration = Date.now() - startTime;
|
||||
return (duration >= ms);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Promise
|
||||
*/
|
||||
|
@ -1016,6 +1033,7 @@ let emulator = (function() {
|
|||
* Public members.
|
||||
*/
|
||||
|
||||
this.gDelay = delay;
|
||||
this.gCheckInitialState = checkInitialState;
|
||||
this.gClearCalls = clearCalls;
|
||||
this.gOutCallStrPool = outCallStrPool;
|
||||
|
|
|
@ -34,6 +34,7 @@ startTestWithPermissions(['mobileconnection'], function() {
|
|||
.then(() => gDial("112"))
|
||||
.then(call => { outCall = call; })
|
||||
.then(() => gRemoteAnswer(outCall))
|
||||
.then(() => gDelay(1000)) // See Bug 1018051 for the purpose of the delay.
|
||||
.then(() => gRemoteHangUp(outCall))
|
||||
.then(null, () => {
|
||||
ok(false, "promise rejects during test.");
|
||||
|
|
|
@ -76,7 +76,7 @@ function test_utf8_1()
|
|||
do_check_true(conv.writeString(UNICODE_STRINGS[i]));
|
||||
conv.close();
|
||||
|
||||
if (!equal(new UTF8(pipe.inputStream),
|
||||
if (!equalStreams(new UTF8(pipe.inputStream),
|
||||
stringToCodePoints(UNICODE_STRINGS[i])))
|
||||
do_throw("UNICODE_STRINGS[" + i + "] not handled correctly");
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ function test_utf16_1()
|
|||
do_check_true(conv.writeString(UNICODE_STRINGS[i]));
|
||||
conv.close();
|
||||
|
||||
if (!equal(new UTF16(pipe.inputStream),
|
||||
if (!equalStreams(new UTF16(pipe.inputStream),
|
||||
stringToCodePoints(UNICODE_STRINGS[i])))
|
||||
do_throw("UNICODE_STRINGS[" + i + "] not handled correctly");
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ function test_utf16_2()
|
|||
do_check_true(conv.writeString(UNICODE_STRINGS[i]));
|
||||
conv.close();
|
||||
|
||||
if (!equal(new UTF16(pipe.inputStream, false),
|
||||
if (!equalStreams(new UTF16(pipe.inputStream, false),
|
||||
stringToCodePoints(UNICODE_STRINGS[i])))
|
||||
do_throw("UNICODE_STRINGS[" + i + "] not handled correctly");
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ function test_utf16_3()
|
|||
do_check_true(conv.writeString(UNICODE_STRINGS[i]));
|
||||
conv.close();
|
||||
|
||||
if (!equal(new UTF16(pipe.inputStream, true),
|
||||
if (!equalStreams(new UTF16(pipe.inputStream, true),
|
||||
stringToCodePoints(UNICODE_STRINGS[i])))
|
||||
do_throw("UNICODE_STRINGS[" + i + "] not handled correctly");
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ function getBinaryInputStream(filename, encoding)
|
|||
return new BIS(fis);
|
||||
}
|
||||
|
||||
function equal(stream, codePoints)
|
||||
function equalStreams(stream, codePoints)
|
||||
{
|
||||
var sz, currIndex = 0;
|
||||
while (true)
|
||||
|
|
|
@ -309,7 +309,8 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsSynthVoiceRegistry,
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioManager)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AudioManager,
|
||||
AudioManager::GetInstance)
|
||||
#endif
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChannelAgent)
|
||||
|
|
|
@ -117,7 +117,7 @@ fails == flexbox-inlinecontent-horiz-1b.xhtml flexbox-inlinecontent-horiz-1-ref.
|
|||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-2.xhtml flexbox-inlinecontent-horiz-2-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-3a.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3b.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3c.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
random-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3c.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-4.xhtml flexbox-inlinecontent-horiz-4-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-5.xhtml flexbox-inlinecontent-horiz-5-ref.xhtml
|
||||
|
||||
|
|
|
@ -1617,6 +1617,10 @@ abstract public class BrowserApp extends GeckoApp
|
|||
throw new IllegalArgumentException("Cannot handle null URLs in enterEditingMode");
|
||||
}
|
||||
|
||||
if (mBrowserToolbar.isEditing() || mBrowserToolbar.isAnimating()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Tab selectedTab = Tabs.getInstance().getSelectedTab();
|
||||
mTargetTabForEditingMode = (selectedTab != null ? selectedTab.getId() : null);
|
||||
|
||||
|
|
|
@ -377,10 +377,14 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
|||
editCancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.ACTIONBAR,
|
||||
getResources().getResourceEntryName(editCancel.getId()));
|
||||
cancelEdit();
|
||||
// If we exit editing mode during the animation,
|
||||
// we're put into an inconsistent state (bug 1017276).
|
||||
if (!isAnimatingEntry) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.ACTIONBAR,
|
||||
getResources().getResourceEntryName(editCancel.getId()));
|
||||
cancelEdit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -407,7 +411,9 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
|||
}
|
||||
|
||||
public boolean onBackPressed() {
|
||||
if (isEditing()) {
|
||||
// If we exit editing mode during the animation,
|
||||
// we're put into an inconsistent state (bug 1017276).
|
||||
if (isEditing() && !isAnimatingEntry) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.CANCEL,
|
||||
TelemetryContract.Method.BACK);
|
||||
cancelEdit();
|
||||
|
@ -934,6 +940,10 @@ public class BrowserToolbar extends ThemedRelativeLayout
|
|||
return (uiMode == UIMode.EDIT);
|
||||
}
|
||||
|
||||
public boolean isAnimating() {
|
||||
return isAnimatingEntry;
|
||||
}
|
||||
|
||||
public void startEditing(String url, PropertyAnimator animator) {
|
||||
if (isEditing()) {
|
||||
return;
|
||||
|
|
|
@ -32,6 +32,9 @@ var ContextMenus = {
|
|||
document.getElementById("contextmenu-enable").addEventListener("click", ContextMenus.enable.bind(this), false);
|
||||
document.getElementById("contextmenu-disable").addEventListener("click", ContextMenus.disable.bind(this), false);
|
||||
document.getElementById("contextmenu-uninstall").addEventListener("click", ContextMenus.uninstall.bind(this), false);
|
||||
|
||||
// XXX - Hack to fix bug 985867 for now
|
||||
document.addEventListener("touchstart", function() { });
|
||||
},
|
||||
|
||||
handleEvent: function(event) {
|
||||
|
|
|
@ -14,6 +14,7 @@ config = {
|
|||
|
||||
"reftest_options": [
|
||||
"--desktop", "--profile=%(gaia_profile)s", "--appname=%(application)s",
|
||||
"--total-chunks=%(total_chunks)s", "--this-chunk=%(this_chunk)s",
|
||||
"--browser-arg=%(browser_arg)s", "--symbols-path=%(symbols_path)s",
|
||||
"%(test_manifest)s"
|
||||
]
|
||||
|
|
|
@ -187,7 +187,7 @@ proto.report = function(failed, actual, expected, message, operator) {
|
|||
throw err;
|
||||
}
|
||||
} else {
|
||||
this._reporter(failed ? err : null, message, err.stack);
|
||||
this._reporter(failed ? err : null, err.message, err.stack);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -279,9 +279,6 @@ function run_test() {
|
|||
assert.equal(e.toString().split("\n")[0], "AssertionError: oh no - 1 == 2")
|
||||
}
|
||||
|
||||
// Export Assert.jsm methods to become globally accessible.
|
||||
export_assertions();
|
||||
|
||||
// Test XPCShell-test integration:
|
||||
ok(true, "OK, this went well");
|
||||
deepEqual(/a/g, /a/g, "deep equal should work on RegExp");
|
||||
|
|
|
@ -2,36 +2,13 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function run_test() {
|
||||
do_check_matches({x:1}, {x:1}); // pass
|
||||
todo_check_matches({x:1}, {}); // fail: all pattern props required
|
||||
todo_check_matches({x:1}, {x:2}); // fail: values must match
|
||||
do_check_matches({x:1}, {x:1, y:2}); // pass: extra props tolerated
|
||||
do_check_matches({x:1}, {x:1});
|
||||
|
||||
// Property order is irrelevant.
|
||||
do_check_matches({x:"foo", y:"bar"}, {y:"bar", x:"foo"});// pass
|
||||
|
||||
do_check_matches({x:undefined}, {x:1});// pass: 'undefined' is wildcard
|
||||
do_check_matches({x:undefined}, {x:2});
|
||||
todo_check_matches({x:undefined}, {y:2});// fail: 'x' must still be there
|
||||
|
||||
// Patterns nest.
|
||||
do_check_matches({a:1, b:{c:2,d:undefined}}, {a:1, b:{c:2,d:3}});
|
||||
do_check_matches({a:1, b:{c:2,d:3}}, {a:1, b:{c:2,d:3}});
|
||||
|
||||
// 'length' property counts, even if non-enumerable.
|
||||
do_check_matches([3,4,5], [3,4,5]); // pass
|
||||
todo_check_matches([3,4,5], [3,5,5]); // fail; value doesn't match
|
||||
todo_check_matches([3,4,5], [3,4,5,6]);// fail; length doesn't match
|
||||
|
||||
// functions in patterns get applied.
|
||||
do_check_matches({foo:function (v) v.length == 2}, {foo:"hi"});// pass
|
||||
todo_check_matches({foo:function (v) v.length == 2}, {bar:"hi"});// fail
|
||||
todo_check_matches({foo:function (v) v.length == 2}, {foo:"hello"});// fail
|
||||
|
||||
// We don't check constructors, prototypes, or classes. However, if
|
||||
// pattern has a 'length' property, we require values to match that as
|
||||
// well, even if 'length' is non-enumerable in the pattern. So arrays
|
||||
// are useful as patterns.
|
||||
do_check_matches({0:0, 1:1, length:2}, [0,1]); // pass
|
||||
do_check_matches({0:1}, [1,2]); // pass
|
||||
do_check_matches([0], {0:0, length:1}); // pass
|
||||
do_check_matches([3,4,5], [3,4,5]);
|
||||
}
|
||||
|
|
|
@ -2,5 +2,11 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function run_test() {
|
||||
do_check_matches({x:1}, {}); // fail: all pattern props required
|
||||
do_check_matches({x:1}, {x:2}); // fail: values must match
|
||||
do_check_matches({x:undefined}, {});
|
||||
|
||||
// 'length' property counts, even if non-enumerable.
|
||||
do_check_matches([3,4,5], [3,5,5]); // fail; value doesn't match
|
||||
do_check_matches([3,4,5], [3,4,5,6]);// fail; length doesn't match
|
||||
}
|
||||
|
|
|
@ -19,8 +19,23 @@ var _cleanupFunctions = [];
|
|||
var _pendingTimers = [];
|
||||
var _profileInitialized = false;
|
||||
|
||||
// Register the testing-common resource protocol early, to have access to its
|
||||
// modules.
|
||||
_register_modules_protocol_handler();
|
||||
|
||||
let _Promise = Components.utils.import("resource://gre/modules/Promise.jsm", this).Promise;
|
||||
|
||||
// Support a common assertion library, Assert.jsm.
|
||||
let AssertCls = Components.utils.import("resource://testing-common/Assert.jsm", null).Assert;
|
||||
// Pass a custom report function for xpcshell-test style reporting.
|
||||
let Assert = new AssertCls(function(err, message, stack) {
|
||||
if (err) {
|
||||
do_report_result(false, err.message, err.stack);
|
||||
} else {
|
||||
do_report_result(true, message, stack);
|
||||
}
|
||||
});
|
||||
|
||||
let _log = function (action, params) {
|
||||
if (typeof _XPCSHELL_PROCESS != "undefined") {
|
||||
params.process = _XPCSHELL_PROCESS;
|
||||
|
@ -313,34 +328,48 @@ function do_get_idle() {
|
|||
// Map resource://test/ to current working directory and
|
||||
// resource://testing-common/ to the shared test modules directory.
|
||||
function _register_protocol_handlers() {
|
||||
let (ios = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService)) {
|
||||
let protocolHandler =
|
||||
ios.getProtocolHandler("resource")
|
||||
.QueryInterface(Components.interfaces.nsIResProtocolHandler);
|
||||
let curDirURI = ios.newFileURI(do_get_cwd());
|
||||
protocolHandler.setSubstitution("test", curDirURI);
|
||||
let ios = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
let protocolHandler =
|
||||
ios.getProtocolHandler("resource")
|
||||
.QueryInterface(Components.interfaces.nsIResProtocolHandler);
|
||||
|
||||
if (this._TESTING_MODULES_DIR) {
|
||||
let modulesFile = Components.classes["@mozilla.org/file/local;1"].
|
||||
createInstance(Components.interfaces.nsILocalFile);
|
||||
modulesFile.initWithPath(_TESTING_MODULES_DIR);
|
||||
let curDirURI = ios.newFileURI(do_get_cwd());
|
||||
protocolHandler.setSubstitution("test", curDirURI);
|
||||
|
||||
if (!modulesFile.exists()) {
|
||||
throw new Error("Specified modules directory does not exist: " +
|
||||
_TESTING_MODULES_DIR);
|
||||
}
|
||||
_register_modules_protocol_handler();
|
||||
}
|
||||
|
||||
if (!modulesFile.isDirectory()) {
|
||||
throw new Error("Specified modules directory is not a directory: " +
|
||||
_TESTING_MODULES_DIR);
|
||||
}
|
||||
|
||||
let modulesURI = ios.newFileURI(modulesFile);
|
||||
|
||||
protocolHandler.setSubstitution("testing-common", modulesURI);
|
||||
}
|
||||
function _register_modules_protocol_handler() {
|
||||
if (!this._TESTING_MODULES_DIR) {
|
||||
throw new Error("Please define a path where the testing modules can be " +
|
||||
"found in a variable called '_TESTING_MODULES_DIR' before " +
|
||||
"head.js is included.");
|
||||
}
|
||||
|
||||
let ios = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
let protocolHandler =
|
||||
ios.getProtocolHandler("resource")
|
||||
.QueryInterface(Components.interfaces.nsIResProtocolHandler);
|
||||
|
||||
let modulesFile = Components.classes["@mozilla.org/file/local;1"].
|
||||
createInstance(Components.interfaces.nsILocalFile);
|
||||
modulesFile.initWithPath(_TESTING_MODULES_DIR);
|
||||
|
||||
if (!modulesFile.exists()) {
|
||||
throw new Error("Specified modules directory does not exist: " +
|
||||
_TESTING_MODULES_DIR);
|
||||
}
|
||||
|
||||
if (!modulesFile.isDirectory()) {
|
||||
throw new Error("Specified modules directory is not a directory: " +
|
||||
_TESTING_MODULES_DIR);
|
||||
}
|
||||
|
||||
let modulesURI = ios.newFileURI(modulesFile);
|
||||
|
||||
protocolHandler.setSubstitution("testing-common", modulesURI);
|
||||
}
|
||||
|
||||
function _execute_test() {
|
||||
|
@ -363,23 +392,11 @@ function _execute_test() {
|
|||
// _TEST_FILE is dynamically defined by <runxpcshelltests.py>.
|
||||
_load_files(_TEST_FILE);
|
||||
|
||||
// Support a common assertion library, Assert.jsm.
|
||||
let Assert = Components.utils.import("resource://testing-common/Assert.jsm", null).Assert;
|
||||
// Pass a custom report function for xpcshell-test style reporting.
|
||||
let assertImpl = new Assert(function(err, message, stack) {
|
||||
if (err) {
|
||||
do_report_result(false, err.message, err.stack);
|
||||
} else {
|
||||
do_report_result(true, message, stack);
|
||||
}
|
||||
});
|
||||
// Allow Assert.jsm methods to be tacked to the current scope.
|
||||
this.export_assertions = function() {
|
||||
for (let func in assertImpl) {
|
||||
this[func] = assertImpl[func].bind(assertImpl);
|
||||
}
|
||||
};
|
||||
this.Assert = assertImpl;
|
||||
// Tack Assert.jsm methods to the current scope.
|
||||
this.Assert = Assert;
|
||||
for (let func in Assert) {
|
||||
this[func] = Assert[func].bind(Assert);
|
||||
}
|
||||
|
||||
try {
|
||||
do_test_pending("MAIN run_test");
|
||||
|
@ -687,12 +704,7 @@ function do_note_exception(ex, text) {
|
|||
}
|
||||
|
||||
function _do_check_neq(left, right, stack, todo) {
|
||||
if (!stack)
|
||||
stack = Components.stack.caller;
|
||||
|
||||
var text = _wrap_with_quotes_if_necessary(left) + " != " +
|
||||
_wrap_with_quotes_if_necessary(right);
|
||||
do_report_result(left != right, text, stack, todo);
|
||||
Assert.notEqual(left, right);
|
||||
}
|
||||
|
||||
function do_check_neq(left, right, stack) {
|
||||
|
@ -747,10 +759,7 @@ function _do_check_eq(left, right, stack, todo) {
|
|||
}
|
||||
|
||||
function do_check_eq(left, right, stack) {
|
||||
if (!stack)
|
||||
stack = Components.stack.caller;
|
||||
|
||||
_do_check_eq(left, right, stack, false);
|
||||
Assert.equal(left, right);
|
||||
}
|
||||
|
||||
function todo_check_eq(left, right, stack) {
|
||||
|
@ -761,10 +770,7 @@ function todo_check_eq(left, right, stack) {
|
|||
}
|
||||
|
||||
function do_check_true(condition, stack) {
|
||||
if (!stack)
|
||||
stack = Components.stack.caller;
|
||||
|
||||
do_check_eq(condition, true, stack);
|
||||
Assert.ok(condition);
|
||||
}
|
||||
|
||||
function todo_check_true(condition, stack) {
|
||||
|
@ -775,10 +781,7 @@ function todo_check_true(condition, stack) {
|
|||
}
|
||||
|
||||
function do_check_false(condition, stack) {
|
||||
if (!stack)
|
||||
stack = Components.stack.caller;
|
||||
|
||||
do_check_eq(condition, false, stack);
|
||||
Assert.ok(!condition, stack);
|
||||
}
|
||||
|
||||
function todo_check_false(condition, stack) {
|
||||
|
@ -788,163 +791,15 @@ function todo_check_false(condition, stack) {
|
|||
todo_check_eq(condition, false, stack);
|
||||
}
|
||||
|
||||
function do_check_null(condition, stack=Components.stack.caller) {
|
||||
do_check_eq(condition, null, stack);
|
||||
function do_check_null(condition, stack) {
|
||||
Assert.equal(condition, null);
|
||||
}
|
||||
|
||||
function todo_check_null(condition, stack=Components.stack.caller) {
|
||||
todo_check_eq(condition, null, stack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that |value| matches |pattern|.
|
||||
*
|
||||
* A |value| matches a pattern |pattern| if any one of the following is true:
|
||||
*
|
||||
* - |value| and |pattern| are both objects; |pattern|'s enumerable
|
||||
* properties' values are valid patterns; and for each enumerable
|
||||
* property |p| of |pattern|, plus 'length' if present at all, |value|
|
||||
* has a property |p| whose value matches |pattern.p|. Note that if |j|
|
||||
* has other properties not present in |p|, |j| may still match |p|.
|
||||
*
|
||||
* - |value| and |pattern| are equal string, numeric, or boolean literals
|
||||
*
|
||||
* - |pattern| is |undefined| (this is a wildcard pattern)
|
||||
*
|
||||
* - typeof |pattern| == "function", and |pattern(value)| is true.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* do_check_matches({x:1}, {x:1}) // pass
|
||||
* do_check_matches({x:1}, {}) // fail: all pattern props required
|
||||
* do_check_matches({x:1}, {x:2}) // fail: values must match
|
||||
* do_check_matches({x:1}, {x:1, y:2}) // pass: extra props tolerated
|
||||
*
|
||||
* // Property order is irrelevant.
|
||||
* do_check_matches({x:"foo", y:"bar"}, {y:"bar", x:"foo"}) // pass
|
||||
*
|
||||
* do_check_matches({x:undefined}, {x:1}) // pass: 'undefined' is wildcard
|
||||
* do_check_matches({x:undefined}, {x:2})
|
||||
* do_check_matches({x:undefined}, {y:2}) // fail: 'x' must still be there
|
||||
*
|
||||
* // Patterns nest.
|
||||
* do_check_matches({a:1, b:{c:2,d:undefined}}, {a:1, b:{c:2,d:3}})
|
||||
*
|
||||
* // 'length' property counts, even if non-enumerable.
|
||||
* do_check_matches([3,4,5], [3,4,5]) // pass
|
||||
* do_check_matches([3,4,5], [3,5,5]) // fail; value doesn't match
|
||||
* do_check_matches([3,4,5], [3,4,5,6]) // fail; length doesn't match
|
||||
*
|
||||
* // functions in patterns get applied.
|
||||
* do_check_matches({foo:function (v) v.length == 2}, {foo:"hi"}) // pass
|
||||
* do_check_matches({foo:function (v) v.length == 2}, {bar:"hi"}) // fail
|
||||
* do_check_matches({foo:function (v) v.length == 2}, {foo:"hello"}) // fail
|
||||
*
|
||||
* // We don't check constructors, prototypes, or classes. However, if
|
||||
* // pattern has a 'length' property, we require values to match that as
|
||||
* // well, even if 'length' is non-enumerable in the pattern. So arrays
|
||||
* // are useful as patterns.
|
||||
* do_check_matches({0:0, 1:1, length:2}, [0,1]) // pass
|
||||
* do_check_matches({0:1}, [1,2]) // pass
|
||||
* do_check_matches([0], {0:0, length:1}) // pass
|
||||
*
|
||||
* Notes:
|
||||
*
|
||||
* The 'length' hack gives us reasonably intuitive handling of arrays.
|
||||
*
|
||||
* This is not a tight pattern-matcher; it's only good for checking data
|
||||
* from well-behaved sources. For example:
|
||||
* - By default, we don't mind values having extra properties.
|
||||
* - We don't check for proxies or getters.
|
||||
* - We don't check the prototype chain.
|
||||
* However, if you know the values are, say, JSON, which is pretty
|
||||
* well-behaved, and if you want to tolerate additional properties
|
||||
* appearing on the JSON for backward-compatibility, then do_check_matches
|
||||
* is ideal. If you do want to be more careful, you can use function
|
||||
* patterns to implement more stringent checks.
|
||||
*/
|
||||
function do_check_matches(pattern, value, stack=Components.stack.caller, todo=false) {
|
||||
var matcher = pattern_matcher(pattern);
|
||||
var text = "VALUE: " + uneval(value) + "\nPATTERN: " + uneval(pattern) + "\n";
|
||||
var diagnosis = []
|
||||
if (matcher(value, diagnosis)) {
|
||||
do_report_result(true, "value matches pattern:\n" + text, stack, todo);
|
||||
} else {
|
||||
text = ("value doesn't match pattern:\n" +
|
||||
text +
|
||||
"DIAGNOSIS: " +
|
||||
format_pattern_match_failure(diagnosis[0]) + "\n");
|
||||
do_report_result(false, text, stack, todo);
|
||||
}
|
||||
}
|
||||
|
||||
function todo_check_matches(pattern, value, stack=Components.stack.caller) {
|
||||
do_check_matches(pattern, value, stack, true);
|
||||
}
|
||||
|
||||
// Return a pattern-matching function of one argument, |value|, that
|
||||
// returns true if |value| matches |pattern|.
|
||||
//
|
||||
// If the pattern doesn't match, and the pattern-matching function was
|
||||
// passed its optional |diagnosis| argument, the pattern-matching function
|
||||
// sets |diagnosis|'s '0' property to a JSON-ish description of the portion
|
||||
// of the pattern that didn't match, which can be formatted legibly by
|
||||
// format_pattern_match_failure.
|
||||
function pattern_matcher(pattern) {
|
||||
function explain(diagnosis, reason) {
|
||||
if (diagnosis) {
|
||||
diagnosis[0] = reason;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (typeof pattern == "function") {
|
||||
return pattern;
|
||||
} else if (typeof pattern == "object" && pattern) {
|
||||
var matchers = [[p, pattern_matcher(pattern[p])] for (p in pattern)];
|
||||
// Kludge: include 'length', if not enumerable. (If it is enumerable,
|
||||
// we picked it up in the array comprehension, above.
|
||||
var ld = Object.getOwnPropertyDescriptor(pattern, 'length');
|
||||
if (ld && !ld.enumerable) {
|
||||
matchers.push(['length', pattern_matcher(pattern.length)])
|
||||
}
|
||||
return function (value, diagnosis) {
|
||||
if (!(value && typeof value == "object")) {
|
||||
return explain(diagnosis, "value not object");
|
||||
}
|
||||
for (let [p, m] of matchers) {
|
||||
var element_diagnosis = [];
|
||||
if (!(p in value && m(value[p], element_diagnosis))) {
|
||||
return explain(diagnosis, { property:p,
|
||||
diagnosis:element_diagnosis[0] });
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
} else if (pattern === undefined) {
|
||||
return function(value) { return true; };
|
||||
} else {
|
||||
return function (value, diagnosis) {
|
||||
if (value !== pattern) {
|
||||
return explain(diagnosis, "pattern " + uneval(pattern) + " not === to value " + uneval(value));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Format an explanation for a pattern match failure, as stored in the
|
||||
// second argument to a matching function.
|
||||
function format_pattern_match_failure(diagnosis, indent="") {
|
||||
var a;
|
||||
if (!diagnosis) {
|
||||
a = "Matcher did not explain reason for mismatch.";
|
||||
} else if (typeof diagnosis == "string") {
|
||||
a = diagnosis;
|
||||
} else if (diagnosis.property) {
|
||||
a = "Property " + uneval(diagnosis.property) + " of object didn't match:\n";
|
||||
a += format_pattern_match_failure(diagnosis.diagnosis, indent + " ");
|
||||
}
|
||||
return indent + a;
|
||||
function do_check_matches(pattern, value) {
|
||||
Assert.deepEqual(pattern, value);
|
||||
}
|
||||
|
||||
// Check that |func| throws an nsIException that has
|
||||
|
|
|
@ -171,7 +171,9 @@ this.CrashMonitor = {
|
|||
);
|
||||
|
||||
CrashMonitorInternal.initialized = true;
|
||||
OS.File.makeDir(OS.Path.join(OS.Constants.Path.profileDir, "metro"));
|
||||
if (Services.metro && Services.metro.immersive) {
|
||||
OS.File.makeDir(OS.Path.join(OS.Constants.Path.profileDir, "metro"));
|
||||
}
|
||||
return promise;
|
||||
},
|
||||
|
||||
|
|
|
@ -550,7 +550,8 @@ AbstractFile.removeRecursive = function(path, options = {}) {
|
|||
*/
|
||||
AbstractFile.makeDir = function(path, options = {}) {
|
||||
if (!options.from) {
|
||||
return OS.File._makeDir(path, options);
|
||||
OS.File._makeDir(path, options);
|
||||
return;
|
||||
}
|
||||
if (!path.startsWith(options.from)) {
|
||||
throw new Error("Incorrect use of option |from|: " + path + " is not a descendant of " + options.from);
|
||||
|
|
|
@ -37,7 +37,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=348233
|
|||
<script class="testbody" type="application/javascript">
|
||||
<![CDATA[
|
||||
|
||||
SimpleTest.expectAssertions(20, 21);
|
||||
SimpleTest.expectAssertions(19, 20);
|
||||
|
||||
/** Test for Bug 437844 and Bug 348233 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
|
|
@ -52,7 +52,8 @@ let loaderGlobals = {
|
|||
lazyGetter: XPCOMUtils.defineLazyGetter.bind(XPCOMUtils),
|
||||
lazyImporter: XPCOMUtils.defineLazyModuleGetter.bind(XPCOMUtils),
|
||||
lazyServiceGetter: XPCOMUtils.defineLazyServiceGetter.bind(XPCOMUtils)
|
||||
}
|
||||
},
|
||||
reportError: Cu.reportError,
|
||||
};
|
||||
|
||||
// Used when the tools should be loaded from the Firefox package itself (the default)
|
||||
|
|
|
@ -27,6 +27,9 @@ exports.items = [
|
|||
description: gcli.lookup("screenshotDesc"),
|
||||
manual: gcli.lookup("screenshotManual"),
|
||||
returnType: "dom",
|
||||
buttonId: "command-button-screenshot",
|
||||
buttonClass: "command-button command-button-invertable",
|
||||
tooltipText: gcli.lookup("screenshotTooltip"),
|
||||
params: [
|
||||
{
|
||||
name: "filename",
|
||||
|
|
|
@ -15,9 +15,11 @@ const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
|
|||
const { dbg_assert, dumpn, update } = DevToolsUtils;
|
||||
const { SourceMapConsumer, SourceMapGenerator } = require("source-map");
|
||||
const { defer, resolve, reject, all } = require("devtools/toolkit/deprecated-sync-thenables");
|
||||
const {CssLogic} = require("devtools/styleinspector/css-logic");
|
||||
const { CssLogic } = require("devtools/styleinspector/css-logic");
|
||||
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
DevToolsUtils.defineLazyGetter(this, "NetUtil", () => {
|
||||
return Cu.import("resource://gre/modules/NetUtil.jsm", {}).NetUtil;
|
||||
});
|
||||
|
||||
let B2G_ID = "{3c2e2abc-06d4-11e1-ac3b-374f68613e61}";
|
||||
|
||||
|
@ -3072,7 +3074,14 @@ ObjectActor.prototype = {
|
|||
};
|
||||
|
||||
if (this.obj.class != "DeadObject") {
|
||||
let raw = Cu.unwaiveXrays(this.obj.unsafeDereference());
|
||||
let raw = this.obj.unsafeDereference();
|
||||
|
||||
// If Cu is not defined, we are running on a worker thread, where xrays
|
||||
// don't exist.
|
||||
if (Cu) {
|
||||
raw = Cu.unwaiveXrays(raw);
|
||||
}
|
||||
|
||||
if (!DevToolsUtils.isSafeJSObject(raw)) {
|
||||
raw = null;
|
||||
}
|
||||
|
@ -3829,7 +3838,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
},
|
||||
|
||||
function CSSMediaRule({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMCSSMediaRule)) {
|
||||
if (!aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMCSSMediaRule)) {
|
||||
return false;
|
||||
}
|
||||
aGrip.preview = {
|
||||
|
@ -3840,7 +3849,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
},
|
||||
|
||||
function CSSStyleRule({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMCSSStyleRule)) {
|
||||
if (!aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMCSSStyleRule)) {
|
||||
return false;
|
||||
}
|
||||
aGrip.preview = {
|
||||
|
@ -3852,15 +3861,15 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
|
||||
function ObjectWithURL({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj ||
|
||||
!(aRawObj instanceof Ci.nsIDOMCSSImportRule ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSStyleSheet ||
|
||||
aRawObj instanceof Ci.nsIDOMLocation ||
|
||||
aRawObj instanceof Ci.nsIDOMWindow)) {
|
||||
Ci && !(aRawObj instanceof Ci.nsIDOMCSSImportRule ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSStyleSheet ||
|
||||
aRawObj instanceof Ci.nsIDOMLocation ||
|
||||
aRawObj instanceof Ci.nsIDOMWindow)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let url;
|
||||
if (aRawObj instanceof Ci.nsIDOMWindow && aRawObj.location) {
|
||||
if (Ci && (aRawObj instanceof Ci.nsIDOMWindow) && aRawObj.location) {
|
||||
url = aRawObj.location.href;
|
||||
} else if (aRawObj.href) {
|
||||
url = aRawObj.href;
|
||||
|
@ -3880,14 +3889,14 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
if (!aRawObj ||
|
||||
obj.class != "DOMStringList" &&
|
||||
obj.class != "DOMTokenList" &&
|
||||
!(aRawObj instanceof Ci.nsIDOMMozNamedAttrMap ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSRuleList ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSValueList ||
|
||||
aRawObj instanceof Ci.nsIDOMFileList ||
|
||||
aRawObj instanceof Ci.nsIDOMFontFaceList ||
|
||||
aRawObj instanceof Ci.nsIDOMMediaList ||
|
||||
aRawObj instanceof Ci.nsIDOMNodeList ||
|
||||
aRawObj instanceof Ci.nsIDOMStyleSheetList)) {
|
||||
Ci && !(aRawObj instanceof Ci.nsIDOMMozNamedAttrMap ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSRuleList ||
|
||||
aRawObj instanceof Ci.nsIDOMCSSValueList ||
|
||||
aRawObj instanceof Ci.nsIDOMFileList ||
|
||||
aRawObj instanceof Ci.nsIDOMFontFaceList ||
|
||||
aRawObj instanceof Ci.nsIDOMMediaList ||
|
||||
aRawObj instanceof Ci.nsIDOMNodeList ||
|
||||
aRawObj instanceof Ci.nsIDOMStyleSheetList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3916,7 +3925,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
}, // ArrayLike
|
||||
|
||||
function CSSStyleDeclaration({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMCSSStyleDeclaration)) {
|
||||
if (!aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMCSSStyleDeclaration)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3938,7 +3947,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
},
|
||||
|
||||
function DOMNode({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (obj.class == "Object" || !aRawObj || !(aRawObj instanceof Ci.nsIDOMNode)) {
|
||||
if (obj.class == "Object" || !aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMNode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3948,9 +3957,9 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
nodeName: aRawObj.nodeName,
|
||||
};
|
||||
|
||||
if (aRawObj instanceof Ci.nsIDOMDocument && aRawObj.location) {
|
||||
if (Ci && (aRawObj instanceof Ci.nsIDOMDocument) && aRawObj.location) {
|
||||
preview.location = threadActor.createValueGrip(aRawObj.location.href);
|
||||
} else if (aRawObj instanceof Ci.nsIDOMDocumentFragment) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMDocumentFragment)) {
|
||||
preview.childNodesLength = aRawObj.childNodes.length;
|
||||
|
||||
if (threadActor._gripDepth < 2) {
|
||||
|
@ -3963,7 +3972,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (aRawObj instanceof Ci.nsIDOMElement) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMElement)) {
|
||||
// Add preview for DOM element attributes.
|
||||
if (aRawObj instanceof Ci.nsIDOMHTMLElement) {
|
||||
preview.nodeName = preview.nodeName.toLowerCase();
|
||||
|
@ -3978,10 +3987,10 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else if (aRawObj instanceof Ci.nsIDOMAttr) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMAttr)) {
|
||||
preview.value = threadActor.createValueGrip(aRawObj.value);
|
||||
} else if (aRawObj instanceof Ci.nsIDOMText ||
|
||||
aRawObj instanceof Ci.nsIDOMComment) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMText) ||
|
||||
Ci && (aRawObj instanceof Ci.nsIDOMComment)) {
|
||||
preview.textContent = threadActor.createValueGrip(aRawObj.textContent);
|
||||
}
|
||||
|
||||
|
@ -3989,7 +3998,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
}, // DOMNode
|
||||
|
||||
function DOMEvent({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMEvent)) {
|
||||
if (!aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMEvent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4005,9 +4014,9 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
}
|
||||
|
||||
let props = [];
|
||||
if (aRawObj instanceof Ci.nsIDOMMouseEvent) {
|
||||
if (Ci && (aRawObj instanceof Ci.nsIDOMMouseEvent)) {
|
||||
props.push("buttons", "clientX", "clientY", "layerX", "layerY");
|
||||
} else if (aRawObj instanceof Ci.nsIDOMKeyEvent) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMKeyEvent)) {
|
||||
let modifiers = [];
|
||||
if (aRawObj.altKey) {
|
||||
modifiers.push("Alt");
|
||||
|
@ -4025,10 +4034,10 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
preview.modifiers = modifiers;
|
||||
|
||||
props.push("key", "charCode", "keyCode");
|
||||
} else if (aRawObj instanceof Ci.nsIDOMTransitionEvent ||
|
||||
aRawObj instanceof Ci.nsIDOMAnimationEvent) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMTransitionEvent) ||
|
||||
Ci && (aRawObj instanceof Ci.nsIDOMAnimationEvent)) {
|
||||
props.push("animationName", "pseudoElement");
|
||||
} else if (aRawObj instanceof Ci.nsIDOMClipboardEvent) {
|
||||
} else if (Ci && (aRawObj instanceof Ci.nsIDOMClipboardEvent)) {
|
||||
props.push("clipboardData");
|
||||
}
|
||||
|
||||
|
@ -4071,7 +4080,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
|||
}, // DOMEvent
|
||||
|
||||
function DOMException({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMDOMException)) {
|
||||
if (!aRawObj || Ci && !(aRawObj instanceof Ci.nsIDOMDOMException)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5493,10 +5502,11 @@ function convertToUnicode(aString, aCharset=null) {
|
|||
* @param String aPrefix
|
||||
* An optional prefix for the reported error message.
|
||||
*/
|
||||
function reportError(aError, aPrefix="") {
|
||||
let oldReportError = reportError;
|
||||
reportError = function(aError, aPrefix="") {
|
||||
dbg_assert(aError instanceof Error, "Must pass Error objects to reportError");
|
||||
let msg = aPrefix + aError.message + ":\n" + aError.stack;
|
||||
Cu.reportError(msg);
|
||||
oldReportError(msg);
|
||||
dumpn(msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ function loadSubScript(aURL)
|
|||
(e.fileName ? "at " + e.fileName + " : " + e.lineNumber + "\n" : "") +
|
||||
e + " - " + e.stack + "\n";
|
||||
dump(errorStr);
|
||||
Cu.reportError(errorStr);
|
||||
reportError(errorStr);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -1026,7 +1026,7 @@ DebuggerServerConnection.prototype = {
|
|||
|
||||
_unknownError: function DSC__unknownError(aPrefix, aError) {
|
||||
let errorString = aPrefix + ": " + DevToolsUtils.safeErrorString(aError);
|
||||
Cu.reportError(errorString);
|
||||
reportError(errorString);
|
||||
dumpn(errorString);
|
||||
return {
|
||||
error: "unknownError",
|
||||
|
|
|
@ -285,22 +285,6 @@ function TracingTransport(childTransport) {
|
|||
this.checkIndex = 0;
|
||||
}
|
||||
|
||||
function deepEqual(a, b) {
|
||||
if (a === b)
|
||||
return true;
|
||||
if (typeof a != "object" || typeof b != "object")
|
||||
return false;
|
||||
if (a === null || b === null)
|
||||
return false;
|
||||
if (Object.keys(a).length != Object.keys(b).length)
|
||||
return false;
|
||||
for (let k in a) {
|
||||
if (!deepEqual(a[k], b[k]))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TracingTransport.prototype = {
|
||||
// Remove actor names
|
||||
normalize: function(packet) {
|
||||
|
@ -338,13 +322,13 @@ TracingTransport.prototype = {
|
|||
expectSend: function(expected) {
|
||||
let packet = this.packets[this.checkIndex++];
|
||||
do_check_eq(packet.type, "sent");
|
||||
do_check_true(deepEqual(packet.packet, this.normalize(expected)));
|
||||
deepEqual(packet.packet, this.normalize(expected));
|
||||
},
|
||||
|
||||
expectReceive: function(expected) {
|
||||
let packet = this.packets[this.checkIndex++];
|
||||
do_check_eq(packet.type, "received");
|
||||
do_check_true(deepEqual(packet.packet, this.normalize(expected)));
|
||||
deepEqual(packet.packet, this.normalize(expected));
|
||||
},
|
||||
|
||||
// Write your tests, call dumpLog at the end, inspect the output,
|
||||
|
|
|
@ -87,9 +87,9 @@ function tryActors(aReachables, aCompleted) {
|
|||
gClient.request({ to: actor, type: 'echo', value: 'tango'}, // phone home
|
||||
(aResponse) => {
|
||||
if (aReachables.has(actor))
|
||||
do_check_matches({ from: actor, type: 'echo', value: 'tango' }, aResponse);
|
||||
do_check_matches({ from: actor, to: actor, type: 'echo', value: 'tango' }, aResponse);
|
||||
else
|
||||
do_check_matches({ from: actor, error: 'noSuchActor' }, aResponse);
|
||||
do_check_matches({ from: actor, error: 'noSuchActor', message: "No such actor for ID: " + actor }, aResponse);
|
||||
|
||||
if (--count == 0)
|
||||
do_execute_soon(aCompleted, "tryActors callback " + aCompleted.name);
|
||||
|
|
|
@ -25,21 +25,26 @@ function test_banana_environment()
|
|||
|
||||
gThreadClient.addOneTimeListener("paused",
|
||||
function(aEvent, aPacket) {
|
||||
do_check_matches({type:"paused", frame:
|
||||
{environment:
|
||||
{type: "function", function: {name: "banana3"},
|
||||
parent:
|
||||
{type: "block", bindings: {variables: {banana3:undefined}},
|
||||
parent:
|
||||
{type: "function", function: {name: "banana2"},
|
||||
parent:
|
||||
{type:"block", bindings: {variables: {banana2:undefined}},
|
||||
parent:
|
||||
{type:"block", bindings: {variables: {banana2:undefined}},
|
||||
parent:
|
||||
{type:"function", function: {name: "banana"}}}}}}}}},
|
||||
aPacket,
|
||||
{ Object:Object, Array:Array });
|
||||
equal(aPacket.type, "paused");
|
||||
let env = aPacket.frame.environment;
|
||||
equal(env.type, "function");
|
||||
equal(env.function.name, "banana3");
|
||||
let parent = env.parent;
|
||||
equal(parent.type, "block");
|
||||
ok("banana3" in parent.bindings.variables);
|
||||
parent = parent.parent;
|
||||
equal(parent.type, "function");
|
||||
equal(parent.function.name, "banana2");
|
||||
parent = parent.parent;
|
||||
equal(parent.type, "block");
|
||||
ok("banana2" in parent.bindings.variables);
|
||||
parent = parent.parent;
|
||||
equal(parent.type, "block");
|
||||
ok("banana2" in parent.bindings.variables);
|
||||
parent = parent.parent;
|
||||
equal(parent.type, "function");
|
||||
equal(parent.function.name, "banana");
|
||||
|
||||
gThreadClient.resume(function () {
|
||||
finishClient(gClient);
|
||||
});
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
* @constructor
|
||||
*/
|
||||
|
||||
const {Cc, Ci, Cu} = require("chrome");
|
||||
const { Cc, Ci, Cu } = require("chrome");
|
||||
const Services = require("Services");
|
||||
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
|
||||
|
||||
const RX_UNIVERSAL_SELECTOR = /\s*\*\s*/g;
|
||||
const RX_NOT = /:not\((.*?)\)/g;
|
||||
|
@ -48,9 +50,11 @@ const RX_ID = /\s*#\w+\s*/g;
|
|||
const RX_CLASS_OR_ATTRIBUTE = /\s*(?:\.\w+|\[.+?\])\s*/g;
|
||||
const RX_PSEUDO = /\s*:?:([\w-]+)(\(?\)?)\s*/g;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.importGlobalProperties(['CSS']);
|
||||
// This should be ok because none of the functions that use this should be used
|
||||
// on the worker thread, where Cu is not available.
|
||||
if (Cu) {
|
||||
Cu.importGlobalProperties(['CSS']);
|
||||
}
|
||||
|
||||
function CssLogic()
|
||||
{
|
||||
|
@ -730,8 +734,8 @@ CssLogic.getSelectors = function CssLogic_getSelectors(aDOMRule)
|
|||
*/
|
||||
CssLogic.l10n = function(aName) CssLogic._strings.GetStringFromName(aName);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(CssLogic, "_strings", function() Services.strings
|
||||
.createBundle("chrome://global/locale/devtools/styleinspector.properties"));
|
||||
DevToolsUtils.defineLazyGetter(CssLogic, "_strings", function() Services.strings
|
||||
.createBundle("chrome://global/locale/devtools/styleinspector.properties"));
|
||||
|
||||
/**
|
||||
* Is the given property sheet a content stylesheet?
|
||||
|
@ -1801,6 +1805,6 @@ CssSelectorInfo.prototype = {
|
|||
},
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "domUtils", function() {
|
||||
DevToolsUtils.defineLazyGetter(this, "domUtils", function() {
|
||||
return Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
|
||||
});
|
||||
|
|
|
@ -25,16 +25,17 @@
|
|||
*/
|
||||
|
||||
const { Cc, Ci, Cu } = require("chrome");
|
||||
const { Promise: promise } =
|
||||
Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const Heritage = require("sdk/core/heritage");
|
||||
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
|
||||
const { dumpn, dumpv } = DevToolsUtils;
|
||||
const StreamUtils = require("devtools/toolkit/transport/stream-utils");
|
||||
|
||||
const unicodeConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Ci.nsIScriptableUnicodeConverter);
|
||||
unicodeConverter.charset = "UTF-8";
|
||||
DevToolsUtils.defineLazyGetter(this, "unicodeConverter", () => {
|
||||
const unicodeConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Ci.nsIScriptableUnicodeConverter);
|
||||
unicodeConverter.charset = "UTF-8";
|
||||
return unicodeConverter;
|
||||
});
|
||||
|
||||
// The transport's previous check ensured the header length did not exceed 20
|
||||
// characters. Here, we opt for the somewhat smaller, but still large limit of
|
||||
|
|
|
@ -5,15 +5,18 @@
|
|||
"use strict";
|
||||
|
||||
const { Ci, Cc, Cu, Cr, CC } = require("chrome");
|
||||
const { Promise: promise } =
|
||||
Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const Services = require("Services");
|
||||
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
|
||||
const { dumpv } = DevToolsUtils;
|
||||
const IOUtil = Cc["@mozilla.org/io-util;1"].getService(Ci.nsIIOUtil);
|
||||
|
||||
const ScriptableInputStream = CC("@mozilla.org/scriptableinputstream;1",
|
||||
"nsIScriptableInputStream", "init");
|
||||
DevToolsUtils.defineLazyGetter(this, "IOUtil", () => {
|
||||
return Cc["@mozilla.org/io-util;1"].getService(Ci.nsIIOUtil);
|
||||
});
|
||||
|
||||
DevToolsUtils.defineLazyGetter(this, "ScriptableInputStream", () => {
|
||||
return CC("@mozilla.org/scriptableinputstream;1",
|
||||
"nsIScriptableInputStream", "init");
|
||||
});
|
||||
|
||||
const BUFFER_SIZE = 0x8000;
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
// an SDK module (see bug 1000814)
|
||||
(function (factory) { // Module boilerplate
|
||||
if (this.module && module.id.indexOf("transport") >= 0) { // require
|
||||
factory(require, exports);
|
||||
factory.call(this, require, exports);
|
||||
} else { // loadSubScript
|
||||
if (this.require) {
|
||||
factory(require, this);
|
||||
factory.call(this, require, this);
|
||||
} else {
|
||||
const Cu = Components.utils;
|
||||
const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
|
||||
factory(devtools.require, this);
|
||||
factory.call(this, devtools.require, this);
|
||||
}
|
||||
}
|
||||
}).call(this, function (require, exports) {
|
||||
|
@ -23,8 +23,6 @@
|
|||
"use strict";
|
||||
|
||||
const { Cc, Ci, Cr, Cu, CC } = require("chrome");
|
||||
const { Promise: promise } =
|
||||
Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
const Services = require("Services");
|
||||
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
|
||||
const { dumpn, dumpv } = DevToolsUtils;
|
||||
|
@ -32,9 +30,14 @@ const StreamUtils = require("devtools/toolkit/transport/stream-utils");
|
|||
const { Packet, JSONPacket, BulkPacket } =
|
||||
require("devtools/toolkit/transport/packets");
|
||||
|
||||
const Pipe = CC("@mozilla.org/pipe;1", "nsIPipe", "init");
|
||||
const ScriptableInputStream = CC("@mozilla.org/scriptableinputstream;1",
|
||||
"nsIScriptableInputStream", "init");
|
||||
DevToolsUtils.defineLazyGetter(this, "Pipe", () => {
|
||||
return CC("@mozilla.org/pipe;1", "nsIPipe", "init");
|
||||
});
|
||||
|
||||
DevToolsUtils.defineLazyGetter(this, "ScriptableInputStream", () => {
|
||||
return CC("@mozilla.org/scriptableinputstream;1",
|
||||
"nsIScriptableInputStream", "init");
|
||||
});
|
||||
|
||||
const PACKET_HEADER_MAX = 200;
|
||||
|
||||
|
|
|
@ -102,13 +102,8 @@ function createModule(id) {
|
|||
//
|
||||
// TODO: Remove this when the whitelist becomes empty
|
||||
let chromeWhitelist = [
|
||||
"devtools/toolkit/transport/transport",
|
||||
"devtools/toolkit/transport/stream-utils",
|
||||
"devtools/toolkit/transport/packets",
|
||||
"devtools/toolkit/DevToolsUtils",
|
||||
"devtools/toolkit/event-emitter",
|
||||
"devtools/server/actors/script",
|
||||
"devtools/styleinspector/css-logic",
|
||||
];
|
||||
|
||||
// Create a CommonJS loader with the following options:
|
||||
|
@ -199,9 +194,9 @@ function WorkerDebuggerLoader(options) {
|
|||
//
|
||||
// TODO: Remove this when the whitelist becomes empty
|
||||
if (id === "chrome" && chromeWhitelist.indexOf(requirer.id) < 0) {
|
||||
return { CC: undefined, Cc: undefined, ChromeWorker: undefined,
|
||||
Cm: undefined, Ci: undefined, Cu: undefined, Cr: undefined,
|
||||
components: undefined };
|
||||
return { CC: undefined, Cc: undefined,
|
||||
ChromeWorker: undefined, Cm: undefined, Ci: undefined, Cu: undefined,
|
||||
Cr: undefined, components: undefined };
|
||||
}
|
||||
|
||||
// Built-in modules are cached by id rather than URL, so try to find the
|
||||
|
@ -347,6 +342,7 @@ if (typeof Components === "object") {
|
|||
createSandbox: createSandbox,
|
||||
globals: {
|
||||
"promise": Promise,
|
||||
"reportError": Cu.reportError,
|
||||
},
|
||||
loadInSandbox: loadInSandbox,
|
||||
modules: {
|
||||
|
|
|
@ -279,21 +279,28 @@ static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|||
// ac_add_options --enable-systace
|
||||
//#define MOZ_USE_SYSTRACE
|
||||
#ifdef MOZ_USE_SYSTRACE
|
||||
# define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
||||
# define ATRACE_TAG ATRACE_TAG_ALWAYS
|
||||
// We need HAVE_ANDROID_OS to be defined for Trace.h.
|
||||
// If its not set we will set it temporary and remove it.
|
||||
# ifndef HAVE_ANDROID_OS
|
||||
# define HAVE_ANDROID_OS
|
||||
# define REMOVE_HAVE_ANDROID_OS
|
||||
# endif
|
||||
// Android source code will include <cutils/trace.h> before this. There is no
|
||||
// HAVE_ANDROID_OS defined in Firefox OS build at that time. Enabled it globally
|
||||
// will cause other build break. So atrace_begin and atrace_end are not defined.
|
||||
// It will cause a build-break when we include <utils/Trace.h>. Use undef
|
||||
// _LIBS_CUTILS_TRACE_H will force <cutils/trace.h> to define atrace_begin and
|
||||
// atrace_end with defined HAVE_ANDROID_OS again. Then there is no build-break.
|
||||
# undef _LIBS_CUTILS_TRACE_H
|
||||
# include <utils/Trace.h>
|
||||
# define MOZ_PLATFORM_TRACING ATRACE_CALL();
|
||||
# define MOZ_PLATFORM_TRACING(name) ATRACE_NAME(name);
|
||||
# ifdef REMOVE_HAVE_ANDROID_OS
|
||||
# undef HAVE_ANDROID_OS
|
||||
# undef REMOVE_HAVE_ANDROID_OS
|
||||
# endif
|
||||
#else
|
||||
# define MOZ_PLATFORM_TRACING
|
||||
# define MOZ_PLATFORM_TRACING(name)
|
||||
#endif
|
||||
|
||||
// we want the class and function name but can't easily get that using preprocessor macros
|
||||
|
@ -303,8 +310,8 @@ static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|||
#define SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, line) SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line)
|
||||
#define SAMPLER_APPEND_LINE_NUMBER(id) SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, __LINE__)
|
||||
|
||||
#define PROFILER_LABEL(name_space, info) MOZ_PLATFORM_TRACING mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||
#define PROFILER_LABEL_PRINTF(name_space, info, ...) MOZ_PLATFORM_TRACING mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||
#define PROFILER_LABEL(name_space, info) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||
#define PROFILER_LABEL_PRINTF(name_space, info, ...) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||
|
||||
#define PROFILER_MARKER(info) mozilla_sampler_add_marker(info)
|
||||
#define PROFILER_MARKER_PAYLOAD(info, payload) mozilla_sampler_add_marker(info, payload)
|
||||
|
|
|
@ -29,7 +29,7 @@ function run_test() {
|
|||
})();
|
||||
do_check_neq(profile.length, 0);
|
||||
let stack = profile[profile.length - 1].frames.map(f => f.location);
|
||||
stack = stack.slice(stack.indexOf("js::RunScript") + 1);
|
||||
stack = stack.slice(stack.lastIndexOf("js::RunScript") + 1);
|
||||
|
||||
do_print(stack);
|
||||
// This test needs to not break on platforms and configurations
|
||||
|
|
Загрузка…
Ссылка в новой задаче