mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Merge m-c to fx-team. a=merge
This commit is contained in:
commit
b7a8552eab
@ -422,11 +422,6 @@ pref("security.apps.certified.CSP.default", "default-src * data: blob:; script-s
|
||||
// Default Content Security Policy to apply to trusted apps.
|
||||
pref("security.apps.trusted.CSP.default", "default-src * data: blob:; object-src 'none'; frame-src 'none'");
|
||||
|
||||
// Temporarily force-enable GL compositing. This is default-disabled
|
||||
// deep within the bowels of the widgetry system. Remove me when GL
|
||||
// compositing isn't default disabled in widget/android.
|
||||
pref("layers.acceleration.force-enabled", true);
|
||||
|
||||
// handle links targeting new windows
|
||||
// 1=current window/tab, 2=new window, 3=new tab in most recent window
|
||||
pref("browser.link.open_newwindow", 3);
|
||||
|
@ -15,15 +15,15 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<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="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -19,12 +19,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="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="93f9ba577f68d772093987c2f1c0a4ae293e1802"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a89cebcccc1e067ebdb71a93194f4ee79d71bd69"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -135,7 +135,7 @@
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c5f8d282efe4a4e8b1e31a37300944e338e60e4f"/>
|
||||
<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="9f28c4faea3b2f01db227b2467b08aeba96d9bec"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb5edebf1c1c17ce7f325df388fed082ca788def"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb8b8828c412bf8d164ad42a39766becd39f9fb5"/>
|
||||
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
|
||||
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
|
||||
</manifest>
|
||||
|
@ -15,15 +15,15 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<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="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<!-- 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"/>
|
||||
|
@ -15,15 +15,15 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="52775e03a2d8532429dff579cb2cd56718e488c3">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<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="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="50d1ca4ab8add54523b7bc692860d57e8ee4c0d1"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="fb3845864573857677f9b500040a8f011eaf5078"/>
|
||||
|
@ -19,12 +19,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="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="93f9ba577f68d772093987c2f1c0a4ae293e1802"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a89cebcccc1e067ebdb71a93194f4ee79d71bd69"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
|
@ -15,15 +15,15 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<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="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
@ -146,7 +146,7 @@
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
|
||||
<project name="platform/system/core" path="system/core" revision="42839aedcf70bf6bc92a3b7ea4a5cc9bf9aef3f9"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb5edebf1c1c17ce7f325df388fed082ca788def"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb8b8828c412bf8d164ad42a39766becd39f9fb5"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="d8952a42771045fca73ec600e2b42a4c7129d723"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4c187c1f3a0dffd8e51a961735474ea703535b99"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -145,7 +145,7 @@
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
|
||||
<project name="platform/system/core" path="system/core" revision="adc485d8755af6a61641d197de7cfef667722580"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb5edebf1c1c17ce7f325df388fed082ca788def"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb8b8828c412bf8d164ad42a39766becd39f9fb5"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="ce18b47b4a4f93a581d672bbd5cb6d12fe796ca9"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "e768af6558957ddb0f6a9ce579ea41c3e3d0b203",
|
||||
"git_revision": "3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "e014aec53259ec23fd3d9ab921e8d11732626cf8",
|
||||
"revision": "a8b0558060fc7033bd1a667544f74387c5e08a58",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
@ -130,7 +130,7 @@
|
||||
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb5edebf1c1c17ce7f325df388fed082ca788def"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb8b8828c412bf8d164ad42a39766becd39f9fb5"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
|
||||
|
@ -15,15 +15,15 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="52775e03a2d8532429dff579cb2cd56718e488c3">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e768af6558957ddb0f6a9ce579ea41c3e3d0b203"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3c68964cb9fdba7cf0f6829b7f44562acaf1f1d7"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="509be3fac311d084ff31b83bbeb5108f69864a90"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ed2cf97a6c37a4bbd0bbbbffe06ec7136d8c79ff"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<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="1b1d86462d3150dceacff927536ded9fcc168419"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8a1ba73572c713e298ae53821d000fc3a5087b5f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="50d1ca4ab8add54523b7bc692860d57e8ee4c0d1"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="fb3845864573857677f9b500040a8f011eaf5078"/>
|
||||
@ -156,5 +156,5 @@
|
||||
<project name="platform/hardware/qcom/sensors" path="hardware/qcom/sensors" revision="3724fd91ef5183684d97e2bf1d7ff948faabe090"/>
|
||||
<project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="2e54754cc0529d26ccac37ed291600048adbf6c0"/>
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="71dfa8228ad0d6cdf6bac0426ac59404ab74b7f3"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb5edebf1c1c17ce7f325df388fed082ca788def"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb8b8828c412bf8d164ad42a39766becd39f9fb5"/>
|
||||
</manifest>
|
||||
|
@ -103,6 +103,10 @@ static RedirEntry kRedirMap[] = {
|
||||
"webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
{
|
||||
"serviceworkers", "chrome://global/content/aboutServiceWorkers.xhtml",
|
||||
nsIAboutModule::ALLOW_SCRIPT
|
||||
},
|
||||
// about:srcdoc is unresolvable by specification. It is included here
|
||||
// because the security manager would disallow srcdoc iframes otherwise.
|
||||
{
|
||||
|
@ -175,6 +175,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "networking", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "webrtc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_URI_LOADER_CONTRACTID, &kNS_URI_LOADER_CID },
|
||||
{ NS_DOCUMENTLOADER_SERVICE_CONTRACTID, &kNS_DOCUMENTLOADER_SERVICE_CID },
|
||||
{ NS_EXTERNALHELPERAPPSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
||||
|
@ -20,13 +20,15 @@ AlarmHalService::Init()
|
||||
return;
|
||||
}
|
||||
RegisterSystemTimezoneChangeObserver(this);
|
||||
RegisterSystemClockChangeObserver(this);
|
||||
}
|
||||
|
||||
/* virtual */ AlarmHalService::~AlarmHalService()
|
||||
/* virtual */ AlarmHalService::~AlarmHalService()
|
||||
{
|
||||
if (mAlarmEnabled) {
|
||||
UnregisterTheOneAlarmObserver();
|
||||
UnregisterSystemTimezoneChangeObserver(this);
|
||||
UnregisterSystemClockChangeObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +39,7 @@ AlarmHalService::GetInstance()
|
||||
{
|
||||
if (!sSingleton) {
|
||||
sSingleton = new AlarmHalService();
|
||||
sSingleton->Init();
|
||||
sSingleton->Init();
|
||||
ClearOnShutdown(&sSingleton);
|
||||
}
|
||||
|
||||
@ -75,6 +77,14 @@ AlarmHalService::SetTimezoneChangedCb(nsITimezoneChangedCb* aTimeZoneChangedCb)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AlarmHalService::SetSystemClockChangedCb(
|
||||
nsISystemClockChangedCb* aSystemClockChangedCb)
|
||||
{
|
||||
mSystemClockChangedCb = aSystemClockChangedCb;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
AlarmHalService::Notify(const void_t& aVoid)
|
||||
{
|
||||
@ -95,6 +105,15 @@ AlarmHalService::Notify(
|
||||
aSystemTimezoneChangeInfo.newTimezoneOffsetMinutes());
|
||||
}
|
||||
|
||||
void
|
||||
AlarmHalService::Notify(const int64_t& aClockDeltaMS)
|
||||
{
|
||||
if (!mSystemClockChangedCb) {
|
||||
return;
|
||||
}
|
||||
mSystemClockChangedCb->OnSystemClockChanged(aClockDeltaMS);
|
||||
}
|
||||
|
||||
} // alarm
|
||||
} // dom
|
||||
} // mozilla
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* 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/. */
|
||||
|
||||
|
||||
#ifndef mozilla_dom_alarm_AlarmHalService_h
|
||||
#define mozilla_dom_alarm_AlarmHalService_h
|
||||
|
||||
@ -17,13 +17,15 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace alarm {
|
||||
|
||||
|
||||
typedef Observer<void_t> AlarmObserver;
|
||||
typedef Observer<hal::SystemTimezoneChangeInformation> SystemTimezoneChangeObserver;
|
||||
typedef Observer<int64_t> SystemClockChangeObserver;
|
||||
|
||||
class AlarmHalService : public nsIAlarmHalService,
|
||||
class AlarmHalService : public nsIAlarmHalService,
|
||||
public AlarmObserver,
|
||||
public SystemTimezoneChangeObserver
|
||||
public SystemTimezoneChangeObserver,
|
||||
public SystemClockChangeObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -39,6 +41,9 @@ public:
|
||||
// Implementing hal::SystemTimezoneChangeObserver
|
||||
void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override;
|
||||
|
||||
// Implementing hal::SystemClockChangeObserver
|
||||
void Notify(const int64_t& aClockDeltaMS);
|
||||
|
||||
private:
|
||||
virtual ~AlarmHalService();
|
||||
|
||||
@ -47,6 +52,7 @@ private:
|
||||
|
||||
nsCOMPtr<nsIAlarmFiredCb> mAlarmFiredCb;
|
||||
nsCOMPtr<nsITimezoneChangedCb> mTimezoneChangedCb;
|
||||
nsCOMPtr<nsISystemClockChangedCb> mSystemClockChangedCb;
|
||||
};
|
||||
|
||||
} // namespace alarm
|
||||
|
@ -8,8 +8,7 @@
|
||||
const DEBUG = false;
|
||||
|
||||
function debug(aStr) {
|
||||
if (DEBUG)
|
||||
dump("AlarmService: " + aStr + "\n");
|
||||
DEBUG && dump("AlarmService: " + aStr + "\n");
|
||||
}
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
@ -63,6 +62,8 @@ this.AlarmService = {
|
||||
|
||||
alarmHalService.setAlarmFiredCb(this._onAlarmFired.bind(this));
|
||||
alarmHalService.setTimezoneChangedCb(this._onTimezoneChanged.bind(this));
|
||||
alarmHalService.setSystemClockChangedCb(
|
||||
this._onSystemClockChanged.bind(this));
|
||||
|
||||
// Add the messages to be listened to.
|
||||
this._messages = ["AlarmsManager:GetAll",
|
||||
@ -283,6 +284,11 @@ this.AlarmService = {
|
||||
this._restoreAlarmsFromDb();
|
||||
},
|
||||
|
||||
_onSystemClockChanged: function _onSystemClockChanged(aClockDeltaMS) {
|
||||
debug("_onSystemClockChanged");
|
||||
this._restoreAlarmsFromDb();
|
||||
},
|
||||
|
||||
_restoreAlarmsFromDb: function _restoreAlarmsFromDb() {
|
||||
debug("_restoreAlarmsFromDb()");
|
||||
|
||||
|
@ -35,3 +35,5 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
|
||||
|
@ -4,29 +4,36 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, function, uuid(9f3ed2c0-aed9-11e1-8c3d-5310bd393466)]
|
||||
interface nsIAlarmFiredCb : nsISupports
|
||||
[scriptable, function, uuid(53dec7f9-bb51-4c3a-98ab-80d5d750c9dd)]
|
||||
interface nsIAlarmFiredCb : nsISupports
|
||||
{
|
||||
void onAlarmFired();
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(0ca52e84-ba8f-11e1-87e8-63235527db9e)]
|
||||
interface nsITimezoneChangedCb : nsISupports
|
||||
[scriptable, function, uuid(e6662911-c066-4358-9388-8661065c65a2)]
|
||||
interface nsITimezoneChangedCb : nsISupports
|
||||
{
|
||||
void onTimezoneChanged(in int32_t aTimezoneOffset);
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(46ece987-a3ec-4124-906f-d99c83296ac6)]
|
||||
interface nsISystemClockChangedCb : nsISupports
|
||||
{
|
||||
void onSystemClockChanged(in int32_t aClockDeltaMS);
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define NS_ALARMHALSERVICE_CID { 0x7dafea4c, 0x7163, 0x4b70, { 0x95, 0x4e, 0x5a, 0xd4, 0x09, 0x94, 0x83, 0xd7 } }
|
||||
#define ALARMHALSERVICE_CONTRACTID "@mozilla.org/alarmHalService;1"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(057b1ee4-f696-486d-bd55-205e21e88fab)]
|
||||
[scriptable, uuid(35074214-f50d-4f9a-b173-8d564dfa657d)]
|
||||
interface nsIAlarmHalService : nsISupports
|
||||
{
|
||||
bool setAlarm(in int32_t aSeconds, in int32_t aNanoseconds);
|
||||
void setAlarmFiredCb(in nsIAlarmFiredCb aAlarmFiredCb);
|
||||
void setTimezoneChangedCb(in nsITimezoneChangedCb aTimezoneChangedCb);
|
||||
void setSystemClockChangedCb(in nsISystemClockChangedCb aSystemClockChangedCb);
|
||||
};
|
||||
|
||||
|
||||
|
70
dom/alarm/test/test_alarm_change_system_clock.js
Normal file
70
dom/alarm/test/test_alarm_change_system_clock.js
Normal file
@ -0,0 +1,70 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
Components.utils.import("resource://gre/modules/AlarmService.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gTimeService",
|
||||
"@mozilla.org/time/timeservice;1",
|
||||
"nsITimeService");
|
||||
|
||||
const ALARM_OFFSET = 10000; // 10 seconds.
|
||||
const CLOCK_OFFSET = 20000; // 20 seconds.
|
||||
const MANIFEST_URL = "http://dummyurl.com/manifest.webapp";
|
||||
|
||||
let alarmDate;
|
||||
let alarmFired;
|
||||
function alarmCb() {
|
||||
alarmFired = true;
|
||||
};
|
||||
|
||||
function run_test() {
|
||||
do_get_profile();
|
||||
Services.prefs.setBoolPref("dom.mozAlarms.enabled", true);
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
/* Tests */
|
||||
|
||||
add_test(function test_getAll() {
|
||||
do_print("= There should not be any alarm =");
|
||||
AlarmService._db.getAll(MANIFEST_URL, (aAlarms) => {
|
||||
do_check_eq(aAlarms.length, 0);
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function test_addAlarm() {
|
||||
do_print("= Set alarm =");
|
||||
alarmDate = Date.now() + ALARM_OFFSET;
|
||||
AlarmService.add({
|
||||
date: alarmDate,
|
||||
manifestURL: MANIFEST_URL
|
||||
}, alarmCb, run_next_test, do_throw);
|
||||
});
|
||||
|
||||
add_test(function test_alarmNotFired() {
|
||||
do_print("= The alarm should be in the DB and pending =");
|
||||
AlarmService._db.getAll(MANIFEST_URL, aAlarms => {
|
||||
do_check_eq(aAlarms.length, 1, "The alarm is in the DB");
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function test_changeSystemClock() {
|
||||
do_print("= Change system clock =");
|
||||
gTimeService.set(Date.now() + CLOCK_OFFSET);
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_alarmFired() {
|
||||
do_print("= The alarm should have been fired and removed from the DB =");
|
||||
do_check_true(alarmFired, "The alarm was fired");
|
||||
AlarmService._db.getAll(MANIFEST_URL, aAlarms => {
|
||||
do_check_eq(aAlarms.length, 0, "No alarms in the DB");
|
||||
run_next_test();
|
||||
});
|
||||
});
|
7
dom/alarm/test/xpcshell.ini
Normal file
7
dom/alarm/test/xpcshell.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[DEFAULT]
|
||||
head =
|
||||
tail =
|
||||
|
||||
[test_alarm_change_system_clock.js]
|
||||
# This test fails on the ICS emulator. We can enable it once bug 1090359 is fixed.
|
||||
skip-if = 1
|
@ -580,7 +580,7 @@ function testExpandos() {
|
||||
var m2 = new M(function(records, observer) {
|
||||
is(observer.expandoProperty, true);
|
||||
observer.disconnect();
|
||||
then();
|
||||
then(testStyleCreate);
|
||||
});
|
||||
m2.expandoProperty = true;
|
||||
m2.observe(div, { attributes: true });
|
||||
@ -596,6 +596,91 @@ function testExpandos() {
|
||||
div.setAttribute("foo", "bar2");
|
||||
}
|
||||
|
||||
function testStyleCreate() {
|
||||
m = new M(function(records, observer) {
|
||||
is(records.length, 1, "number of records");
|
||||
is(records[0].type, "attributes", "record.type");
|
||||
is(records[0].attributeName, "style", "record.attributeName");
|
||||
is(records[0].oldValue, null, "record.oldValue");
|
||||
isnot(div.getAttribute("style"), null, "style attribute after creation");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
div.removeAttribute("style");
|
||||
then(testStyleModify);
|
||||
});
|
||||
m.observe(div, { attributes: true, attributeOldValue: true });
|
||||
is(div.getAttribute("style"), null, "style attribute before creation");
|
||||
div.style.color = "blue";
|
||||
}
|
||||
|
||||
function testStyleModify() {
|
||||
div.style.color = "yellow";
|
||||
m = new M(function(records, observer) {
|
||||
is(records.length, 1, "number of records");
|
||||
is(records[0].type, "attributes", "record.type");
|
||||
is(records[0].attributeName, "style", "record.attributeName");
|
||||
isnot(div.getAttribute("style"), null, "style attribute after modification");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
div.removeAttribute("style");
|
||||
then(testStyleRead);
|
||||
});
|
||||
m.observe(div, { attributes: true });
|
||||
isnot(div.getAttribute("style"), null, "style attribute before modification");
|
||||
div.style.color = "blue";
|
||||
}
|
||||
|
||||
function testStyleRead() {
|
||||
m = new M(function(records, observer) {
|
||||
is(records.length, 1, "number of records");
|
||||
is(records[0].type, "attributes", "record.type");
|
||||
is(records[0].attributeName, "data-test", "record.attributeName");
|
||||
is(div.getAttribute("style"), null, "style attribute after read");
|
||||
observer.disconnect();
|
||||
div.removeAttribute("data-test");
|
||||
m = null;
|
||||
then(testStyleRemoveProperty);
|
||||
});
|
||||
m.observe(div, { attributes: true });
|
||||
is(div.getAttribute("style"), null, "style attribute before read");
|
||||
var value = div.style.color; // shouldn't generate any mutation records
|
||||
div.setAttribute("data-test", "a");
|
||||
}
|
||||
|
||||
function testStyleRemoveProperty() {
|
||||
div.style.color = "blue";
|
||||
m = new M(function(records, observer) {
|
||||
is(records.length, 1, "number of records");
|
||||
is(records[0].type, "attributes", "record.type");
|
||||
is(records[0].attributeName, "style", "record.attributeName");
|
||||
isnot(div.getAttribute("style"), null, "style attribute after successful removeProperty");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
div.removeAttribute("style");
|
||||
then(testStyleRemoveProperty2);
|
||||
});
|
||||
m.observe(div, { attributes: true });
|
||||
isnot(div.getAttribute("style"), null, "style attribute before successful removeProperty");
|
||||
div.style.removeProperty("color");
|
||||
}
|
||||
|
||||
function testStyleRemoveProperty2() {
|
||||
m = new M(function(records, observer) {
|
||||
is(records.length, 1, "number of records");
|
||||
is(records[0].type, "attributes", "record.type");
|
||||
is(records[0].attributeName, "data-test", "record.attributeName");
|
||||
is(div.getAttribute("style"), null, "style attribute after unsuccessful removeProperty");
|
||||
observer.disconnect();
|
||||
m = null;
|
||||
div.removeAttribute("data-test");
|
||||
then();
|
||||
});
|
||||
m.observe(div, { attributes: true });
|
||||
is(div.getAttribute("style"), null, "style attribute before unsuccessful removeProperty");
|
||||
div.style.removeProperty("color"); // shouldn't generate any mutation records
|
||||
div.setAttribute("data-test", "a");
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
</script>
|
||||
|
@ -238,7 +238,8 @@ enum BluetoothStatus {
|
||||
STATUS_PARM_INVALID,
|
||||
STATUS_UNHANDLED,
|
||||
STATUS_AUTH_FAILURE,
|
||||
STATUS_RMT_DEV_DOWN
|
||||
STATUS_RMT_DEV_DOWN,
|
||||
NUM_STATUS
|
||||
};
|
||||
|
||||
enum BluetoothBondState {
|
||||
@ -287,7 +288,8 @@ enum BluetoothSspVariant {
|
||||
SSP_VARIANT_PASSKEY_CONFIRMATION,
|
||||
SSP_VARIANT_PASSKEY_ENTRY,
|
||||
SSP_VARIANT_CONSENT,
|
||||
SSP_VARIANT_PASSKEY_NOTIFICATION
|
||||
SSP_VARIANT_PASSKEY_NOTIFICATION,
|
||||
NUM_SSP_VARIANT
|
||||
};
|
||||
|
||||
struct BluetoothActivityEnergyInfo {
|
||||
@ -470,8 +472,7 @@ enum BluetoothObjectType {
|
||||
TYPE_MANAGER = 0,
|
||||
TYPE_ADAPTER = 1,
|
||||
TYPE_DEVICE = 2,
|
||||
|
||||
TYPE_INVALID
|
||||
NUM_TYPE
|
||||
};
|
||||
|
||||
enum BluetoothA2dpAudioState {
|
||||
|
@ -17,7 +17,7 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothObjectType>
|
||||
: public ContiguousEnumSerializer<
|
||||
mozilla::dom::bluetooth::BluetoothObjectType,
|
||||
mozilla::dom::bluetooth::TYPE_MANAGER,
|
||||
mozilla::dom::bluetooth::TYPE_INVALID>
|
||||
mozilla::dom::bluetooth::NUM_TYPE>
|
||||
{ };
|
||||
|
||||
template <>
|
||||
@ -25,7 +25,7 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothSspVariant>
|
||||
: public ContiguousEnumSerializer<
|
||||
mozilla::dom::bluetooth::BluetoothSspVariant,
|
||||
mozilla::dom::bluetooth::SSP_VARIANT_PASSKEY_CONFIRMATION,
|
||||
mozilla::dom::bluetooth::SSP_VARIANT_PASSKEY_NOTIFICATION>
|
||||
mozilla::dom::bluetooth::NUM_SSP_VARIANT>
|
||||
{ };
|
||||
|
||||
template <>
|
||||
@ -33,7 +33,7 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothStatus>
|
||||
: public ContiguousEnumSerializer<
|
||||
mozilla::dom::bluetooth::BluetoothStatus,
|
||||
mozilla::dom::bluetooth::STATUS_SUCCESS,
|
||||
mozilla::dom::bluetooth::STATUS_RMT_DEV_DOWN>
|
||||
mozilla::dom::bluetooth::NUM_STATUS>
|
||||
{ };
|
||||
|
||||
template <>
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
MOZ_ASSERT(aDataList);
|
||||
}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
if (mErrorCode == nsIInputPortServiceCallback::INPUTPORT_ERROR_OK) {
|
||||
return mCallback->NotifySuccess(mDataList);
|
||||
@ -59,8 +59,8 @@ public:
|
||||
, mIsConnected(aIsConnected)
|
||||
{}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Notify(nsITimer* aTimer)
|
||||
NS_IMETHOD
|
||||
Notify(nsITimer* aTimer) override
|
||||
{
|
||||
InputPortData* portData = static_cast<InputPortData*>(mInputPortData.get());
|
||||
portData->SetConnected(mIsConnected);
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface nsIArray;
|
||||
interface nsIDocument;
|
||||
interface nsIInterceptedChannel;
|
||||
interface nsIPrincipal;
|
||||
@ -19,7 +20,20 @@ interface nsIServiceWorkerUnregisterCallback : nsISupports
|
||||
[noscript] void UnregisterFailed();
|
||||
};
|
||||
|
||||
[builtinclass, uuid(e4c8baa5-237a-4bf6-82d4-ea06eb4b76ba)]
|
||||
[scriptable, builtinclass, uuid(8ce0d197-5740-4ddf-aa4a-e5a63e611d03)]
|
||||
interface nsIServiceWorkerInfo : nsISupports
|
||||
{
|
||||
readonly attribute nsIPrincipal principal;
|
||||
|
||||
readonly attribute DOMString scope;
|
||||
readonly attribute DOMString scriptSpec;
|
||||
readonly attribute DOMString currentWorkerURL;
|
||||
|
||||
readonly attribute DOMString activeCacheName;
|
||||
readonly attribute DOMString waitingCacheName;
|
||||
};
|
||||
|
||||
[scriptable, builtinclass, uuid(861b55e9-d6ac-47cf-a528-8590e9b44de6)]
|
||||
interface nsIServiceWorkerManager : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -103,6 +117,10 @@ interface nsIServiceWorkerManager : nsISupports
|
||||
|
||||
// Testing
|
||||
DOMString getScopeForUrl(in DOMString path);
|
||||
|
||||
// This is meant to be used only by about:serviceworkers. It returns an array
|
||||
// of nsIServiceWorkerInfo.
|
||||
nsIArray getAllRegistrations();
|
||||
};
|
||||
|
||||
%{ C++
|
||||
|
@ -350,16 +350,10 @@ static bool
|
||||
IsMP4SupportedType(const nsACString& aType,
|
||||
const nsAString& aCodecs = EmptyString())
|
||||
{
|
||||
// Currently on B2G, FMP4 is only working for MSE playback.
|
||||
// For other normal MP4, it still uses current omx decoder.
|
||||
// Bug 1061034 is a follow-up bug to enable all MP4s with MOZ_FMP4
|
||||
#ifdef MOZ_OMX_DECODER
|
||||
return false;
|
||||
#else
|
||||
// MP4Decoder/Reader is currently used for MSE and mp4 files local playback.
|
||||
bool haveAAC, haveMP3, haveH264;
|
||||
return Preferences::GetBool("media.fragmented-mp4.exposed", false) &&
|
||||
MP4Decoder::CanHandleMediaType(aType, aCodecs, haveAAC, haveH264, haveMP3);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -120,11 +120,10 @@ const int64_t NO_VIDEO_AMPLE_AUDIO_DIVISOR = 8;
|
||||
static const uint32_t LOW_VIDEO_FRAMES = 1;
|
||||
|
||||
// Threshold in usecs that used to check if we are low on decoded video.
|
||||
// If the last video frame's end time |mDecodedVideoEndTime| doesn't exceed
|
||||
// |clock time + LOW_VIDEO_THRESHOLD_USECS*mPlaybackRate| calculation in
|
||||
// Advanceframe(), we are low on decoded video frames and trying to skip to next
|
||||
// keyframe.
|
||||
static const int32_t LOW_VIDEO_THRESHOLD_USECS = 16000;
|
||||
// If the last video frame's end time |mDecodedVideoEndTime| is more than
|
||||
// |LOW_VIDEO_THRESHOLD_USECS*mPlaybackRate| after the current clock in
|
||||
// Advanceframe(), the video decode is lagging, and we skip to next keyframe.
|
||||
static const int32_t LOW_VIDEO_THRESHOLD_USECS = 60000;
|
||||
|
||||
// Arbitrary "frame duration" when playing only audio.
|
||||
static const int AUDIO_DURATION_USECS = 40000;
|
||||
@ -641,7 +640,7 @@ MediaDecoderStateMachine::NeedToSkipToNextKeyframe()
|
||||
return false;
|
||||
}
|
||||
|
||||
// We'll skip the video decode to the nearest keyframe if we're low on
|
||||
// We'll skip the video decode to the next keyframe if we're low on
|
||||
// audio, or if we're low on video, provided we're not running low on
|
||||
// data to decode. If we're running low on downloaded data to decode,
|
||||
// we won't start keyframe skipping, as we'll be pausing playback to buffer
|
||||
@ -654,9 +653,10 @@ MediaDecoderStateMachine::NeedToSkipToNextKeyframe()
|
||||
(GetDecodedAudioDuration() <
|
||||
mLowAudioThresholdUsecs * mPlaybackRate);
|
||||
bool isLowOnDecodedVideo = !mIsVideoPrerolling &&
|
||||
(mDecodedVideoEndTime - GetClock() <
|
||||
LOW_VIDEO_THRESHOLD_USECS * mPlaybackRate);
|
||||
((GetClock() - mDecodedVideoEndTime) * mPlaybackRate >
|
||||
LOW_VIDEO_THRESHOLD_USECS);
|
||||
bool lowUndecoded = HasLowUndecodedData();
|
||||
|
||||
if ((isLowOnDecodedAudio || isLowOnDecodedVideo) && !lowUndecoded) {
|
||||
DECODER_LOG("Skipping video decode to the next keyframe lowAudio=%d lowVideo=%d lowUndecoded=%d async=%d",
|
||||
isLowOnDecodedAudio, isLowOnDecodedVideo, lowUndecoded, mReader->IsAsync());
|
||||
|
@ -209,7 +209,11 @@ IsAndroidAvailable()
|
||||
static bool
|
||||
IsGonkMP4DecoderAvailable()
|
||||
{
|
||||
#ifndef MOZ_GONK_MEDIACODEC
|
||||
return false;
|
||||
#else
|
||||
return Preferences::GetBool("media.fragmented-mp4.gonk.enabled", false);
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -88,6 +88,9 @@ this.SystemMessagePermissionsTable = {
|
||||
"sms-delivery-success": {
|
||||
"sms": []
|
||||
},
|
||||
"sms-delivery-error": {
|
||||
"sms": []
|
||||
},
|
||||
"sms-read-success": {
|
||||
"sms": []
|
||||
},
|
||||
@ -97,6 +100,9 @@ this.SystemMessagePermissionsTable = {
|
||||
"sms-sent": {
|
||||
"sms": []
|
||||
},
|
||||
"sms-failed": {
|
||||
"sms": []
|
||||
},
|
||||
"telephony-new-call": {
|
||||
"telephony": []
|
||||
},
|
||||
|
@ -15,6 +15,7 @@ qemu = true
|
||||
[test_mobile_data_location.js]
|
||||
[test_mobile_data_state.js]
|
||||
[test_mobile_roaming_preference.js]
|
||||
[test_call_barring_basic_operations.js]
|
||||
[test_call_barring_get_option.js]
|
||||
[test_call_barring_set_error.js]
|
||||
[test_call_barring_change_password.js]
|
||||
|
@ -0,0 +1,107 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "head.js";
|
||||
|
||||
const AO = MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING;
|
||||
const OI = MozMobileConnection.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL;
|
||||
const OX = MozMobileConnection.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME;
|
||||
let outgoingPrograms = [null, AO, OI, OX];
|
||||
|
||||
const AI = MozMobileConnection.CALL_BARRING_PROGRAM_ALL_INCOMING;
|
||||
const IR = MozMobileConnection.CALL_BARRING_PROGRAM_INCOMING_ROAMING;
|
||||
let incomingPrograms = [null, AI, IR];
|
||||
|
||||
const SERVICE_CLASS_VOICE = MozMobileConnection.ICC_SERVICE_CLASS_VOICE;
|
||||
|
||||
function getProgram(aProgram, aEnabled) {
|
||||
if (aProgram === null) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => getCallBarringOption({
|
||||
program: aProgram,
|
||||
serviceClass: SERVICE_CLASS_VOICE
|
||||
}))
|
||||
|
||||
.then(result => {
|
||||
is(result.program, aProgram, "Program");
|
||||
is(result.enabled, aEnabled, "Enabled");
|
||||
is(result.serviceClass, SERVICE_CLASS_VOICE, "ServiceClass");
|
||||
});
|
||||
}
|
||||
|
||||
function setProgram(aProgram, aEnabled) {
|
||||
if (aProgram === null) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => setCallBarringOption({
|
||||
program: aProgram,
|
||||
serviceClass: SERVICE_CLASS_VOICE,
|
||||
enabled: aEnabled,
|
||||
password: "0000" // The dafault call barring password of the emulator
|
||||
}));
|
||||
}
|
||||
|
||||
function setAndCheckProgram(aActiveProgram, aAllPrograms) {
|
||||
let promise = Promise.resolve();
|
||||
|
||||
if (aActiveProgram !== null) {
|
||||
promise = promise.then(() => setProgram(aActiveProgram, true));
|
||||
} else {
|
||||
// Deactive all barring programs in |aAllPrograms|.
|
||||
promise = aAllPrograms.reduce((previousPromise, program) => {
|
||||
return previousPromise.then(() => setProgram(program, false));
|
||||
}, promise);
|
||||
}
|
||||
|
||||
// Make sure |aActiveProgram| is the only active program in |aAllPrograms|.
|
||||
promise = aAllPrograms.reduce((previousPromise, program) => {
|
||||
return previousPromise.then(() => getProgram(program, program === aActiveProgram));
|
||||
}, promise);
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
function testSingleProgram(aOriginProgram, aTargetPrograms, aOriginPrograms) {
|
||||
let promise = setAndCheckProgram(aOriginProgram, aOriginPrograms);
|
||||
|
||||
return aTargetPrograms.reduce((previousPromise, targetProgram) => {
|
||||
return previousPromise
|
||||
.then(() => log(aOriginProgram + " <-> " + targetProgram))
|
||||
.then(() => setAndCheckProgram(targetProgram, aOriginPrograms))
|
||||
.then(() => setAndCheckProgram(aOriginProgram, aOriginPrograms));
|
||||
}, promise);
|
||||
}
|
||||
|
||||
function testAllPrograms(aPrograms) {
|
||||
let targetPrograms = aPrograms.slice();
|
||||
|
||||
return aPrograms.reduce((previousPromise, program) => {
|
||||
return previousPromise
|
||||
.then(() => {
|
||||
targetPrograms.shift();
|
||||
return testSingleProgram(program, targetPrograms, aPrograms);
|
||||
});
|
||||
}, Promise.resolve());
|
||||
}
|
||||
|
||||
// Start tests
|
||||
startTestCommon(function() {
|
||||
return Promise.resolve()
|
||||
.then(() => setProgram(null, outgoingPrograms))
|
||||
.then(() => setProgram(null, incomingPrograms))
|
||||
|
||||
.then(() => log("=== Test outgoing call barring programs ==="))
|
||||
.then(() => testAllPrograms(outgoingPrograms))
|
||||
.then(() => log("=== Test incoming call barring programs ==="))
|
||||
.then(() => testAllPrograms(incomingPrograms))
|
||||
|
||||
.catch(aError => ok(false, "promise rejects during test: " + aError))
|
||||
.then(() => setProgram(null, outgoingPrograms))
|
||||
.then(() => setProgram(null, incomingPrograms));
|
||||
});
|
@ -4,59 +4,12 @@
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "head.js";
|
||||
|
||||
const TEST_DATA = [
|
||||
// Test passing invalid program.
|
||||
{
|
||||
options: {
|
||||
program: 5, /* Invalid program */
|
||||
serviceClass: 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
program: null,
|
||||
serviceClass: 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
/* Undefined program */
|
||||
serviceClass: 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// Test passing invalid serviceClass.
|
||||
{
|
||||
options: {
|
||||
program: MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
serviceClass: null
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
program: MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
/* Undefined serviceClass */
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// TODO: Bug 1027546 - [B2G][Emulator] Support call barring
|
||||
// Currently emulator doesn't support call barring, so we expect to get a
|
||||
// 'RequestNotSupported' error here.
|
||||
{
|
||||
options: {
|
||||
program: MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
serviceClass: 0
|
||||
},
|
||||
expectedError: "RequestNotSupported"
|
||||
}
|
||||
];
|
||||
|
||||
function testGetCallBarringOption(aOptions, aExpectedError) {
|
||||
log("Test getting call barring to " + JSON.stringify(aOptions));
|
||||
function testGetCallBarringOption(aExpectedError, aOptions) {
|
||||
log("Test getCallBarringOption with " + JSON.stringify(aOptions));
|
||||
|
||||
return getCallBarringOption(aOptions)
|
||||
.then(function resolve(aResult) {
|
||||
ok(false, "should not success");
|
||||
ok(false, "should be rejected");
|
||||
}, function reject(aError) {
|
||||
is(aError.name, aExpectedError, "failed to getCallBarringOption");
|
||||
});
|
||||
@ -64,11 +17,32 @@ function testGetCallBarringOption(aOptions, aExpectedError) {
|
||||
|
||||
// Start tests
|
||||
startTestCommon(function() {
|
||||
let promise = Promise.resolve();
|
||||
for (let i = 0; i < TEST_DATA.length; i++) {
|
||||
let data = TEST_DATA[i];
|
||||
promise = promise.then(() => testGetCallBarringOption(data.options,
|
||||
data.expectedError));
|
||||
}
|
||||
return promise;
|
||||
return Promise.resolve()
|
||||
|
||||
// Test program
|
||||
.then(() => testGetCallBarringOption("InvalidParameter", {
|
||||
program: 5, /* Invalid program */
|
||||
serviceClass: 0
|
||||
}))
|
||||
|
||||
.then(() => testGetCallBarringOption("InvalidParameter", {
|
||||
program: null, /* Invalid program */
|
||||
serviceClass: 0
|
||||
}))
|
||||
|
||||
.then(() => testGetCallBarringOption("InvalidParameter", {
|
||||
/* Undefined program */
|
||||
serviceClass: 0
|
||||
}))
|
||||
|
||||
// Test serviceClass
|
||||
.then(() => testGetCallBarringOption("InvalidParameter", {
|
||||
program: MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
serviceClass: null /* Invalid serviceClass */
|
||||
}))
|
||||
|
||||
.then(() => testGetCallBarringOption("InvalidParameter", {
|
||||
program: MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
/* Undefined serviceClass */
|
||||
}));
|
||||
});
|
||||
|
@ -4,107 +4,12 @@
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = "head.js";
|
||||
|
||||
const TEST_DATA = [
|
||||
// Test passing invalid program.
|
||||
{
|
||||
options: {
|
||||
"program": 5, /* Invalid program */
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
"program": null,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
/* Undefined program */
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// Test passing invalid enabled.
|
||||
{
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": null,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
/* Undefined enabled */
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// Test passing invalid password.
|
||||
{
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": null,
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
/* Undefined password */
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// Test passing invalid serviceClass.
|
||||
{
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": null
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
}, {
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
/* Undefined serviceClass */
|
||||
},
|
||||
expectedError: "InvalidParameter"
|
||||
},
|
||||
// TODO: Bug 1027546 - [B2G][Emulator] Support call barring
|
||||
// Currently emulator doesn't support call barring, so we expect to get a
|
||||
// 'RequestNotSupported' error here.
|
||||
{
|
||||
options: {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
},
|
||||
expectedError: "RequestNotSupported"
|
||||
}
|
||||
];
|
||||
|
||||
function testSetCallBarringOption(aOptions, aExpectedError) {
|
||||
log("Test setting call barring to " + JSON.stringify(aOptions));
|
||||
function testSetCallBarringOption(aExpectedError, aOptions) {
|
||||
log("Test setCallBarringOption with " + JSON.stringify(aOptions));
|
||||
|
||||
return setCallBarringOption(aOptions)
|
||||
.then(function resolve() {
|
||||
ok(false, "changeCallBarringPassword success");
|
||||
ok(false, "should be rejected");
|
||||
}, function reject(aError) {
|
||||
is(aError.name, aExpectedError, "failed to changeCallBarringPassword");
|
||||
});
|
||||
@ -112,11 +17,79 @@ function testSetCallBarringOption(aOptions, aExpectedError) {
|
||||
|
||||
// Start tests
|
||||
startTestCommon(function() {
|
||||
let promise = Promise.resolve();
|
||||
for (let i = 0; i < TEST_DATA.length; i++) {
|
||||
let data = TEST_DATA[i];
|
||||
promise = promise.then(() => testSetCallBarringOption(data.options,
|
||||
data.expectedError));
|
||||
}
|
||||
return promise;
|
||||
return Promise.resolve()
|
||||
|
||||
// Test program
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": 5, /* Invalid program */
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": null,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
/* Undefined program */
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
// Test enabled
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": null, /* Invalid enabled */
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
/* Undefined enabled */
|
||||
"password": "0000",
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
// Test password
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": null, /* Invalid password */
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
/* Undefined password */
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("IncorrectPassword", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "1111", /* Incorrect password */
|
||||
"serviceClass": 0
|
||||
}))
|
||||
|
||||
// Test serviceClass
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
"serviceClass": null /* Invalid serviceClass */
|
||||
}))
|
||||
|
||||
.then(() => testSetCallBarringOption("InvalidParameter", {
|
||||
"program": MozMobileConnection.CALL_BARRING_PROGRAM_ALL_OUTGOING,
|
||||
"enabled": true,
|
||||
"password": "0000",
|
||||
/* Undefined serviceClass */
|
||||
}))
|
||||
});
|
||||
|
@ -306,9 +306,9 @@ MmsConnection.prototype = {
|
||||
};
|
||||
|
||||
let promises =
|
||||
this.hostsToRoute.map(function(aHost) {
|
||||
this.hostsToRoute.map((aHost) => {
|
||||
return gNetworkManager.removeHostRoute(this.networkInterface, aHost);
|
||||
}, this);
|
||||
});
|
||||
|
||||
return Promise.all(promises)
|
||||
.then(() => deactivateMmsDataCall(),
|
||||
@ -418,7 +418,7 @@ MmsConnection.prototype = {
|
||||
// Set a timer to clear the buffered MMS requests if the
|
||||
// MMS network fails to be connected within a time period.
|
||||
this.connectTimer.
|
||||
initWithCallback(this.flushPendingCallbacks.bind(this, _HTTP_STATUS_ACQUIRE_TIMEOUT),
|
||||
initWithCallback(() => this.flushPendingCallbacks(_HTTP_STATUS_ACQUIRE_TIMEOUT),
|
||||
TIME_TO_BUFFER_MMS_REQUESTS,
|
||||
Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
|
||||
@ -450,7 +450,7 @@ MmsConnection.prototype = {
|
||||
// Set a timer to delay the release of MMS network connection,
|
||||
// since the MMS requests often come consecutively in a short time.
|
||||
this.disconnectTimer.
|
||||
initWithCallback(this.onDisconnectTimerTimeout.bind(this),
|
||||
initWithCallback(() => this.onDisconnectTimerTimeout(),
|
||||
PREF_TIME_TO_RELEASE_MMS_CONNECTION,
|
||||
Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
@ -687,7 +687,7 @@ XPCOMUtils.defineLazyGetter(this, "gMmsTransactionHelper", function() {
|
||||
};
|
||||
|
||||
cancellable.isAcquiringConn =
|
||||
!mmsConnection.acquire((function(connected, errorCode) {
|
||||
!mmsConnection.acquire((connected, errorCode) => {
|
||||
|
||||
cancellable.isAcquiringConn = false;
|
||||
|
||||
@ -706,31 +706,33 @@ XPCOMUtils.defineLazyGetter(this, "gMmsTransactionHelper", function() {
|
||||
url = mmsConnection.mmsc;
|
||||
}
|
||||
|
||||
let startTransaction = function () {
|
||||
let startTransaction = () => {
|
||||
if (DEBUG) debug("sendRequest: register proxy filter to " + url);
|
||||
let proxyFilter = new MmsProxyFilter(mmsConnection, url);
|
||||
gpps.registerFilter(proxyFilter, 0);
|
||||
|
||||
cancellable.xhr = this.sendHttpRequest(mmsConnection, method,
|
||||
url, istream, proxyFilter,
|
||||
cancellable.done.bind(cancellable));
|
||||
}.bind(this);
|
||||
cancellable.xhr =
|
||||
this.sendHttpRequest(mmsConnection, method,
|
||||
url, istream, proxyFilter,
|
||||
(aHttpStatus, aData) =>
|
||||
cancellable.done(aHttpStatus, aData));
|
||||
};
|
||||
|
||||
mmsConnection.ensureRouting(url)
|
||||
.then(() => startTransaction(),
|
||||
(aError) => {
|
||||
debug("Failed to ensureRouting: " + aError);
|
||||
|
||||
cancellable.done(_HTTP_STATUS_FAILED_TO_ROUTE);
|
||||
cancellable.done(_HTTP_STATUS_FAILED_TO_ROUTE, null);
|
||||
});
|
||||
}).bind(this));
|
||||
});
|
||||
|
||||
return cancellable;
|
||||
},
|
||||
|
||||
sendHttpRequest: function(mmsConnection, method, url, istream, proxyFilter,
|
||||
callback) {
|
||||
let releaseMmsConnectionAndCallback = function(httpStatus, data) {
|
||||
let releaseMmsConnectionAndCallback = (httpStatus, data) => {
|
||||
gpps.unregisterFilter(proxyFilter);
|
||||
// Always release the MMS network connection before callback.
|
||||
mmsConnection.release();
|
||||
@ -762,7 +764,7 @@ XPCOMUtils.defineLazyGetter(this, "gMmsTransactionHelper", function() {
|
||||
}
|
||||
|
||||
// Setup event listeners
|
||||
xhr.onreadystatechange = function() {
|
||||
xhr.onreadystatechange = () => {
|
||||
if (xhr.readyState != Ci.nsIXMLHttpRequest.DONE) {
|
||||
return;
|
||||
}
|
||||
@ -937,7 +939,7 @@ NotifyResponseTransaction.prototype = {
|
||||
run: function(callback) {
|
||||
let requestCallback;
|
||||
if (callback) {
|
||||
requestCallback = function(httpStatus, data) {
|
||||
requestCallback = (httpStatus, data) => {
|
||||
// `The MMS Client SHOULD ignore the associated HTTP POST response
|
||||
// from the MMS Proxy-Relay.` ~ OMA-TS-MMS_CTR-V1_3-20110913-A
|
||||
// section 8.2.2 "Notification".
|
||||
@ -1091,7 +1093,7 @@ RetrieveTransaction.prototype = Object.create(CancellableTransaction.prototype,
|
||||
this.registerRunCallback(callback);
|
||||
|
||||
this.retryCount = 0;
|
||||
let retryCallback = (function(mmsStatus, msg) {
|
||||
let retryCallback = (mmsStatus, msg) => {
|
||||
if (MMS.MMS_PDU_STATUS_DEFERRED == mmsStatus &&
|
||||
this.retryCount < PREF_RETRIEVAL_RETRY_COUNT) {
|
||||
let time = PREF_RETRIEVAL_RETRY_INTERVALS[this.retryCount];
|
||||
@ -1101,13 +1103,13 @@ RetrieveTransaction.prototype = Object.create(CancellableTransaction.prototype,
|
||||
this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
}
|
||||
|
||||
this.timer.initWithCallback(this.retrieve.bind(this, retryCallback),
|
||||
this.timer.initWithCallback(() => this.retrieve(retryCallback),
|
||||
time, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
this.retryCount++;
|
||||
return;
|
||||
}
|
||||
this.runCallbackIfValid(mmsStatus, msg);
|
||||
}).bind(this);
|
||||
};
|
||||
|
||||
this.retrieve(retryCallback);
|
||||
},
|
||||
@ -1128,7 +1130,7 @@ RetrieveTransaction.prototype = Object.create(CancellableTransaction.prototype,
|
||||
this.cancellable =
|
||||
gMmsTransactionHelper.sendRequest(this.mmsConnection,
|
||||
"GET", this.contentLocation, null,
|
||||
(function(httpStatus, data) {
|
||||
(httpStatus, data) => {
|
||||
let mmsStatus = gMmsTransactionHelper
|
||||
.translateHttpStatusToMmsStatus(httpStatus,
|
||||
this.cancelledReason,
|
||||
@ -1161,7 +1163,7 @@ RetrieveTransaction.prototype = Object.create(CancellableTransaction.prototype,
|
||||
}
|
||||
|
||||
callback(MMS.MMS_PDU_STATUS_RETRIEVED, retrieved);
|
||||
}).bind(this));
|
||||
});
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
@ -1253,12 +1255,12 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
*/
|
||||
loadBlobs: {
|
||||
value: function(parts, callback) {
|
||||
let callbackIfValid = function callbackIfValid() {
|
||||
let callbackIfValid = () => {
|
||||
if (DEBUG) debug("All parts loaded: " + JSON.stringify(parts));
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!parts || !parts.length) {
|
||||
callbackIfValid();
|
||||
@ -1266,28 +1268,27 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
}
|
||||
|
||||
let numPartsToLoad = parts.length;
|
||||
for each (let part in parts) {
|
||||
if (!(part.content instanceof Ci.nsIDOMBlob)) {
|
||||
parts.forEach((aPart) => {
|
||||
if (!(aPart.content instanceof Ci.nsIDOMBlob)) {
|
||||
numPartsToLoad--;
|
||||
if (!numPartsToLoad) {
|
||||
callbackIfValid();
|
||||
return;
|
||||
}
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
let fileReader = Cc["@mozilla.org/files/filereader;1"]
|
||||
.createInstance(Ci.nsIDOMFileReader);
|
||||
fileReader.addEventListener("loadend",
|
||||
(function onloadend(part, event) {
|
||||
let arrayBuffer = event.target.result;
|
||||
part.content = new Uint8Array(arrayBuffer);
|
||||
fileReader.addEventListener("loadend", (aEvent) => {
|
||||
let arrayBuffer = aEvent.target.result;
|
||||
aPart.content = new Uint8Array(arrayBuffer);
|
||||
numPartsToLoad--;
|
||||
if (!numPartsToLoad) {
|
||||
callbackIfValid();
|
||||
}
|
||||
}).bind(null, part));
|
||||
fileReader.readAsArrayBuffer(part.content);
|
||||
};
|
||||
});
|
||||
fileReader.readAsArrayBuffer(aPart.content);
|
||||
});
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
@ -1304,7 +1305,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
this.registerRunCallback(callback);
|
||||
|
||||
if (!this.istreamComposed) {
|
||||
this.loadBlobs(this.msg.parts, (function() {
|
||||
this.loadBlobs(this.msg.parts, () => {
|
||||
this.istream = MMS.PduHelper.compose(null, this.msg);
|
||||
this.istreamSize = this.istream.available();
|
||||
this.istreamComposed = true;
|
||||
@ -1313,7 +1314,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
} else {
|
||||
this.run(callback);
|
||||
}
|
||||
}).bind(this));
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1323,7 +1324,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
}
|
||||
|
||||
this.retryCount = 0;
|
||||
let retryCallback = (function(mmsStatus, msg) {
|
||||
let retryCallback = (mmsStatus, msg) => {
|
||||
if ((MMS.MMS_PDU_ERROR_TRANSIENT_FAILURE == mmsStatus ||
|
||||
MMS.MMS_PDU_ERROR_PERMANENT_FAILURE == mmsStatus) &&
|
||||
this.retryCount < PREF_SEND_RETRY_COUNT) {
|
||||
@ -1342,7 +1343,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
this.istream = MMS.PduHelper.compose(null, this.msg);
|
||||
}
|
||||
|
||||
this.timer.initWithCallback(this.send.bind(this, retryCallback),
|
||||
this.timer.initWithCallback(() => this.send(retryCallback),
|
||||
PREF_SEND_RETRY_INTERVAL[this.retryCount],
|
||||
Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
this.retryCount++;
|
||||
@ -1350,7 +1351,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
}
|
||||
|
||||
this.runCallbackIfValid(mmsStatus, msg);
|
||||
}).bind(this);
|
||||
};
|
||||
|
||||
// This is the entry point to start sending.
|
||||
this.send(retryCallback);
|
||||
@ -1374,7 +1375,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
"POST",
|
||||
null,
|
||||
this.istream,
|
||||
(function(httpStatus, data) {
|
||||
(httpStatus, data) => {
|
||||
let mmsStatus = gMmsTransactionHelper.
|
||||
translateHttpStatusToMmsStatus(
|
||||
httpStatus,
|
||||
@ -1401,7 +1402,7 @@ SendTransaction.prototype = Object.create(CancellableTransaction.prototype, {
|
||||
|
||||
let responseStatus = response.headers["x-mms-response-status"];
|
||||
callback(responseStatus, response);
|
||||
}).bind(this));
|
||||
});
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
@ -1442,7 +1443,7 @@ AcknowledgeTransaction.prototype = {
|
||||
run: function(callback) {
|
||||
let requestCallback;
|
||||
if (callback) {
|
||||
requestCallback = function(httpStatus, data) {
|
||||
requestCallback = (httpStatus, data) => {
|
||||
// `The MMS Client SHOULD ignore the associated HTTP POST response
|
||||
// from the MMS Proxy-Relay.` ~ OMA-TS-MMS_CTR-V1_3-20110913-A
|
||||
// section 8.2.3 "Retrieving an MM".
|
||||
@ -1677,24 +1678,30 @@ MmsService.prototype = {
|
||||
// Sadly we cannot directly broadcast the aDomMessage object
|
||||
// because the system message mechamism will rewrap the object
|
||||
// based on the content window, which needs to know the properties.
|
||||
gSystemMessenger.broadcastMessage(aName, {
|
||||
iccId: aDomMessage.iccId,
|
||||
type: aDomMessage.type,
|
||||
id: aDomMessage.id,
|
||||
threadId: aDomMessage.threadId,
|
||||
delivery: aDomMessage.delivery,
|
||||
deliveryInfo: aDomMessage.deliveryInfo,
|
||||
sender: aDomMessage.sender,
|
||||
receivers: aDomMessage.receivers,
|
||||
timestamp: aDomMessage.timestamp,
|
||||
sentTimestamp: aDomMessage.sentTimestamp,
|
||||
read: aDomMessage.read,
|
||||
subject: aDomMessage.subject,
|
||||
smil: aDomMessage.smil,
|
||||
attachments: aDomMessage.attachments,
|
||||
expiryDate: aDomMessage.expiryDate,
|
||||
readReportRequested: aDomMessage.readReportRequested
|
||||
});
|
||||
try {
|
||||
gSystemMessenger.broadcastMessage(aName, {
|
||||
iccId: aDomMessage.iccId,
|
||||
type: aDomMessage.type,
|
||||
id: aDomMessage.id,
|
||||
threadId: aDomMessage.threadId,
|
||||
delivery: aDomMessage.delivery,
|
||||
deliveryInfo: aDomMessage.deliveryInfo,
|
||||
sender: aDomMessage.sender,
|
||||
receivers: aDomMessage.receivers,
|
||||
timestamp: aDomMessage.timestamp,
|
||||
sentTimestamp: aDomMessage.sentTimestamp,
|
||||
read: aDomMessage.read,
|
||||
subject: aDomMessage.subject,
|
||||
smil: aDomMessage.smil,
|
||||
attachments: aDomMessage.attachments,
|
||||
expiryDate: aDomMessage.expiryDate,
|
||||
readReportRequested: aDomMessage.readReportRequested
|
||||
});
|
||||
} catch (e) {
|
||||
if (DEBUG) {
|
||||
debug("Failed to _broadcastSmsSystemMessage: " + e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1712,6 +1719,21 @@ MmsService.prototype = {
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsSentObserverTopic, null);
|
||||
},
|
||||
|
||||
/**
|
||||
* A helper function to broadcast system message and notify observers that
|
||||
* an MMS is failed to send.
|
||||
*
|
||||
* @params aDomMessage
|
||||
* The nsIDOMMozMmsMessage object.
|
||||
*/
|
||||
broadcastSentFailureMessageEvent: function(aDomMessage) {
|
||||
// Broadcasting a 'sms-sent' system message to open apps.
|
||||
this.broadcastMmsSystemMessage(kSmsFailedObserverTopic, aDomMessage);
|
||||
|
||||
// Notifying observers an MMS message is sent.
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
},
|
||||
|
||||
/**
|
||||
* A helper function to broadcast system message and notify observers that
|
||||
* an MMS is received.
|
||||
@ -1719,7 +1741,7 @@ MmsService.prototype = {
|
||||
* @params aDomMessage
|
||||
* The nsIDOMMozMmsMessage object.
|
||||
*/
|
||||
broadcastReceivedMessageEvent :function broadcastReceivedMessageEvent(aDomMessage) {
|
||||
broadcastReceivedMessageEvent: function(aDomMessage) {
|
||||
// Broadcasting a 'sms-received' system message to open apps.
|
||||
this.broadcastMmsSystemMessage(kSmsReceivedObserverTopic, aDomMessage);
|
||||
|
||||
@ -1767,9 +1789,8 @@ MmsService.prototype = {
|
||||
null,
|
||||
DELIVERY_STATUS_ERROR,
|
||||
null,
|
||||
(function(rv, domMessage) {
|
||||
this.broadcastReceivedMessageEvent(domMessage);
|
||||
}).bind(this));
|
||||
(rv, domMessage) =>
|
||||
this.broadcastReceivedMessageEvent(domMessage));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1777,7 +1798,7 @@ MmsService.prototype = {
|
||||
retrievedMessage,
|
||||
savableMessage);
|
||||
gMobileMessageDatabaseService.saveReceivedMessage(savableMessage,
|
||||
(function(rv, domMessage) {
|
||||
(rv, domMessage) => {
|
||||
let success = Components.isSuccessCode(rv);
|
||||
|
||||
// Cite 6.2.1 "Transaction Flow" in OMA-TS-MMS_ENC-V1_3-20110913-A:
|
||||
@ -1802,7 +1823,7 @@ MmsService.prototype = {
|
||||
}
|
||||
|
||||
this.broadcastReceivedMessageEvent(domMessage);
|
||||
}).bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1860,10 +1881,12 @@ MmsService.prototype = {
|
||||
// roaming, proceed to retrieve MMS.
|
||||
this.retrieveMessage(mmsConnection,
|
||||
url,
|
||||
this.retrieveMessageCallback.bind(this,
|
||||
mmsConnection,
|
||||
wish,
|
||||
savableMessage),
|
||||
(aMmsStatus, aRetrievedMsg) =>
|
||||
this.retrieveMessageCallback(mmsConnection,
|
||||
wish,
|
||||
savableMessage,
|
||||
aMmsStatus,
|
||||
aRetrievedMsg),
|
||||
domMessage);
|
||||
},
|
||||
|
||||
@ -1877,8 +1900,8 @@ MmsService.prototype = {
|
||||
*/
|
||||
handleNotificationIndication: function(serviceId, notification) {
|
||||
let transactionId = notification.headers["x-mms-transaction-id"];
|
||||
gMobileMessageDatabaseService.getMessageRecordByTransactionId(transactionId,
|
||||
(function(aRv, aMessageRecord) {
|
||||
gMobileMessageDatabaseService
|
||||
.getMessageRecordByTransactionId(transactionId, (aRv, aMessageRecord) => {
|
||||
if (Components.isSuccessCode(aRv) && aMessageRecord) {
|
||||
if (DEBUG) debug("We already got the NotificationIndication with transactionId = "
|
||||
+ transactionId + " before.");
|
||||
@ -1912,12 +1935,13 @@ MmsService.prototype = {
|
||||
|
||||
gMobileMessageDatabaseService
|
||||
.saveReceivedMessage(savableMessage,
|
||||
this.saveReceivedMessageCallback
|
||||
.bind(this,
|
||||
mmsConnection,
|
||||
retrievalMode,
|
||||
savableMessage));
|
||||
}).bind(this));
|
||||
(aRv, aDomMessage) =>
|
||||
this.saveReceivedMessageCallback(mmsConnection,
|
||||
retrievalMode,
|
||||
savableMessage,
|
||||
aRv,
|
||||
aDomMessage));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1965,18 +1989,19 @@ MmsService.prototype = {
|
||||
if (DEBUG) debug("Updating the delivery status to: " + deliveryStatus);
|
||||
gMobileMessageDatabaseService
|
||||
.setMessageDeliveryStatusByEnvelopeId(envelopeId, address, deliveryStatus,
|
||||
(function(aRv, aDomMessage) {
|
||||
(aRv, aDomMessage) => {
|
||||
if (DEBUG) debug("Marking the delivery status is done.");
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
|
||||
let topic;
|
||||
if (mmsStatus === MMS.MMS_PDU_STATUS_RETRIEVED) {
|
||||
topic = kSmsDeliverySuccessObserverTopic;
|
||||
|
||||
// Broadcasting a 'sms-delivery-success' system message to open apps.
|
||||
this.broadcastMmsSystemMessage(topic, aDomMessage);
|
||||
} else if (mmsStatus === MMS.MMS_PDU_STATUS_REJECTED) {
|
||||
topic = kSmsDeliveryErrorObserverTopic;
|
||||
// Broadcasting a 'sms-delivery-error' system message to open apps.
|
||||
this.broadcastMmsSystemMessage(topic, aDomMessage);
|
||||
} else {
|
||||
if (DEBUG) debug("Needn't fire event for this MMS status. Returning.");
|
||||
return;
|
||||
@ -1984,7 +2009,7 @@ MmsService.prototype = {
|
||||
|
||||
// Notifying observers the delivery status is updated.
|
||||
Services.obs.notifyObservers(aDomMessage, topic, null);
|
||||
}).bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -2014,7 +2039,7 @@ MmsService.prototype = {
|
||||
|
||||
gMobileMessageDatabaseService
|
||||
.setMessageReadStatusByEnvelopeId(envelopeId, address, readStatus,
|
||||
(function(aRv, aDomMessage) {
|
||||
(aRv, aDomMessage) => {
|
||||
if (!Components.isSuccessCode(aRv)) {
|
||||
if (DEBUG) debug("Failed to update read status: " + aRv);
|
||||
return;
|
||||
@ -2033,7 +2058,7 @@ MmsService.prototype = {
|
||||
|
||||
// Notifying observers the read status is updated.
|
||||
Services.obs.notifyObservers(aDomMessage, topic, null);
|
||||
}).bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@ -2224,11 +2249,7 @@ MmsService.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
let self = this;
|
||||
|
||||
let sendTransactionCb = function sendTransactionCb(aDomMessage,
|
||||
aErrorCode,
|
||||
aEnvelopeId) {
|
||||
let sendTransactionCb = (aDomMessage, aErrorCode, aEnvelopeId) => {
|
||||
if (DEBUG) {
|
||||
debug("The returned status of sending transaction: " +
|
||||
"aErrorCode: " + aErrorCode + " aEnvelopeId: " + aEnvelopeId);
|
||||
@ -2238,7 +2259,7 @@ MmsService.prototype = {
|
||||
// cancelled), we don't need to reset the its delievery state/status.
|
||||
if (aErrorCode == Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR) {
|
||||
aRequest.notifySendMessageFailed(aErrorCode, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
this.broadcastSentFailureMessageEvent(aDomMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2249,20 +2270,20 @@ MmsService.prototype = {
|
||||
isSentSuccess ? DELIVERY_SENT : DELIVERY_ERROR,
|
||||
isSentSuccess ? null : DELIVERY_STATUS_ERROR,
|
||||
aEnvelopeId,
|
||||
function notifySetDeliveryResult(aRv, aDomMessage) {
|
||||
(aRv, aDomMessage) => {
|
||||
if (DEBUG) debug("Marking the delivery state/staus is done. Notify sent or failed.");
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
if (!isSentSuccess) {
|
||||
if (DEBUG) debug("Sending MMS failed.");
|
||||
aRequest.notifySendMessageFailed(aErrorCode, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
this.broadcastSentFailureMessageEvent(aDomMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
if (DEBUG) debug("Sending MMS succeeded.");
|
||||
|
||||
// Notifying observers the MMS message is sent.
|
||||
self.broadcastSentMessageEvent(aDomMessage);
|
||||
this.broadcastSentMessageEvent(aDomMessage);
|
||||
|
||||
// Return the request after sending the MMS message successfully.
|
||||
aRequest.notifyMessageSent(aDomMessage);
|
||||
@ -2276,13 +2297,13 @@ MmsService.prototype = {
|
||||
savableMessage);
|
||||
gMobileMessageDatabaseService
|
||||
.saveSendingMessage(savableMessage,
|
||||
function notifySendingResult(aRv, aDomMessage) {
|
||||
(aRv, aDomMessage) => {
|
||||
if (!Components.isSuccessCode(aRv)) {
|
||||
if (DEBUG) debug("Error! Fail to save sending message! rv = " + aRv);
|
||||
aRequest.notifySendMessageFailed(
|
||||
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(aRv),
|
||||
aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
this.broadcastSentFailureMessageEvent(aDomMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2308,7 +2329,7 @@ MmsService.prototype = {
|
||||
// To support DSDS, we have to stop users sending MMS when the selected
|
||||
// SIM is not active, thus avoiding the data disconnection of the current
|
||||
// SIM. Users have to manually swith the default SIM before sending.
|
||||
if (mmsConnection.serviceId != self.mmsDefaultServiceId) {
|
||||
if (mmsConnection.serviceId != this.mmsDefaultServiceId) {
|
||||
if (DEBUG) debug("RIL service is not active to send MMS.");
|
||||
sendTransactionCb(aDomMessage,
|
||||
Ci.nsIMobileMessageCallback.NON_ACTIVE_SIM_CARD_ERROR,
|
||||
@ -2328,7 +2349,7 @@ MmsService.prototype = {
|
||||
Ci.nsIMobileMessageCallback.INTERNAL_ERROR, null);
|
||||
return;
|
||||
}
|
||||
sendTransaction.run(function callback(aMmsStatus, aMsg) {
|
||||
sendTransaction.run((aMmsStatus, aMsg) => {
|
||||
if (DEBUG) debug("The sending status of sendTransaction.run(): " + aMmsStatus);
|
||||
let errorCode;
|
||||
if (aMmsStatus == _MMS_ERROR_MESSAGE_DELETED) {
|
||||
@ -2353,8 +2374,8 @@ MmsService.prototype = {
|
||||
|
||||
retrieve: function(aMessageId, aRequest) {
|
||||
if (DEBUG) debug("Retrieving message with ID " + aMessageId);
|
||||
gMobileMessageDatabaseService.getMessageRecordById(aMessageId,
|
||||
(function notifyResult(aRv, aMessageRecord, aDomMessage) {
|
||||
gMobileMessageDatabaseService
|
||||
.getMessageRecordById(aMessageId, (aRv, aMessageRecord, aDomMessage) => {
|
||||
if (!Components.isSuccessCode(aRv)) {
|
||||
if (DEBUG) debug("Function getMessageRecordById() return error: " + aRv);
|
||||
aRequest.notifyGetMessageFailed(
|
||||
@ -2439,7 +2460,7 @@ MmsService.prototype = {
|
||||
let url = aMessageRecord.headers["x-mms-content-location"].uri;
|
||||
// For X-Mms-Report-Allowed
|
||||
let wish = aMessageRecord.headers["x-mms-delivery-report"];
|
||||
let responseNotify = function responseNotify(mmsStatus, retrievedMsg) {
|
||||
let responseNotify = (mmsStatus, retrievedMsg) => {
|
||||
// If the messsage has been deleted (because the retrieving process is
|
||||
// cancelled), we don't need to reset the its delievery state/status.
|
||||
if (mmsStatus == _MMS_ERROR_MESSAGE_DELETED) {
|
||||
@ -2466,9 +2487,7 @@ MmsService.prototype = {
|
||||
null,
|
||||
DELIVERY_STATUS_ERROR,
|
||||
null,
|
||||
function() {
|
||||
aRequest.notifyGetMessageFailed(errorCode);
|
||||
});
|
||||
() => aRequest.notifyGetMessageFailed(errorCode));
|
||||
return;
|
||||
}
|
||||
// In OMA-TS-MMS_ENC-V1_3, Table 5 in page 25. This header field
|
||||
@ -2494,7 +2513,7 @@ MmsService.prototype = {
|
||||
aMessageRecord);
|
||||
|
||||
gMobileMessageDatabaseService.saveReceivedMessage(aMessageRecord,
|
||||
(function(rv, domMessage) {
|
||||
(rv, domMessage) => {
|
||||
let success = Components.isSuccessCode(rv);
|
||||
if (!success) {
|
||||
// At this point we could send a message to content to
|
||||
@ -2521,7 +2540,7 @@ MmsService.prototype = {
|
||||
transactionId,
|
||||
reportAllowed);
|
||||
transaction.run();
|
||||
}).bind(this));
|
||||
});
|
||||
};
|
||||
|
||||
// Update the delivery status to pending in DB.
|
||||
@ -2531,7 +2550,7 @@ MmsService.prototype = {
|
||||
null,
|
||||
DELIVERY_STATUS_PENDING,
|
||||
null,
|
||||
(function(rv) {
|
||||
(rv) => {
|
||||
let success = Components.isSuccessCode(rv);
|
||||
if (!success) {
|
||||
if (DEBUG) debug("Could not change the delivery status, error code " + rv);
|
||||
@ -2542,10 +2561,11 @@ MmsService.prototype = {
|
||||
|
||||
this.retrieveMessage(mmsConnection,
|
||||
url,
|
||||
responseNotify.bind(this),
|
||||
(aMmsStatus, aRetrievedMsg) =>
|
||||
responseNotify(aMmsStatus, aRetrievedMsg),
|
||||
aDomMessage);
|
||||
}).bind(this));
|
||||
}).bind(this));
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
sendReadReport: function(messageID, toAddress, iccId) {
|
||||
|
@ -110,7 +110,8 @@ function SmsService() {
|
||||
this.smsDefaultServiceId = this._getDefaultServiceId();
|
||||
|
||||
this._portAddressedSmsApps = {};
|
||||
this._portAddressedSmsApps[gWAP.WDP_PORT_PUSH] = this._handleSmsWdpPortPush.bind(this);
|
||||
this._portAddressedSmsApps[gWAP.WDP_PORT_PUSH] =
|
||||
(aMessage, aServiceId) => this._handleSmsWdpPortPush(aMessage, aServiceId);
|
||||
|
||||
this._receivedSmsSegmentsMap = {};
|
||||
|
||||
@ -202,7 +203,7 @@ SmsService.prototype = {
|
||||
}
|
||||
if (DEBUG) debug("Setting the timer for releasing the CPU wake lock.");
|
||||
this._smsHandledWakeLockTimer
|
||||
.initWithCallback(this._releaseSmsHandledWakeLock.bind(this),
|
||||
.initWithCallback(() => this._releaseSmsHandledWakeLock(),
|
||||
SMS_HANDLED_WAKELOCK_TIMEOUT,
|
||||
Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
},
|
||||
@ -308,6 +309,8 @@ SmsService.prototype = {
|
||||
null,
|
||||
(aRv, aDomMessage) => {
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
aRequest.notifySendMessageFailed(error, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
});
|
||||
@ -373,16 +376,16 @@ SmsService.prototype = {
|
||||
(aRv, aDomMessage) => {
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
|
||||
let topic = (aResponse.deliveryStatus ==
|
||||
RIL.GECKO_SMS_DELIVERY_STATUS_SUCCESS)
|
||||
? kSmsDeliverySuccessObserverTopic
|
||||
: kSmsDeliveryErrorObserverTopic;
|
||||
let [topic, notificationType] =
|
||||
(aResponse.deliveryStatus == RIL.GECKO_SMS_DELIVERY_STATUS_SUCCESS)
|
||||
? [kSmsDeliverySuccessObserverTopic,
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_DELIVERY_SUCCESS]
|
||||
: [kSmsDeliveryErrorObserverTopic,
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_DELIVERY_ERROR];
|
||||
|
||||
// Broadcasting a "sms-delivery-success" system message to open apps.
|
||||
if (topic == kSmsDeliverySuccessObserverTopic) {
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_DELIVERY_SUCCESS, aDomMessage);
|
||||
}
|
||||
// Broadcasting a "sms-delivery-success/sms-delivery-error" system
|
||||
// message to open apps.
|
||||
this._broadcastSmsSystemMessage(notificationType, aDomMessage);
|
||||
|
||||
// Notifying observers the delivery status is updated.
|
||||
Services.obs.notifyObservers(aDomMessage, topic, null);
|
||||
@ -861,6 +864,8 @@ SmsService.prototype = {
|
||||
let saveSendingMessageCallback = (aRv, aSendingMessage) => {
|
||||
if (!Components.isSuccessCode(aRv)) {
|
||||
if (DEBUG) debug("Error! Fail to save sending message! aRv = " + aRv);
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aSendingMessage);
|
||||
aRequest.notifySendMessageFailed(
|
||||
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(aRv),
|
||||
aSendingMessage);
|
||||
@ -904,6 +909,8 @@ SmsService.prototype = {
|
||||
null,
|
||||
(aRv, aDomMessage) => {
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
aRequest.notifySendMessageFailed(errorCode, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
});
|
||||
@ -1042,7 +1049,7 @@ SmsService.prototype = {
|
||||
this._processReceivedSmsSegment(segment));
|
||||
} else {
|
||||
gMobileMessageDatabaseService
|
||||
.saveSmsSegment(segment, function notifyResult(aRv, aCompleteMessage) {
|
||||
.saveSmsSegment(segment, (aRv, aCompleteMessage) => {
|
||||
handleReceivedAndAck(aRv, // Ack according to the result after saving
|
||||
aCompleteMessage);
|
||||
});
|
||||
|
@ -16,7 +16,8 @@ interface nsISmsMessenger : nsISupports
|
||||
const unsigned short NOTIFICATION_TYPE_DELIVERY_SUCCESS = 2;
|
||||
|
||||
/**
|
||||
* To broadcast 'sms-received', 'sms-delivery-success', 'sms-sent' system message
|
||||
* To broadcast system messages of 'sms-received', 'sms-delivery-success',
|
||||
* 'sms-sent', 'sms-failed' and 'sms-delivery-error'.
|
||||
*
|
||||
* Note: Except aNotificationType, all parameters are the attributes of the
|
||||
* nsIDOMMozSmsMessage generated by nsIMobileMessageService.createSmsMessage().
|
||||
@ -67,3 +68,12 @@ interface nsISmsMessenger : nsISupports
|
||||
in DOMTimeStamp aDeliveryTimestamp,
|
||||
in boolean aRead);
|
||||
};
|
||||
|
||||
[scriptable, uuid(1e293188-d845-11e4-bc92-af2bf0a70344)]
|
||||
interface nsISmsMessenger_new : nsISmsMessenger
|
||||
{
|
||||
/* 'sms-failed' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_SENT_FAILED = 3;
|
||||
/* 'sms-delivery-error' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_DELIVERY_ERROR = 4;
|
||||
};
|
||||
|
@ -332,6 +332,8 @@ nsNPAPIPluginStreamListener::OnStartBinding(nsPluginStreamListenerPeer* streamPe
|
||||
if (error != NPERR_NO_ERROR)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
mStreamState = eNewStreamCalled;
|
||||
|
||||
if (streamType == nsPluginStreamListenerPeer::STREAM_TYPE_UNKNOWN) {
|
||||
SuspendRequest();
|
||||
}
|
||||
|
@ -814,7 +814,7 @@ this.RequestSyncService = {
|
||||
this._pendingOperation = false;
|
||||
|
||||
// managing the pending messages now that the initialization is completed.
|
||||
while (this._pendingMessages.length) {
|
||||
while (this._pendingMessages.length && !this._pendingOperation) {
|
||||
this.receiveMessage(this._pendingMessages.shift());
|
||||
}
|
||||
},
|
||||
|
@ -17,3 +17,4 @@ skip-if = !(buildapp == 'b2g' && toolkit == 'gonk')
|
||||
[test_runNow.html]
|
||||
run-if = buildapp == 'b2g' && toolkit == 'gonk'
|
||||
[test_promise.html]
|
||||
[test_bug1151082.html]
|
||||
|
79
dom/requestsync/tests/test_bug1151082.html
Normal file
79
dom/requestsync/tests/test_bug1151082.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for RequestSync bug 1151082</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="common_basic.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7">
|
||||
|
||||
|
||||
var tests = [
|
||||
function() {
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.requestSync.enabled", true],
|
||||
["dom.requestSync.minInterval", 1],
|
||||
["dom.ignore_webidl_scope_checks", true]]}, runTests);
|
||||
},
|
||||
|
||||
function() {
|
||||
SpecialPowers.pushPermissions(
|
||||
[{ "type": "requestsync-manager", "allow": 1, "context": document } ], runTests);
|
||||
},
|
||||
|
||||
function() {
|
||||
if (SpecialPowers.isMainProcess()) {
|
||||
SpecialPowers.Cu.import("resource://gre/modules/RequestSyncService.jsm");
|
||||
}
|
||||
runTests();
|
||||
},
|
||||
|
||||
function() {
|
||||
counter = 2;
|
||||
function registerCb() {
|
||||
if (!--counter) {
|
||||
ok(true, "All the registrations are done.");
|
||||
runTests();
|
||||
}
|
||||
}
|
||||
|
||||
navigator.sync.register('foobar', { minInterval: 5, wakeUpPage:'/' }).then(registerCb, genericError);
|
||||
navigator.sync.register('barfoo', { minInterval: 5, wakeUpPage:'/' }).then(registerCb, genericError);
|
||||
},
|
||||
|
||||
function() {
|
||||
counter = 2;
|
||||
function unregisterCb() {
|
||||
if (!--counter) {
|
||||
ok(true, "All the unregistrations are done.");
|
||||
runTests();
|
||||
}
|
||||
}
|
||||
|
||||
navigator.sync.unregister('foobar').then(unregisterCb, genericError);
|
||||
navigator.sync.unregister('barfoo').then(unregisterCb, genericError);
|
||||
}
|
||||
];
|
||||
|
||||
function runTests() {
|
||||
if (!tests.length) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
var test = tests.shift();
|
||||
test();
|
||||
}
|
||||
|
||||
function finish() {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
runTests();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -99,10 +99,15 @@ SpeakerManagerService::TurnOnSpeaker(bool aOn)
|
||||
{
|
||||
nsCOMPtr<nsIAudioManager> audioManager = do_GetService(NS_AUDIOMANAGER_CONTRACTID);
|
||||
NS_ENSURE_TRUE_VOID(audioManager);
|
||||
int32_t phoneState;
|
||||
audioManager->GetPhoneState(&phoneState);
|
||||
int32_t forceuse = (phoneState == nsIAudioManager::PHONE_STATE_IN_CALL ||
|
||||
phoneState == nsIAudioManager::PHONE_STATE_IN_COMMUNICATION)
|
||||
? nsIAudioManager::USE_COMMUNICATION : nsIAudioManager::USE_MEDIA;
|
||||
if (aOn) {
|
||||
audioManager->SetForceForUse(nsIAudioManager::USE_MEDIA, nsIAudioManager::FORCE_SPEAKER);
|
||||
audioManager->SetForceForUse(forceuse, nsIAudioManager::FORCE_SPEAKER);
|
||||
} else {
|
||||
audioManager->SetForceForUse(nsIAudioManager::USE_MEDIA, nsIAudioManager::FORCE_NONE);
|
||||
audioManager->SetForceForUse(forceuse, nsIAudioManager::FORCE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,13 +84,19 @@ RILSystemMessenger.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Wrapper to send 'sms-received', 'sms-delivery-success', 'sms-sent' system message.
|
||||
* Wrapper to send 'sms-received', 'sms-delivery-success', 'sms-sent',
|
||||
* 'sms-failed', 'sms-delivery-error' system message.
|
||||
*/
|
||||
notifySms: function(aNotificationType, aId, aThreadId, aIccId, aDelivery,
|
||||
aDeliveryStatus, aSender, aReceiver, aBody, aMessageClass,
|
||||
aTimestamp, aSentTimestamp, aDeliveryTimestamp, aRead) {
|
||||
let msgType =
|
||||
["sms-received", "sms-sent", "sms-delivery-success"][aNotificationType];
|
||||
let msgType = [
|
||||
"sms-received",
|
||||
"sms-sent",
|
||||
"sms-delivery-success",
|
||||
"sms-failed",
|
||||
"sms-delivery-error"
|
||||
][aNotificationType];
|
||||
|
||||
if (!msgType) {
|
||||
throw new Error("Invalid Notification Type: " + aNotificationType);
|
||||
|
@ -51,6 +51,7 @@ RILSystemMessengerHelper.prototype = {
|
||||
classID: RILSYSTEMMESSENGERHELPER_CID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyMessenger,
|
||||
Ci.nsISmsMessenger,
|
||||
Ci.nsISmsMessenger_new,
|
||||
Ci.nsICellbroadcastMessenger,
|
||||
Ci.nsIMobileConnectionMessenger,
|
||||
Ci.nsIIccMessenger]),
|
||||
|
@ -5038,6 +5038,7 @@ RilObject.prototype[REQUEST_QUERY_FACILITY_LOCK] = function REQUEST_QUERY_FACILI
|
||||
|
||||
if (options.queryServiceClass) {
|
||||
options.enabled = (services & options.queryServiceClass) ? true : false;
|
||||
options.serviceClass = options.queryServiceClass;
|
||||
} else {
|
||||
options.enabled = services ? true : false;
|
||||
}
|
||||
|
@ -60,6 +60,9 @@ function run_test() {
|
||||
let smsMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsISmsMessenger);
|
||||
|
||||
let smsMessenger_new = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsISmsMessenger_new);
|
||||
|
||||
let cellbroadcastMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsICellbroadcastMessenger);
|
||||
|
||||
@ -71,6 +74,7 @@ function run_test() {
|
||||
|
||||
ok(telephonyMessenger !== null, "Get TelephonyMessenger.");
|
||||
ok(smsMessenger != null, "Get SmsMessenger.");
|
||||
ok(smsMessenger_new != null, "Get SmsMessenger_new.");
|
||||
ok(cellbroadcastMessenger != null, "Get CellbroadcastMessenger.");
|
||||
ok(mobileConnectionMessenger != null, "Get MobileConnectionMessenger.");
|
||||
ok(iccMessenger != null, "Get IccMessenger.");
|
||||
@ -243,9 +247,75 @@ add_test(function test_sms_messenger_notify_sms() {
|
||||
read: true
|
||||
});
|
||||
|
||||
// Verify 'sms-failed' system message.
|
||||
messenger.notifySms(Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED,
|
||||
7,
|
||||
8,
|
||||
"99887766554433221100",
|
||||
Ci.nsISmsService.DELIVERY_TYPE_ERROR,
|
||||
Ci.nsISmsService.DELIVERY_STATUS_TYPE_ERROR,
|
||||
null,
|
||||
"+0987654321",
|
||||
"Outgoing message",
|
||||
Ci.nsISmsService.MESSAGE_CLASS_TYPE_NORMAL,
|
||||
timestamp,
|
||||
0,
|
||||
0,
|
||||
true);
|
||||
|
||||
equal_received_system_message("sms-failed", {
|
||||
iccId: "99887766554433221100",
|
||||
type: "sms",
|
||||
id: 7,
|
||||
threadId: 8,
|
||||
delivery: "error",
|
||||
deliveryStatus: "error",
|
||||
sender: null,
|
||||
receiver: "+0987654321",
|
||||
body: "Outgoing message",
|
||||
messageClass: "normal",
|
||||
timestamp: timestamp,
|
||||
sentTimestamp: 0,
|
||||
deliveryTimestamp: 0,
|
||||
read: true
|
||||
});
|
||||
|
||||
// Verify 'sms-delivery-error' system message.
|
||||
messenger.notifySms(Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_DELIVERY_ERROR,
|
||||
9,
|
||||
10,
|
||||
"99887766554433221100",
|
||||
Ci.nsISmsService.DELIVERY_TYPE_SENT,
|
||||
Ci.nsISmsService.DELIVERY_STATUS_TYPE_ERROR,
|
||||
null,
|
||||
"+0987654321",
|
||||
"Outgoing message",
|
||||
Ci.nsISmsService.MESSAGE_CLASS_TYPE_NORMAL,
|
||||
timestamp,
|
||||
0,
|
||||
0,
|
||||
true);
|
||||
|
||||
equal_received_system_message("sms-delivery-error", {
|
||||
iccId: "99887766554433221100",
|
||||
type: "sms",
|
||||
id: 9,
|
||||
threadId: 10,
|
||||
delivery: "sent",
|
||||
deliveryStatus: "error",
|
||||
sender: null,
|
||||
receiver: "+0987654321",
|
||||
body: "Outgoing message",
|
||||
messageClass: "normal",
|
||||
timestamp: timestamp,
|
||||
sentTimestamp: 0,
|
||||
deliveryTimestamp: 0,
|
||||
read: true
|
||||
});
|
||||
|
||||
// Verify the protection of invalid nsISmsMessenger.NOTIFICATION_TYPEs.
|
||||
try {
|
||||
messenger.notifySms(3,
|
||||
messenger.notifySms(5,
|
||||
1,
|
||||
2,
|
||||
"99887766554433221100",
|
||||
|
@ -173,15 +173,26 @@ Telephony::IsActiveState(uint16_t aCallState) {
|
||||
}
|
||||
|
||||
uint32_t
|
||||
Telephony::ProvidedOrDefaultServiceId(const Optional<uint32_t>& aServiceId)
|
||||
Telephony::GetServiceId(const Optional<uint32_t>& aServiceId,
|
||||
bool aGetIfActiveCall)
|
||||
{
|
||||
if (aServiceId.WasPassed()) {
|
||||
return aServiceId.Value();
|
||||
} else {
|
||||
uint32_t serviceId = 0;
|
||||
mService->GetDefaultServiceId(&serviceId);
|
||||
return serviceId;
|
||||
} else if (aGetIfActiveCall) {
|
||||
nsTArray<nsRefPtr<TelephonyCall> > &calls = mCalls;
|
||||
if (mGroup->CallState() == nsITelephonyService::CALL_STATE_CONNECTED) {
|
||||
calls = mGroup->CallsArray();
|
||||
}
|
||||
for (uint32_t i = 0; i < calls.Length(); i++) {
|
||||
if (IsActiveState(calls[i]->CallState())) {
|
||||
return calls[i]->mServiceId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t serviceId = 0;
|
||||
mService->GetDefaultServiceId(&serviceId);
|
||||
return serviceId;
|
||||
}
|
||||
|
||||
bool
|
||||
@ -436,7 +447,7 @@ already_AddRefed<Promise>
|
||||
Telephony::Dial(const nsAString& aNumber, const Optional<uint32_t>& aServiceId,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
uint32_t serviceId = ProvidedOrDefaultServiceId(aServiceId);
|
||||
uint32_t serviceId = GetServiceId(aServiceId);
|
||||
nsRefPtr<Promise> promise = DialInternal(serviceId, aNumber, false, aRv);
|
||||
return promise.forget();
|
||||
}
|
||||
@ -446,7 +457,7 @@ Telephony::DialEmergency(const nsAString& aNumber,
|
||||
const Optional<uint32_t>& aServiceId,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
uint32_t serviceId = ProvidedOrDefaultServiceId(aServiceId);
|
||||
uint32_t serviceId = GetServiceId(aServiceId);
|
||||
nsRefPtr<Promise> promise = DialInternal(serviceId, aNumber, true, aRv);
|
||||
return promise.forget();
|
||||
}
|
||||
@ -458,7 +469,8 @@ Telephony::SendTones(const nsAString& aDTMFChars,
|
||||
const Optional<uint32_t>& aServiceId,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
uint32_t serviceId = ProvidedOrDefaultServiceId(aServiceId);
|
||||
uint32_t serviceId = GetServiceId(aServiceId,
|
||||
true /* aGetIfActiveCall */);
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(GetOwner());
|
||||
if (!global) {
|
||||
@ -495,7 +507,8 @@ Telephony::StartTone(const nsAString& aDTMFChar,
|
||||
const Optional<uint32_t>& aServiceId,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
uint32_t serviceId = ProvidedOrDefaultServiceId(aServiceId);
|
||||
uint32_t serviceId = GetServiceId(aServiceId,
|
||||
true /* aGetIfActiveCall */);
|
||||
|
||||
if (aDTMFChar.IsEmpty()) {
|
||||
NS_WARNING("Empty tone string will be ignored");
|
||||
@ -513,7 +526,8 @@ Telephony::StartTone(const nsAString& aDTMFChar,
|
||||
void
|
||||
Telephony::StopTone(const Optional<uint32_t>& aServiceId, ErrorResult& aRv)
|
||||
{
|
||||
uint32_t serviceId = ProvidedOrDefaultServiceId(aServiceId);
|
||||
uint32_t serviceId = GetServiceId(aServiceId,
|
||||
true /* aGetIfActiveCall */);
|
||||
|
||||
if (!IsValidServiceId(serviceId)) {
|
||||
aRv.Throw(NS_ERROR_INVALID_ARG);
|
||||
|
@ -174,7 +174,8 @@ private:
|
||||
IsActiveState(uint16_t aCallState);
|
||||
|
||||
uint32_t
|
||||
ProvidedOrDefaultServiceId(const Optional<uint32_t>& aServiceId);
|
||||
GetServiceId(const Optional<uint32_t>& aServiceId,
|
||||
bool aGetIfActiveCall = false);
|
||||
|
||||
bool
|
||||
HasDialingCall();
|
||||
|
@ -1085,6 +1085,11 @@ let emulator = (function() {
|
||||
});
|
||||
}
|
||||
|
||||
function sendTone(tone, pause, serviceId) {
|
||||
log("Send DTMF " + tone + " serviceId " + serviceId);
|
||||
return telephony.sendTones(tone, pause, null, serviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Config radio.
|
||||
*
|
||||
@ -1165,6 +1170,7 @@ let emulator = (function() {
|
||||
this.gRemoveCallInConference = removeCallInConference;
|
||||
this.gHangUpCallInConference = hangUpCallInConference;
|
||||
this.gHangUpConference = hangUpConference;
|
||||
this.gSendTone = sendTone;
|
||||
this.gSetupConference = setupConference;
|
||||
this.gSetRadioEnabled = setRadioEnabled;
|
||||
this.gSetRadioEnabledAll = setRadioEnabledAll;
|
||||
|
@ -20,6 +20,7 @@ qemu = true
|
||||
[test_dsds_connection_conflict.js]
|
||||
[test_dsds_default_service_id.js]
|
||||
[test_dsds_normal_call.js]
|
||||
[test_dtmf.js]
|
||||
[test_emergency.js]
|
||||
[test_emergency_label.js]
|
||||
[test_incall_mmi_call_hold.js]
|
||||
|
69
dom/telephony/test/marionette/test_dtmf.js
Normal file
69
dom/telephony/test/marionette/test_dtmf.js
Normal file
@ -0,0 +1,69 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = 'head.js';
|
||||
|
||||
function muxModem(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
emulator.runCmdWithCallback("mux modem " + id, resolve);
|
||||
});
|
||||
}
|
||||
|
||||
function testDtmfNoActiveCall() {
|
||||
log("= testDtmfNoActiveCall =");
|
||||
return new Promise((resolve, reject) => {
|
||||
gSendTone('1', 5, 0).then(() => {
|
||||
log("Unexpected success. We cannot send a DTMF without an active call");
|
||||
reject();
|
||||
}, resolve);
|
||||
});
|
||||
}
|
||||
|
||||
function testDtmfDsds() {
|
||||
log("= testDtmfDsds =");
|
||||
|
||||
let outCall;
|
||||
let number = "0912345000";
|
||||
let serviceId = 0;
|
||||
let otherServiceId = 1;
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => muxModem(serviceId))
|
||||
.then(() => gDial(number, serviceId))
|
||||
.then(call => {
|
||||
outCall = call;
|
||||
is(outCall.serviceId, serviceId);
|
||||
})
|
||||
.then(() => gRemoteAnswer(outCall))
|
||||
// Send tone with correct serviceId.
|
||||
.then(() => gSendTone('1', 5, serviceId))
|
||||
.then(() => emulator.runCmd("modem dtmf"))
|
||||
.then(tone => {
|
||||
is(tone, '1,OK', 'Sent tone is 1');
|
||||
})
|
||||
// Send tone without serviceId.
|
||||
.then(() => gSendTone('2', 5))
|
||||
.then(() => emulator.runCmd("modem dtmf"))
|
||||
.then(tone => {
|
||||
is(tone, '2,OK', 'Sent tone is 2');
|
||||
})
|
||||
// Send tone with incorrect serviceId.
|
||||
.then(gSendTone('1', 5, otherServiceId).catch((e) => {
|
||||
log('Expected Error ' + e);
|
||||
gRemoteHangUp(outCall);
|
||||
})
|
||||
)
|
||||
.catch((e) => {
|
||||
log('Unexpected Error ' + e);
|
||||
ok(false);
|
||||
});
|
||||
}
|
||||
|
||||
startDSDSTest(function() {
|
||||
testDtmfNoActiveCall()
|
||||
.then(testDtmfDsds)
|
||||
.then(emulator.runCmd("modem dtmf reset"))
|
||||
.catch(error => ok(false, "Promise reject: " + error))
|
||||
.then(finish);
|
||||
});
|
@ -13,6 +13,7 @@
|
||||
#include "nsIHttpChannelInternal.h"
|
||||
#include "nsIHttpHeaderVisitor.h"
|
||||
#include "nsINetworkInterceptController.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsScriptLoader.h"
|
||||
#include "nsDebug.h"
|
||||
@ -2819,6 +2820,130 @@ ServiceWorkerManager::RemoveRegistration(ServiceWorkerRegistrationInfo* aRegistr
|
||||
mActor->SendUnregisterServiceWorker(principalInfo, NS_ConvertUTF8toUTF16(reg->mScope));
|
||||
}
|
||||
|
||||
class ServiceWorkerDataInfo final : public nsIServiceWorkerInfo
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISERVICEWORKERINFO
|
||||
|
||||
static already_AddRefed<ServiceWorkerDataInfo>
|
||||
Create(const ServiceWorkerRegistrationData& aData);
|
||||
|
||||
private:
|
||||
ServiceWorkerDataInfo()
|
||||
{}
|
||||
|
||||
~ServiceWorkerDataInfo()
|
||||
{}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
nsString mScope;
|
||||
nsString mScriptSpec;
|
||||
nsString mCurrentWorkerURL;
|
||||
nsString mActiveCacheName;
|
||||
nsString mWaitingCacheName;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(ServiceWorkerDataInfo, nsIServiceWorkerInfo)
|
||||
|
||||
/* static */ already_AddRefed<ServiceWorkerDataInfo>
|
||||
ServiceWorkerDataInfo::Create(const ServiceWorkerRegistrationData& aData)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
nsRefPtr<ServiceWorkerDataInfo> info = new ServiceWorkerDataInfo();
|
||||
|
||||
info->mPrincipal = PrincipalInfoToPrincipal(aData.principal());
|
||||
if (!info->mPrincipal) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CopyUTF8toUTF16(aData.scope(), info->mScope);
|
||||
CopyUTF8toUTF16(aData.scriptSpec(), info->mScriptSpec);
|
||||
CopyUTF8toUTF16(aData.currentWorkerURL(), info->mCurrentWorkerURL);
|
||||
info->mActiveCacheName = aData.activeCacheName();
|
||||
info->mWaitingCacheName = aData.waitingCacheName();
|
||||
|
||||
return info.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetPrincipal(nsIPrincipal** aPrincipal)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
NS_ADDREF(*aPrincipal = mPrincipal);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetScope(nsAString& aScope)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
aScope = mScope;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetScriptSpec(nsAString& aScriptSpec)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
aScriptSpec = mScriptSpec;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetCurrentWorkerURL(nsAString& aCurrentWorkerURL)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
aCurrentWorkerURL = mCurrentWorkerURL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetActiveCacheName(nsAString& aActiveCacheName)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
aActiveCacheName = mActiveCacheName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerDataInfo::GetWaitingCacheName(nsAString& aWaitingCacheName)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
aWaitingCacheName = mWaitingCacheName;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ServiceWorkerManager::GetAllRegistrations(nsIArray** aResult)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
nsRefPtr<ServiceWorkerRegistrar> swr = ServiceWorkerRegistrar::Get();
|
||||
MOZ_ASSERT(swr);
|
||||
|
||||
nsTArray<ServiceWorkerRegistrationData> data;
|
||||
swr->GetRegistrations(data);
|
||||
|
||||
nsCOMPtr<nsIMutableArray> array(do_CreateInstance(NS_ARRAY_CONTRACTID));
|
||||
if (!array) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0, len = data.Length(); i < len; ++i) {
|
||||
nsCOMPtr<nsIServiceWorkerInfo> info = ServiceWorkerDataInfo::Create(data[i]);
|
||||
if (!info) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
array->AppendElement(info, false);
|
||||
}
|
||||
|
||||
array.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
ServiceWorkerInfo::AppendWorker(ServiceWorker* aWorker)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
var counter = 0;
|
||||
function handleRequest(request, response) {
|
||||
if (!counter) {
|
||||
if (!getState('counter')) {
|
||||
response.setHeader("Content-Type", "application/javascript", false);
|
||||
response.write("callByScript();");
|
||||
setState('counter', '1');
|
||||
} else {
|
||||
response.write("no cache no party!");
|
||||
}
|
||||
|
@ -77,13 +77,15 @@ Downscaler::BeginFrame(const nsIntSize& aOriginalSize,
|
||||
|
||||
auto resizeMethod = skia::ImageOperations::RESIZE_LANCZOS3;
|
||||
|
||||
skia::resize::ComputeFilters(resizeMethod, mOriginalSize.width,
|
||||
mTargetSize.width, 0,
|
||||
mTargetSize.width, mXFilter.get());
|
||||
skia::resize::ComputeFilters(resizeMethod,
|
||||
mOriginalSize.width, mTargetSize.width,
|
||||
0, mTargetSize.width,
|
||||
mXFilter.get());
|
||||
|
||||
skia::resize::ComputeFilters(resizeMethod, mOriginalSize.height,
|
||||
mTargetSize.height, 0,
|
||||
mTargetSize.height, mYFilter.get());
|
||||
skia::resize::ComputeFilters(resizeMethod,
|
||||
mOriginalSize.height, mTargetSize.height,
|
||||
0, mTargetSize.height,
|
||||
mYFilter.get());
|
||||
|
||||
// Allocate the buffer, which contains scanlines of the original image.
|
||||
mRowBuffer = MakeUnique<uint8_t[]>(mOriginalSize.width * sizeof(uint32_t));
|
||||
@ -126,6 +128,18 @@ Downscaler::ResetForNextProgressivePass()
|
||||
mLinesInBuffer = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
GetFilterOffsetAndLength(UniquePtr<skia::ConvolutionFilter1D>& aFilter,
|
||||
int32_t aOutputImagePosition,
|
||||
int32_t* aFilterOffsetOut,
|
||||
int32_t* aFilterLengthOut)
|
||||
{
|
||||
MOZ_ASSERT(aOutputImagePosition < aFilter->num_values());
|
||||
aFilter->FilterForValue(aOutputImagePosition,
|
||||
aFilterOffsetOut,
|
||||
aFilterLengthOut);
|
||||
}
|
||||
|
||||
void
|
||||
Downscaler::CommitRow()
|
||||
{
|
||||
@ -135,7 +149,8 @@ Downscaler::CommitRow()
|
||||
|
||||
int32_t filterOffset = 0;
|
||||
int32_t filterLength = 0;
|
||||
mYFilter->FilterForValue(mCurrentOutLine, &filterOffset, &filterLength);
|
||||
GetFilterOffsetAndLength(mYFilter, mCurrentOutLine,
|
||||
&filterOffset, &filterLength);
|
||||
|
||||
int32_t inLineToRead = filterOffset + mLinesInBuffer;
|
||||
MOZ_ASSERT(mCurrentInLine <= inLineToRead, "Reading past end of input");
|
||||
@ -145,10 +160,18 @@ Downscaler::CommitRow()
|
||||
/* use_sse2 = */ true);
|
||||
}
|
||||
|
||||
while (mLinesInBuffer == filterLength &&
|
||||
mCurrentOutLine < mTargetSize.height) {
|
||||
MOZ_ASSERT(mCurrentOutLine < mTargetSize.height,
|
||||
"Writing past end of output");
|
||||
|
||||
while (mLinesInBuffer == filterLength) {
|
||||
DownscaleInputLine();
|
||||
mYFilter->FilterForValue(mCurrentOutLine, &filterOffset, &filterLength);
|
||||
|
||||
if (mCurrentOutLine == mTargetSize.height) {
|
||||
break; // We're done.
|
||||
}
|
||||
|
||||
GetFilterOffsetAndLength(mYFilter, mCurrentOutLine,
|
||||
&filterOffset, &filterLength);
|
||||
}
|
||||
|
||||
mCurrentInLine += 1;
|
||||
@ -184,6 +207,7 @@ Downscaler::DownscaleInputLine()
|
||||
|
||||
int32_t filterOffset = 0;
|
||||
int32_t filterLength = 0;
|
||||
MOZ_ASSERT(mCurrentOutLine < mYFilter->num_values());
|
||||
auto filterValues =
|
||||
mYFilter->FilterForValue(mCurrentOutLine, &filterOffset, &filterLength);
|
||||
|
||||
@ -202,7 +226,8 @@ Downscaler::DownscaleInputLine()
|
||||
|
||||
int32_t newFilterOffset = 0;
|
||||
int32_t newFilterLength = 0;
|
||||
mYFilter->FilterForValue(mCurrentOutLine, &newFilterOffset, &newFilterLength);
|
||||
GetFilterOffsetAndLength(mYFilter, mCurrentOutLine,
|
||||
&newFilterOffset, &newFilterLength);
|
||||
|
||||
int diff = newFilterOffset - filterOffset;
|
||||
MOZ_ASSERT(diff >= 0, "Moving backwards in the filter?");
|
||||
|
@ -523,15 +523,26 @@ BytecodeEmitter::checkTypeSet(JSOp op)
|
||||
}
|
||||
|
||||
bool
|
||||
BytecodeEmitter::emitUint16Operand(JSOp op, uint32_t i)
|
||||
BytecodeEmitter::emitUint16Operand(JSOp op, uint32_t operand)
|
||||
{
|
||||
MOZ_ASSERT(i <= UINT16_MAX);
|
||||
if (!emit3(op, UINT16_HI(i), UINT16_LO(i)))
|
||||
MOZ_ASSERT(operand <= UINT16_MAX);
|
||||
if (!emit3(op, UINT16_HI(operand), UINT16_LO(operand)))
|
||||
return false;
|
||||
checkTypeSet(op);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BytecodeEmitter::emitUint32Operand(JSOp op, uint32_t operand)
|
||||
{
|
||||
ptrdiff_t off;
|
||||
if (!emitN(op, 4, &off))
|
||||
return false;
|
||||
SET_UINT32(code(off), operand);
|
||||
checkTypeSet(op);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
BytecodeEmitter::flushPops(int* npops)
|
||||
{
|
||||
@ -6426,7 +6437,7 @@ BytecodeEmitter::emitCallOrNew(ParseNode* pn)
|
||||
pn->isOp(JSOP_STRICTSPREADEVAL))
|
||||
{
|
||||
uint32_t lineNum = parser->tokenStream.srcCoords.lineNum(pn->pn_pos.begin);
|
||||
if (!emitUint16Operand(JSOP_LINENO, lineNum))
|
||||
if (!emitUint32Operand(JSOP_LINENO, lineNum))
|
||||
return false;
|
||||
}
|
||||
if (pn->pn_xflags & PNX_SETCALL) {
|
||||
|
@ -397,7 +397,10 @@ struct BytecodeEmitter
|
||||
|
||||
// Emit a bytecode followed by an uint16 immediate operand stored in
|
||||
// big-endian order.
|
||||
bool emitUint16Operand(JSOp op, uint32_t i);
|
||||
bool emitUint16Operand(JSOp op, uint32_t operand);
|
||||
|
||||
// Emit a bytecode followed by an uint32 immediate operand.
|
||||
bool emitUint32Operand(JSOp op, uint32_t operand);
|
||||
|
||||
// Emit (1 + extra) bytecodes, for N bytes of op and its immediate operand.
|
||||
bool emitN(JSOp op, size_t extra, ptrdiff_t* offset = nullptr);
|
||||
|
@ -7710,7 +7710,7 @@ Parser<ParseHandler>::memberExpr(TokenKind tt, bool allowCallSyntax, InvokedPred
|
||||
JS_CHECK_RECURSION(context, return null());
|
||||
|
||||
bool isSuper = false;
|
||||
uint32_t superBegin;
|
||||
uint32_t superBegin = pos().begin;
|
||||
|
||||
/* Check for new expression first. */
|
||||
if (tt == TOK_NEW) {
|
||||
@ -7739,7 +7739,6 @@ Parser<ParseHandler>::memberExpr(TokenKind tt, bool allowCallSyntax, InvokedPred
|
||||
} else if (tt == TOK_SUPER) {
|
||||
lhs = null();
|
||||
isSuper = true;
|
||||
superBegin = pos().begin;
|
||||
} else {
|
||||
lhs = primaryExpr(tt, invoked);
|
||||
if (!lhs)
|
||||
|
25
js/src/jit-test/tests/basic/bug1147216.js
Normal file
25
js/src/jit-test/tests/basic/bug1147216.js
Normal file
@ -0,0 +1,25 @@
|
||||
// Ensure JSOP_LINENO (emitted after JSOP_EVAL) handles big line
|
||||
// numbers correctly.
|
||||
function getsource() {
|
||||
var s = "";
|
||||
for (var i=0; i<66002; i++) {
|
||||
s += "\n";
|
||||
if (i === 66000)
|
||||
s += "eval('stack = Error().stack');";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
function test() {
|
||||
var stack;
|
||||
eval(getsource());
|
||||
assertEq(stack.indexOf("line 66002") > 0, true);
|
||||
}
|
||||
test();
|
||||
|
||||
function testStrict() {
|
||||
"use strict";
|
||||
var stack;
|
||||
eval(getsource());
|
||||
assertEq(stack.indexOf("line 66002") > 0, true);
|
||||
}
|
||||
testStrict();
|
16
js/src/jit-test/tests/generators/bug1151326.js
Normal file
16
js/src/jit-test/tests/generators/bug1151326.js
Normal file
@ -0,0 +1,16 @@
|
||||
// |jit-test| error: closing generator
|
||||
var finally3;
|
||||
function gen() {
|
||||
try {
|
||||
try {
|
||||
yield 1;
|
||||
} finally {
|
||||
finally3();
|
||||
}
|
||||
} catch (e) {
|
||||
yield finally3 === parseInt;
|
||||
}
|
||||
}
|
||||
iter = gen();
|
||||
iter.next();
|
||||
iter.close();
|
@ -3485,23 +3485,11 @@ BaselineCompiler::emit_JSOP_YIELD()
|
||||
|
||||
MOZ_ASSERT(frame.stackDepth() >= 1);
|
||||
|
||||
if (frame.stackDepth() == 1) {
|
||||
// If the expression stack is empty, we can inline the YIELD. For legacy
|
||||
// generators we normally check if we're in the closing state and throw
|
||||
// an exception, but we don't have to do anything here as the expression
|
||||
// stack is never empty in finally blocks. In debug builds, we assert
|
||||
// we're not in the closing state.
|
||||
#ifdef DEBUG
|
||||
if (script->isLegacyGenerator()) {
|
||||
Label ok;
|
||||
masm.unboxInt32(Address(genObj, GeneratorObject::offsetOfYieldIndexSlot()),
|
||||
R0.scratchReg());
|
||||
masm.branch32(Assembler::NotEqual, R0.scratchReg(),
|
||||
Imm32(GeneratorObject::YIELD_INDEX_CLOSING), &ok);
|
||||
masm.assumeUnreachable("Inline yield with closing generator");
|
||||
masm.bind(&ok);
|
||||
}
|
||||
#endif
|
||||
if (frame.stackDepth() == 1 && !script->isLegacyGenerator()) {
|
||||
// If the expression stack is empty, we can inline the YIELD. Don't do
|
||||
// this for legacy generators: we have to throw an exception if the
|
||||
// generator is in the closing state, see GeneratorObject::suspend.
|
||||
|
||||
masm.storeValue(Int32Value(GET_UINT24(pc)),
|
||||
Address(genObj, GeneratorObject::offsetOfYieldIndexSlot()));
|
||||
|
||||
|
@ -1041,6 +1041,10 @@ js::Disassemble1(JSContext* cx, HandleScript script, jsbytecode* pc,
|
||||
Sprint(sp, " %u", GET_LOCALNO(pc));
|
||||
break;
|
||||
|
||||
case JOF_UINT32:
|
||||
Sprint(sp, " %u", GET_UINT32(pc));
|
||||
break;
|
||||
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -48,8 +48,8 @@ enum {
|
||||
JOF_UINT8 = 13, /* uint8_t immediate, e.g. top 8 bits of 24-bit
|
||||
atom index */
|
||||
JOF_INT32 = 14, /* int32_t immediate operand */
|
||||
JOF_OBJECT = 15, /* unsigned 16-bit object index */
|
||||
/* 16 is unused */
|
||||
JOF_UINT32 = 15, /* uint32_t immediate operand */
|
||||
JOF_OBJECT = 16, /* unsigned 16-bit object index */
|
||||
JOF_REGEXP = 17, /* unsigned 32-bit regexp index */
|
||||
JOF_INT8 = 18, /* int8_t immediate operand */
|
||||
JOF_ATOMOBJECT = 19, /* uint16_t constant index + object index */
|
||||
@ -222,8 +222,8 @@ GET_INT8(const jsbytecode* pc)
|
||||
return int8_t(pc[1]);
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE int32_t
|
||||
GET_INT32(const jsbytecode* pc)
|
||||
static MOZ_ALWAYS_INLINE uint32_t
|
||||
GET_UINT32(const jsbytecode* pc)
|
||||
{
|
||||
return (uint32_t(pc[1]) << 24) |
|
||||
(uint32_t(pc[2]) << 16) |
|
||||
@ -232,12 +232,24 @@ GET_INT32(const jsbytecode* pc)
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE void
|
||||
SET_INT32(jsbytecode* pc, uint32_t i)
|
||||
SET_UINT32(jsbytecode* pc, uint32_t u)
|
||||
{
|
||||
pc[1] = jsbytecode(uint32_t(i) >> 24);
|
||||
pc[2] = jsbytecode(uint32_t(i) >> 16);
|
||||
pc[3] = jsbytecode(uint32_t(i) >> 8);
|
||||
pc[4] = jsbytecode(uint32_t(i));
|
||||
pc[1] = jsbytecode(u >> 24);
|
||||
pc[2] = jsbytecode(u >> 16);
|
||||
pc[3] = jsbytecode(u >> 8);
|
||||
pc[4] = jsbytecode(u);
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE int32_t
|
||||
GET_INT32(const jsbytecode* pc)
|
||||
{
|
||||
return static_cast<int32_t>(GET_UINT32(pc));
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE void
|
||||
SET_INT32(jsbytecode* pc, int32_t i)
|
||||
{
|
||||
SET_UINT32(pc, static_cast<uint32_t>(i));
|
||||
}
|
||||
|
||||
/* Index limit is determined by SN_4BYTE_OFFSET_FLAG, see frontend/BytecodeEmitter.h. */
|
||||
|
@ -2924,12 +2924,13 @@ js::DescribeScriptedCallerForCompilation(JSContext* cx, MutableHandleScript mayb
|
||||
"next op after a direct eval must be at consistent offset");
|
||||
MOZ_ASSERT(JSOp(*pc) == JSOP_EVAL || JSOp(*pc) == JSOP_STRICTEVAL ||
|
||||
JSOp(*pc) == JSOP_SPREADEVAL || JSOp(*pc) == JSOP_STRICTSPREADEVAL);
|
||||
mozilla::DebugOnly<bool> isSpread = JSOp(*pc) == JSOP_SPREADEVAL ||
|
||||
JSOp(*pc) == JSOP_STRICTSPREADEVAL;
|
||||
MOZ_ASSERT(*(pc + (isSpread ? JSOP_SPREADEVAL_LENGTH : JSOP_EVAL_LENGTH)) == JSOP_LINENO);
|
||||
|
||||
bool isSpread = JSOp(*pc) == JSOP_SPREADEVAL || JSOp(*pc) == JSOP_STRICTSPREADEVAL;
|
||||
jsbytecode* nextpc = pc + (isSpread ? JSOP_SPREADEVAL_LENGTH : JSOP_EVAL_LENGTH);
|
||||
MOZ_ASSERT(*nextpc == JSOP_LINENO);
|
||||
|
||||
*file = maybeScript->filename();
|
||||
*linenop = GET_UINT16(pc + (JSOp(*pc) == JSOP_EVAL ? JSOP_EVAL_LENGTH
|
||||
: JSOP_SPREADEVAL_LENGTH));
|
||||
*linenop = GET_UINT32(nextpc);
|
||||
*pcOffset = pc - maybeScript->code();
|
||||
*mutedErrors = maybeScript->mutedErrors();
|
||||
return;
|
||||
|
@ -1166,7 +1166,7 @@
|
||||
* Operands: uint32_t lineno
|
||||
* Stack: =>
|
||||
*/ \
|
||||
macro(JSOP_LINENO, 119,"lineno", NULL, 3, 0, 0, JOF_UINT16) \
|
||||
macro(JSOP_LINENO, 119,"lineno", NULL, 5, 0, 0, JOF_UINT32) \
|
||||
\
|
||||
/*
|
||||
* This no-op appears after the bytecode for EXPR in 'switch (EXPR) {...}'
|
||||
|
@ -29,7 +29,7 @@ namespace js {
|
||||
*
|
||||
* https://developer.mozilla.org/en-US/docs/SpiderMonkey/Internals/Bytecode
|
||||
*/
|
||||
static const uint32_t XDR_BYTECODE_VERSION_SUBTRAHEND = 275;
|
||||
static const uint32_t XDR_BYTECODE_VERSION_SUBTRAHEND = 276;
|
||||
static const uint32_t XDR_BYTECODE_VERSION =
|
||||
uint32_t(0xb973c0de - XDR_BYTECODE_VERSION_SUBTRAHEND);
|
||||
|
||||
|
@ -110,13 +110,11 @@ IsPermitted(CrossOriginObjectType type, JSFlatString* prop, bool set)
|
||||
}
|
||||
|
||||
static bool
|
||||
IsFrameId(JSContext* cx, JSObject* objArg, jsid idArg)
|
||||
IsFrameId(JSContext* cx, JSObject* obj, jsid idArg)
|
||||
{
|
||||
RootedObject obj(cx, objArg);
|
||||
MOZ_ASSERT(!js::IsWrapper(obj));
|
||||
RootedId id(cx, idArg);
|
||||
|
||||
obj = JS_ObjectToInnerObject(cx, obj);
|
||||
MOZ_ASSERT(!js::IsWrapper(obj));
|
||||
nsGlobalWindow* win = WindowOrNull(obj);
|
||||
if (!win) {
|
||||
return false;
|
||||
@ -174,8 +172,7 @@ AccessCheck::isCrossOriginAccessPermitted(JSContext* cx, HandleObject wrapper, H
|
||||
isCrossOriginAccessPermitted(cx, wrapper, id, Wrapper::SET);
|
||||
}
|
||||
|
||||
RootedObject obj(cx, Wrapper::wrappedObject(wrapper));
|
||||
|
||||
RootedObject obj(cx, js::UncheckedUnwrap(wrapper, /* stopAtOuter = */ false));
|
||||
CrossOriginObjectType type = IdentifyCrossOriginObject(obj);
|
||||
if (JSID_IS_STRING(id)) {
|
||||
if (IsPermitted(type, JSID_TO_FLAT_STRING(id), act == Wrapper::SET))
|
||||
|
@ -1009,7 +1009,7 @@ public:
|
||||
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
||||
void DropReference(void);
|
||||
virtual css::Declaration* GetCSSDeclaration(bool aAllocate) override;
|
||||
virtual css::Declaration* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual nsresult SetCSSDeclaration(css::Declaration* aDecl) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
@ -1114,7 +1114,7 @@ DOMCSSDeclarationImpl::DropReference(void)
|
||||
}
|
||||
|
||||
css::Declaration*
|
||||
DOMCSSDeclarationImpl::GetCSSDeclaration(bool aAllocate)
|
||||
DOMCSSDeclarationImpl::GetCSSDeclaration(Operation aOperation)
|
||||
{
|
||||
if (mRule) {
|
||||
return mRule->GetDeclaration();
|
||||
|
@ -1608,13 +1608,6 @@ CSSParserImpl::ParseRule(const nsAString& aRule,
|
||||
return rv;
|
||||
}
|
||||
|
||||
// See Bug 723197
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize( "", off )
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4748 )
|
||||
#endif
|
||||
|
||||
void
|
||||
CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,
|
||||
const nsAString& aPropValue,
|
||||
@ -1750,11 +1743,6 @@ CSSParserImpl::ParseVariable(const nsAString& aVariableName,
|
||||
ReleaseScanner();
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( pop )
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
void
|
||||
CSSParserImpl::ParseMediaList(const nsSubstring& aBuffer,
|
||||
nsIURI* aURI, // for error reporting
|
||||
|
@ -2103,7 +2103,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCSSKeyframeStyleDeclaration)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration)
|
||||
|
||||
css::Declaration*
|
||||
nsCSSKeyframeStyleDeclaration::GetCSSDeclaration(bool aAllocate)
|
||||
nsCSSKeyframeStyleDeclaration::GetCSSDeclaration(Operation aOperation)
|
||||
{
|
||||
if (mRule) {
|
||||
return mRule->Declaration();
|
||||
@ -2664,7 +2664,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsCSSPageStyleDeclaration)
|
||||
NS_INTERFACE_MAP_END_INHERITING(nsDOMCSSDeclaration)
|
||||
|
||||
css::Declaration*
|
||||
nsCSSPageStyleDeclaration::GetCSSDeclaration(bool aAllocate)
|
||||
nsCSSPageStyleDeclaration::GetCSSDeclaration(Operation aOperation)
|
||||
{
|
||||
if (mRule) {
|
||||
return mRule->Declaration();
|
||||
|
@ -408,7 +408,7 @@ public:
|
||||
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
||||
void DropReference() { mRule = nullptr; }
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) override;
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
@ -541,7 +541,7 @@ public:
|
||||
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
||||
void DropReference() { mRule = nullptr; }
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) override;
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
|
@ -543,7 +543,7 @@ nsComputedDOMStyle::GetPresShellForContent(nsIContent* aContent)
|
||||
// on a nsComputedDOMStyle object, but must be defined to avoid
|
||||
// compile errors.
|
||||
css::Declaration*
|
||||
nsComputedDOMStyle::GetCSSDeclaration(bool)
|
||||
nsComputedDOMStyle::GetCSSDeclaration(Operation)
|
||||
{
|
||||
NS_RUNTIMEABORT("called nsComputedDOMStyle::GetCSSDeclaration");
|
||||
return nullptr;
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
// nsDOMCSSDeclaration abstract methods which should never be called
|
||||
// on a nsComputedDOMStyle object, but must be defined to avoid
|
||||
// compile errors.
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(bool) override;
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation) override;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration*) override;
|
||||
virtual nsIDocument* DocToUpdate() override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
||||
|
@ -91,23 +91,13 @@ nsDOMCSSAttributeDeclaration::SetCSSDeclaration(css::Declaration* aDecl)
|
||||
nsIDocument*
|
||||
nsDOMCSSAttributeDeclaration::DocToUpdate()
|
||||
{
|
||||
// XXXbz this is a bit of a hack, especially doing it before the
|
||||
// BeginUpdate(), but this is a good chokepoint where we know we
|
||||
// plan to modify the CSSDeclaration, so need to notify
|
||||
// AttributeWillChange if this is inline style.
|
||||
if (!mIsSMILOverride) {
|
||||
nsNodeUtils::AttributeWillChange(mElement, kNameSpaceID_None,
|
||||
nsGkAtoms::style,
|
||||
nsIDOMMutationEvent::MODIFICATION);
|
||||
}
|
||||
|
||||
// We need OwnerDoc() rather than GetCurrentDoc() because it might
|
||||
// be the BeginUpdate call that inserts mElement into the document.
|
||||
return mElement->OwnerDoc();
|
||||
}
|
||||
|
||||
css::Declaration*
|
||||
nsDOMCSSAttributeDeclaration::GetCSSDeclaration(bool aAllocate)
|
||||
nsDOMCSSAttributeDeclaration::GetCSSDeclaration(Operation aOperation)
|
||||
{
|
||||
if (!mElement)
|
||||
return nullptr;
|
||||
@ -118,10 +108,31 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(bool aAllocate)
|
||||
else
|
||||
cssRule = mElement->GetInlineStyleRule();
|
||||
|
||||
// Notify observers that our style="" attribute is going to change
|
||||
// unless:
|
||||
// * this is a declaration that holds SMIL animation values (which
|
||||
// aren't reflected in the DOM style="" attribute), or
|
||||
// * we're getting the declaration for reading, or
|
||||
// * we're getting it for property removal but we don't currently have
|
||||
// a declaration.
|
||||
|
||||
// XXXbz this is a bit of a hack, especially doing it before the
|
||||
// BeginUpdate(), but this is a good chokepoint where we know we
|
||||
// plan to modify the CSSDeclaration, so need to notify
|
||||
// AttributeWillChange if this is inline style.
|
||||
if (!mIsSMILOverride &&
|
||||
((aOperation == eOperation_Modify) ||
|
||||
(aOperation == eOperation_RemoveProperty && cssRule))) {
|
||||
nsNodeUtils::AttributeWillChange(mElement, kNameSpaceID_None,
|
||||
nsGkAtoms::style,
|
||||
nsIDOMMutationEvent::MODIFICATION);
|
||||
}
|
||||
|
||||
if (cssRule) {
|
||||
return cssRule->GetDeclaration();
|
||||
}
|
||||
if (!aAllocate) {
|
||||
|
||||
if (aOperation != eOperation_Modify) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
|
||||
// If GetCSSDeclaration returns non-null, then the decl it returns
|
||||
// is owned by our current style rule.
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) override;
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation aOperation) override;
|
||||
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
||||
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
||||
|
||||
|
@ -45,7 +45,7 @@ nsDOMCSSDeclaration::GetPropertyValue(const nsCSSProperty aPropID,
|
||||
NS_PRECONDITION(aPropID != eCSSProperty_UNKNOWN,
|
||||
"Should never pass eCSSProperty_UNKNOWN around");
|
||||
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
|
||||
aValue.Truncate();
|
||||
if (decl) {
|
||||
@ -61,7 +61,7 @@ nsDOMCSSDeclaration::GetCustomPropertyValue(const nsAString& aPropertyName,
|
||||
MOZ_ASSERT(Substring(aPropertyName, 0,
|
||||
CSS_CUSTOM_NAME_PREFIX_LENGTH).EqualsLiteral("--"));
|
||||
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
if (!decl) {
|
||||
aValue.Truncate();
|
||||
return;
|
||||
@ -89,7 +89,7 @@ nsDOMCSSDeclaration::SetPropertyValue(const nsCSSProperty aPropID,
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSDeclaration::GetCssText(nsAString& aCssText)
|
||||
{
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
aCssText.Truncate();
|
||||
|
||||
if (decl) {
|
||||
@ -104,7 +104,7 @@ nsDOMCSSDeclaration::SetCssText(const nsAString& aCssText)
|
||||
{
|
||||
// We don't need to *do* anything with the old declaration, but we need
|
||||
// to ensure that it exists, or else SetCSSDeclaration may crash.
|
||||
css::Declaration* olddecl = GetCSSDeclaration(true);
|
||||
css::Declaration* olddecl = GetCSSDeclaration(eOperation_Modify);
|
||||
if (!olddecl) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -139,7 +139,7 @@ nsDOMCSSDeclaration::SetCssText(const nsAString& aCssText)
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSDeclaration::GetLength(uint32_t* aLength)
|
||||
{
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
|
||||
if (decl) {
|
||||
*aLength = decl->Count();
|
||||
@ -161,7 +161,7 @@ nsDOMCSSDeclaration::GetPropertyCSSValue(const nsAString& aPropertyName, ErrorRe
|
||||
void
|
||||
nsDOMCSSDeclaration::IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aPropName)
|
||||
{
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
aFound = decl && decl->GetNthProperty(aIndex, aPropName);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ nsDOMCSSDeclaration::GetAuthoredPropertyValue(const nsAString& aPropertyName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
if (!decl) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -215,7 +215,7 @@ NS_IMETHODIMP
|
||||
nsDOMCSSDeclaration::GetPropertyPriority(const nsAString& aPropertyName,
|
||||
nsAString& aReturn)
|
||||
{
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_Read);
|
||||
|
||||
aReturn.Truncate();
|
||||
if (decl && decl->GetValueIsImportant(aPropertyName)) {
|
||||
@ -310,7 +310,7 @@ nsDOMCSSDeclaration::ParsePropertyValue(const nsCSSProperty aPropID,
|
||||
const nsAString& aPropValue,
|
||||
bool aIsImportant)
|
||||
{
|
||||
css::Declaration* olddecl = GetCSSDeclaration(true);
|
||||
css::Declaration* olddecl = GetCSSDeclaration(eOperation_Modify);
|
||||
if (!olddecl) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -351,7 +351,7 @@ nsDOMCSSDeclaration::ParseCustomPropertyValue(const nsAString& aPropertyName,
|
||||
{
|
||||
MOZ_ASSERT(nsCSSProps::IsCustomPropertyName(aPropertyName));
|
||||
|
||||
css::Declaration* olddecl = GetCSSDeclaration(true);
|
||||
css::Declaration* olddecl = GetCSSDeclaration(eOperation_Modify);
|
||||
if (!olddecl) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@ -391,7 +391,7 @@ nsDOMCSSDeclaration::ParseCustomPropertyValue(const nsAString& aPropertyName,
|
||||
nsresult
|
||||
nsDOMCSSDeclaration::RemoveProperty(const nsCSSProperty aPropID)
|
||||
{
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_RemoveProperty);
|
||||
if (!decl) {
|
||||
return NS_OK; // no decl, so nothing to remove
|
||||
}
|
||||
@ -414,7 +414,7 @@ nsDOMCSSDeclaration::RemoveCustomProperty(const nsAString& aPropertyName)
|
||||
MOZ_ASSERT(Substring(aPropertyName, 0,
|
||||
CSS_CUSTOM_NAME_PREFIX_LENGTH).EqualsLiteral("--"));
|
||||
|
||||
css::Declaration* decl = GetCSSDeclaration(false);
|
||||
css::Declaration* decl = GetCSSDeclaration(eOperation_RemoveProperty);
|
||||
if (!decl) {
|
||||
return NS_OK; // no decl, so nothing to remove
|
||||
}
|
||||
|
@ -100,10 +100,26 @@ public:
|
||||
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
protected:
|
||||
// This method can return null regardless of the value of aAllocate;
|
||||
// however, a null return should only be considered a failure
|
||||
// if aAllocate is true.
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate) = 0;
|
||||
// The reason for calling GetCSSDeclaration.
|
||||
enum Operation {
|
||||
// We are calling GetCSSDeclaration so that we can read from it. Does not
|
||||
// allocate a new declaration if we don't have one yet; returns nullptr in
|
||||
// this case.
|
||||
eOperation_Read,
|
||||
|
||||
// We are calling GetCSSDeclaration so that we can set a property on it
|
||||
// or re-parse the whole declaration. Allocates a new declaration if we
|
||||
// don't have one yet and calls AttributeWillChange. A nullptr return value
|
||||
// indicates an error allocating the declaration.
|
||||
eOperation_Modify,
|
||||
|
||||
// We are calling GetCSSDeclaration so that we can remove a property from
|
||||
// it. Does not allocates a new declaration if we don't have one yet;
|
||||
// returns nullptr in this case. If we do have a declaration, calls
|
||||
// AttributeWillChange.
|
||||
eOperation_RemoveProperty
|
||||
};
|
||||
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation aOperation) = 0;
|
||||
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) = 0;
|
||||
// Document that we must call BeginUpdate/EndUpdate on around the
|
||||
// calls to SetCSSDeclaration and the style rule mutation that leads
|
||||
|
@ -3982,6 +3982,9 @@ pref("layers.bench.enabled", false);
|
||||
#ifdef ANDROID
|
||||
// bug 838603 -- on Android, accidentally blacklisting OpenGL layers
|
||||
// means a startup crash for everyone.
|
||||
// Temporarily force-enable GL compositing. This is default-disabled
|
||||
// deep within the bowels of the widgetry system. Remove me when GL
|
||||
// compositing isn't default disabled in widget/android.
|
||||
pref("layers.acceleration.force-enabled", true);
|
||||
#else
|
||||
pref("layers.acceleration.force-enabled", false);
|
||||
|
@ -1,7 +1,7 @@
|
||||
[DEFAULT]
|
||||
head = head_channels.js head_cache.js head_cache2.js
|
||||
tail =
|
||||
skip-if = buildapp == 'b2g'
|
||||
skip-if = toolkit == 'gonk'
|
||||
support-files =
|
||||
data/image.png
|
||||
data/system_root.lnk
|
||||
|
@ -127,6 +127,6 @@ ENV LOGNAME worker
|
||||
|
||||
# Declare default working folder
|
||||
WORKDIR /home/worker
|
||||
|
||||
|
||||
# Set a default command useful for debugging
|
||||
CMD ["/bin/bash", "--login"]
|
||||
|
@ -1 +1 @@
|
||||
0.2.10
|
||||
0.2.14
|
||||
|
2
testing/docker/tester/dot-config/pip/pip.conf
Normal file
2
testing/docker/tester/dot-config/pip/pip.conf
Normal file
@ -0,0 +1,2 @@
|
||||
[global]
|
||||
disable-pip-version-check = true
|
@ -488,6 +488,17 @@ class MochitestRunner(MozbuildObject):
|
||||
|
||||
return result
|
||||
|
||||
def run_android_test(self, args):
|
||||
self.tests_dir = os.path.join(self.topobjdir, '_tests')
|
||||
self.mochitest_dir = os.path.join(self.tests_dir, 'testing', 'mochitest')
|
||||
import imp
|
||||
path = os.path.join(self.mochitest_dir, 'runtestsremote.py')
|
||||
with open(path, 'r') as fh:
|
||||
imp.load_module('runtestsremote', fh, path,
|
||||
('.py', 'r', imp.PY_SOURCE))
|
||||
import runtestsremote
|
||||
|
||||
sys.exit(runtestsremote.main(args))
|
||||
|
||||
def add_mochitest_general_args(parser):
|
||||
parser.add_argument(
|
||||
@ -784,6 +795,19 @@ def is_platform_in(*platforms):
|
||||
' or '.join(platforms))
|
||||
return is_platform_supported
|
||||
|
||||
def verify_host_bin():
|
||||
# validate MOZ_HOST_BIN environment variables for Android tests
|
||||
MOZ_HOST_BIN = os.environ.get('MOZ_HOST_BIN')
|
||||
if not MOZ_HOST_BIN:
|
||||
print('environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell')
|
||||
return 1
|
||||
elif not os.path.isdir(MOZ_HOST_BIN):
|
||||
print('$MOZ_HOST_BIN does not specify a directory')
|
||||
return 1
|
||||
elif not os.path.isfile(os.path.join(MOZ_HOST_BIN, 'xpcshell')):
|
||||
print('$MOZ_HOST_BIN/xpcshell does not exist')
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@CommandProvider
|
||||
class MachCommands(MachCommandBase):
|
||||
@ -797,7 +821,7 @@ class MachCommands(MachCommandBase):
|
||||
@Command(
|
||||
'mochitest-plain',
|
||||
category='testing',
|
||||
conditions=[is_platform_in('firefox', 'mulet', 'b2g', 'b2g_desktop')],
|
||||
conditions=[is_platform_in('firefox', 'mulet', 'b2g', 'b2g_desktop', 'android')],
|
||||
description='Run a plain mochitest (integration test, plain web page).',
|
||||
parser=_st_parser)
|
||||
def run_mochitest_plain(self, test_paths, **kwargs):
|
||||
@ -807,11 +831,13 @@ class MachCommands(MachCommandBase):
|
||||
return self.run_mochitest_remote(test_paths, **kwargs)
|
||||
elif conditions.is_b2g_desktop(self):
|
||||
return self.run_b2g_desktop(test_paths, **kwargs)
|
||||
elif conditions.is_android(self):
|
||||
return self.run_mochitest_android(test_paths, **kwargs)
|
||||
|
||||
@Command(
|
||||
'mochitest-chrome',
|
||||
category='testing',
|
||||
conditions=[is_platform_in('firefox', 'emulator')],
|
||||
conditions=[is_platform_in('firefox', 'emulator', 'android')],
|
||||
description='Run a chrome mochitest (integration test with some XUL).',
|
||||
parser=_st_parser)
|
||||
def run_mochitest_chrome(self, test_paths, **kwargs):
|
||||
@ -819,6 +845,8 @@ class MachCommands(MachCommandBase):
|
||||
return self.run_mochitest(test_paths, 'chrome', **kwargs)
|
||||
elif conditions.is_b2g(self) and conditions.is_emulator(self):
|
||||
return self.run_mochitest_remote(test_paths, chrome=True, **kwargs)
|
||||
elif conditions.is_android(self):
|
||||
return self.run_mochitest_android(test_paths, chrome=True, **kwargs)
|
||||
|
||||
@Command(
|
||||
'mochitest-browser',
|
||||
@ -1017,6 +1045,32 @@ class MachCommands(MachCommandBase):
|
||||
mochitest = self._spawn(MochitestRunner)
|
||||
return mochitest.run_b2g_test(test_paths=test_paths, **kwargs)
|
||||
|
||||
def run_mochitest_android(self, test_paths, chrome=False, **kwargs):
|
||||
host_ret = verify_host_bin()
|
||||
if host_ret != 0:
|
||||
return host_ret
|
||||
|
||||
args = [
|
||||
'--xre-path=' + os.environ.get('MOZ_HOST_BIN'),
|
||||
'--dm_trans=adb',
|
||||
'--deviceIP=',
|
||||
'--console-level=INFO',
|
||||
'--app=' + self.substs['ANDROID_PACKAGE_NAME'],
|
||||
'--log-mach=-',
|
||||
'--autorun',
|
||||
'--close-when-done',
|
||||
'--testing-modules-dir=' + os.path.join(self.topobjdir, '_tests', 'modules'),
|
||||
]
|
||||
if test_paths:
|
||||
if len(test_paths) > 1:
|
||||
print('Warning: Only the first test path will be used.')
|
||||
test_path = self._wrap_path_argument(test_paths[0]).relpath()
|
||||
args.append('--test-path=%s' % test_path)
|
||||
if chrome:
|
||||
args.append('--chrome')
|
||||
|
||||
mochitest = self._spawn(MochitestRunner)
|
||||
return mochitest.run_android_test(args)
|
||||
|
||||
@CommandProvider
|
||||
class AndroidCommands(MachCommandBase):
|
||||
@ -1032,31 +1086,12 @@ class AndroidCommands(MachCommandBase):
|
||||
help='Test to run. Can be specified as a Robocop test name (like "testLoad"), '
|
||||
'or omitted. If omitted, the entire test suite is executed.')
|
||||
def run_robocop(self, test_path):
|
||||
self.tests_dir = os.path.join(self.topobjdir, '_tests')
|
||||
self.mochitest_dir = os.path.join(
|
||||
self.tests_dir,
|
||||
'testing',
|
||||
'mochitest')
|
||||
import imp
|
||||
path = os.path.join(self.mochitest_dir, 'runtestsremote.py')
|
||||
with open(path, 'r') as fh:
|
||||
imp.load_module('runtestsremote', fh, path,
|
||||
('.py', 'r', imp.PY_SOURCE))
|
||||
import runtestsremote
|
||||
|
||||
MOZ_HOST_BIN = os.environ.get('MOZ_HOST_BIN')
|
||||
if not MOZ_HOST_BIN:
|
||||
print('environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell')
|
||||
return 1
|
||||
elif not os.path.isdir(MOZ_HOST_BIN):
|
||||
print('$MOZ_HOST_BIN does not specify a directory')
|
||||
return 1
|
||||
elif not os.path.isfile(os.path.join(MOZ_HOST_BIN, 'xpcshell')):
|
||||
print('$MOZ_HOST_BIN/xpcshell does not exist')
|
||||
return 1
|
||||
host_ret = verify_host_bin()
|
||||
if host_ret != 0:
|
||||
return host_ret
|
||||
|
||||
args = [
|
||||
'--xre-path=' + MOZ_HOST_BIN,
|
||||
'--xre-path=' + os.environ.get('MOZ_HOST_BIN'),
|
||||
'--dm_trans=adb',
|
||||
'--deviceIP=',
|
||||
'--console-level=INFO',
|
||||
@ -1082,4 +1117,5 @@ class AndroidCommands(MachCommandBase):
|
||||
if test_path:
|
||||
args.append('--test-path=%s' % test_path)
|
||||
|
||||
sys.exit(runtestsremote.main(args))
|
||||
mochitest = self._spawn(MochitestRunner)
|
||||
return mochitest.run_android_test(args)
|
||||
|
@ -5,6 +5,9 @@ $inherits:
|
||||
build_name: 'emulator-ics'
|
||||
task:
|
||||
workerType: emulator-ics
|
||||
routes:
|
||||
- 'index.buildbot.branches.{{project}}.emulator-ics'
|
||||
- 'index.buildbot.revisions.{{head_rev}}.{{project}}.emulator-ics'
|
||||
scopes:
|
||||
- 'docker-worker:cache:workspace-emulator-ics-opt'
|
||||
metadata:
|
||||
|
@ -5,6 +5,9 @@ $inherits:
|
||||
build_type: 'opt'
|
||||
task:
|
||||
workerType: emulator-kk
|
||||
routes:
|
||||
- 'index.buildbot.branches.{{project}}.emulator-kk'
|
||||
- 'index.buildbot.revisions.{{head_rev}}.{{project}}.emulator-kk'
|
||||
scopes:
|
||||
- 'docker-worker:cache:workspace-emulator-kk-opt'
|
||||
metadata:
|
||||
|
99
toolkit/content/aboutServiceWorkers.js
Normal file
99
toolkit/content/aboutServiceWorkers.js
Normal file
@ -0,0 +1,99 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
'use strict';
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const bundle = Services.strings.createBundle(
|
||||
"chrome://global/locale/aboutServiceWorkers.properties");
|
||||
|
||||
function init() {
|
||||
let enabled = Services.prefs.getBoolPref("dom.serviceWorkers.enabled");
|
||||
if (!enabled) {
|
||||
let div = document.getElementById("warning_not_enabled");
|
||||
div.classList.add("active");
|
||||
return;
|
||||
}
|
||||
|
||||
let swm = Cc["@mozilla.org/serviceworkers/manager;1"]
|
||||
.getService(Ci.nsIServiceWorkerManager);
|
||||
if (!swm) {
|
||||
dump("AboutServiceWorkers: Failed to get the ServiceWorkerManager service!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
let data = swm.getAllRegistrations();
|
||||
if (!data) {
|
||||
dump("AboutServiceWorkers: Failed to retrieve the registrations.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
let length = data.length;
|
||||
if (!length) {
|
||||
let div = document.getElementById("warning_no_serviceworkers");
|
||||
div.classList.add("active");
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < length; ++i) {
|
||||
let info = data.queryElementAt(i, Ci.nsIServiceWorkerInfo);
|
||||
if (!info) {
|
||||
dump("AboutServiceWorkers: Invalid nsIServiceWorkerInfo interface.\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
display(info);
|
||||
}
|
||||
}
|
||||
|
||||
function display(info) {
|
||||
let parent = document.getElementById("serviceworkers");
|
||||
|
||||
let div = document.createElement('div');
|
||||
parent.appendChild(div);
|
||||
|
||||
let title = document.createElement('h2');
|
||||
let titleStr = bundle.formatStringFromName('title', [info.principal.origin], 1);
|
||||
title.appendChild(document.createTextNode(titleStr));
|
||||
div.appendChild(title);
|
||||
|
||||
if (info.principal.appId) {
|
||||
let b2gtitle = document.createElement('h3');
|
||||
let trueFalse = bundle.GetStringFromName(info.principal.isInBrowserElement ? 'true' : 'false');
|
||||
let b2gtitleStr = bundle.formatStringFromName('b2gtitle', [info.principal.appId, trueFalse], 2);
|
||||
b2gtitle.appendChild(document.createTextNode(b2gtitleStr));
|
||||
div.appendChild(b2gtitle);
|
||||
}
|
||||
|
||||
let list = document.createElement('ul');
|
||||
div.appendChild(list);
|
||||
|
||||
function createItem(title, value) {
|
||||
let item = document.createElement('li');
|
||||
list.appendChild(item);
|
||||
|
||||
let bold = document.createElement('strong');
|
||||
bold.appendChild(document.createTextNode(title + " "));
|
||||
item.appendChild(bold);
|
||||
|
||||
item.appendChild(document.createTextNode(value));
|
||||
}
|
||||
|
||||
createItem(bundle.GetStringFromName('scope'), info.scope);
|
||||
createItem(bundle.GetStringFromName('scriptSpec'), info.scriptSpec);
|
||||
createItem(bundle.GetStringFromName('currentWorkerURL'), info.currentWorkerURL);
|
||||
createItem(bundle.GetStringFromName('activeCacheName'), info.activeCacheName);
|
||||
createItem(bundle.GetStringFromName('waitingCacheName'), info.waitingCacheName);
|
||||
|
||||
let sep = document.createElement('hr');
|
||||
div.appendChild(sep);
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function load() {
|
||||
window.removeEventListener("DOMContentLoaded", load);
|
||||
init();
|
||||
});
|
34
toolkit/content/aboutServiceWorkers.xhtml
Normal file
34
toolkit/content/aboutServiceWorkers.xhtml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> %htmlDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> %brandDTD;
|
||||
<!ENTITY % serviceworkersDTD SYSTEM "chrome://global/locale/aboutServiceWorkers.dtd"> %serviceworkersDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&aboutServiceWorkers.title;</title>
|
||||
<link rel="stylesheet" href="chrome://global/skin/about.css" type="text/css" />
|
||||
<link rel="stylesheet" href="chrome://mozapps/skin/aboutServiceWorkers.css" type="text/css" />
|
||||
<script type="application/javascript;version=1.7" src="chrome://global/content/aboutServiceWorkers.js" />
|
||||
</head>
|
||||
<body id="body">
|
||||
<div id="warning_not_enabled" class="warningBackground">
|
||||
<div class="warningMessage">&aboutServiceWorkers.warning_not_enabled;</div>
|
||||
</div>
|
||||
|
||||
<div id="warning_no_serviceworkers" class="warningBackground">
|
||||
<div class="warningMessage">&aboutServiceWorkers.warning_no_serviceworkers;</div>
|
||||
</div>
|
||||
|
||||
<div id="serviceworkers" class="tab active">
|
||||
<h1>&aboutServiceWorkers.maintitle;</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -186,6 +186,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="no-copy">
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsServiceWorkers;
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<a href="about:serviceworkers">about:serviceworkers</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsMultiProcessSupport;
|
||||
|
@ -20,6 +20,8 @@ toolkit.jar:
|
||||
content/global/aboutRights-unbranded.xhtml (aboutRights-unbranded.xhtml)
|
||||
content/global/aboutNetworking.js
|
||||
content/global/aboutNetworking.xhtml
|
||||
content/global/aboutServiceWorkers.js
|
||||
content/global/aboutServiceWorkers.xhtml
|
||||
content/global/aboutwebrtc/aboutWebrtc.css (aboutwebrtc/aboutWebrtc.css)
|
||||
content/global/aboutwebrtc/aboutWebrtc.js (aboutwebrtc/aboutWebrtc.js)
|
||||
content/global/aboutwebrtc/aboutWebrtc.xhtml (aboutwebrtc/aboutWebrtc.xhtml)
|
||||
|
12
toolkit/locales/en-US/chrome/global/aboutServiceWorkers.dtd
Normal file
12
toolkit/locales/en-US/chrome/global/aboutServiceWorkers.dtd
Normal file
@ -0,0 +1,12 @@
|
||||
<!-- 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/. -->
|
||||
|
||||
<!-- LOCALIZATION NOTE the term "Service Workers" should not be translated. -->
|
||||
<!ENTITY aboutServiceWorkers.title "About Service Workers">
|
||||
<!-- LOCALIZATION NOTE the term "Service Workers" should not be translated. -->
|
||||
<!ENTITY aboutServiceWorkers.maintitle "Registered Service Workers">
|
||||
<!-- LOCALIZATION NOTE the term "Service Workers" should not be translated. -->
|
||||
<!ENTITY aboutServiceWorkers.warning_not_enabled "Service Workers are not enabled.">
|
||||
<!-- LOCALIZATION NOTE the term "Service Workers" should not be translated. -->
|
||||
<!ENTITY aboutServiceWorkers.warning_no_serviceworkers "No Service Workers registered.">
|
@ -0,0 +1,25 @@
|
||||
# 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/.
|
||||
|
||||
title = Origin: %S
|
||||
|
||||
# LOCALIZATION NOTE the terms "AppId" and "InBrowserElement" should not be translated.
|
||||
b2gtitle = Firefox OS AppID %S - InBrowserElement %S
|
||||
|
||||
scope = Scope:
|
||||
|
||||
scriptSpec = Script Spec:
|
||||
|
||||
# LOCALIZATION NOTE the term "Worker" should not be translated.
|
||||
currentWorkerURL = Current Worker URL:
|
||||
|
||||
# LOCALIZATION NOTE the term "Cache" should not be translated.
|
||||
activeCacheName = Active Cache Name:
|
||||
|
||||
# LOCALIZATION NOTE the term "Cache" should not be translated.
|
||||
waitingCacheName = Waiting Cache Name:
|
||||
|
||||
true = true
|
||||
|
||||
false = false
|
@ -55,6 +55,7 @@ Windows/Mac use the term "Folder" instead of "Directory" -->
|
||||
<!ENTITY aboutSupport.appBasicsBuildConfig "Build Configuration">
|
||||
<!ENTITY aboutSupport.appBasicsUserAgent "User Agent">
|
||||
<!ENTITY aboutSupport.appBasicsMemoryUse "Memory Use">
|
||||
<!ENTITY aboutSupport.appBasicsServiceWorkers "Registered ServiceWorkers">
|
||||
|
||||
<!ENTITY aboutSupport.appBasicsMultiProcessSupport "Multiprocess Windows">
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
locale/@AB_CD@/global/aboutReader.properties (%chrome/global/aboutReader.properties)
|
||||
locale/@AB_CD@/global/aboutRights.dtd (%chrome/global/aboutRights.dtd)
|
||||
locale/@AB_CD@/global/aboutNetworking.dtd (%chrome/global/aboutNetworking.dtd)
|
||||
locale/@AB_CD@/global/aboutServiceWorkers.dtd (%chrome/global/aboutServiceWorkers.dtd)
|
||||
locale/@AB_CD@/global/aboutServiceWorkers.properties (%chrome/global/aboutServiceWorkers.properties)
|
||||
locale/@AB_CD@/global/aboutSupport.dtd (%chrome/global/aboutSupport.dtd)
|
||||
locale/@AB_CD@/global/aboutSupport.properties (%chrome/global/aboutSupport.properties)
|
||||
locale/@AB_CD@/global/aboutTelemetry.dtd (%chrome/global/aboutTelemetry.dtd)
|
||||
|
@ -56,6 +56,7 @@ toolkit.jar:
|
||||
skin/classic/mozapps/formautofill/requestAutocomplete.css (../../shared/formautofill/requestAutocomplete.css)
|
||||
skin/classic/mozapps/plugins/pluginProblem.css (../../shared/plugins/pluginProblem.css)
|
||||
skin/classic/mozapps/aboutNetworking.css (../../shared/aboutNetworking.css)
|
||||
skin/classic/mozapps/aboutServiceWorkers.css (../../shared/aboutServiceWorkers.css)
|
||||
skin/classic/mozapps/plugins/contentPluginActivate.png (../../shared/plugins/contentPluginActivate.png)
|
||||
skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png)
|
||||
skin/classic/mozapps/plugins/contentPluginClose.png (../../shared/plugins/contentPluginClose.png)
|
||||
|
40
toolkit/themes/shared/aboutServiceWorkers.css
Normal file
40
toolkit/themes/shared/aboutServiceWorkers.css
Normal file
@ -0,0 +1,40 @@
|
||||
/* 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/. */
|
||||
|
||||
body {
|
||||
min-width: 330px;
|
||||
max-width: 100%;
|
||||
min-height: 330px;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.warningBackground {
|
||||
display: none;
|
||||
background: -moz-Dialog;
|
||||
width:100%;
|
||||
height:100%;
|
||||
z-index:10;
|
||||
top:0;
|
||||
left:0;
|
||||
position:fixed;
|
||||
}
|
||||
|
||||
.warningMessage {
|
||||
color: -moz-FieldText;
|
||||
position: relative;
|
||||
min-width: 330px;
|
||||
max-width: 50em;
|
||||
margin: 4em auto;
|
||||
border: 1px solid ThreeDShadow;
|
||||
border-radius: 10px;
|
||||
padding: 3em;
|
||||
-moz-padding-start: 30px;
|
||||
background: -moz-Field;
|
||||
margin-left: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
}
|
@ -55,6 +55,7 @@ toolkit.jar:
|
||||
skin/classic/mozapps/formautofill/requestAutocomplete.css (../../shared/formautofill/requestAutocomplete.css)
|
||||
skin/classic/mozapps/plugins/pluginProblem.css (../../shared/plugins/pluginProblem.css)
|
||||
skin/classic/mozapps/aboutNetworking.css (../../shared/aboutNetworking.css)
|
||||
skin/classic/mozapps/aboutServiceWorkers.css (../../shared/aboutServiceWorkers.css)
|
||||
skin/classic/mozapps/plugins/contentPluginActivate.png (../../shared/plugins/contentPluginActivate.png)
|
||||
skin/classic/mozapps/plugins/contentPluginBlocked.png (../../shared/plugins/contentPluginBlocked.png)
|
||||
skin/classic/mozapps/plugins/contentPluginClose.png (../../shared/plugins/contentPluginClose.png)
|
||||
|
@ -79,6 +79,8 @@ pref("dom.always_allow_move_resize_window", true);
|
||||
// Disable all plugins. This has to be a non-empty string to disable plugins;
|
||||
// otherwise, nsPluginHost::IsTypeWhitelisted assumes all plugins are enabled.
|
||||
pref("plugin.allowed_types", " ");
|
||||
// Suppress the check for outdated plugins from opening a window.
|
||||
pref("extensions.blocklist.suppressUI", true);
|
||||
|
||||
pref("devtools.debugger.remote-enabled", true);
|
||||
pref("devtools.debugger.force-local", true);
|
||||
|
Loading…
Reference in New Issue
Block a user