merge mozilla-central to mozilla-inbound IGNORE IDL

--HG--
extra : rebase_source : 294f0cad1bada4ebf38f24ff52ebbd7798de5912
extra : amend_source : d7b1044b736cf3e351efbef9610c83a14e6543ae
This commit is contained in:
Carsten "Tomcat" Book 2015-04-22 16:09:56 +02:00
Родитель 0a912ae1c7 53dd599648
Коммит 7ef9b42c28
81 изменённых файлов: 1036 добавлений и 464 удалений

Просмотреть файл

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db"> <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<!-- Stock Android things --> <!-- 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/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"/> <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,8 +19,8 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/> <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project> </project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things --> <!-- Stock Android things -->

Просмотреть файл

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db"> <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<!-- Stock Android things --> <!-- 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/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"/> <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"/>

Просмотреть файл

@ -12,18 +12,18 @@
<!--original fetch url was https://git.mozilla.org/releases--> <!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. --> <!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="6b0721ca0e92788df30daf8f7a5fb2863544f9c8"> <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<!-- Stock Android things --> <!-- 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="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/> <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
<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="337e0ef5e40f02a1ae59b90db0548976c70a7226"/> <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="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>

Просмотреть файл

@ -19,8 +19,8 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/> <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>

Просмотреть файл

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db"> <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<!-- Stock Android things --> <!-- 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/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"/> <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"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project> </project>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things --> <!-- Stock Android things -->

Просмотреть файл

@ -1,9 +1,9 @@
{ {
"git": { "git": {
"git_revision": "15134b080b5f406e5aa36f5136c17dafb4e31f64", "git_revision": "a7dcc5fb595030dab140d5ff0e7eb5ef04017d51",
"remote": "https://git.mozilla.org/releases/gaia.git", "remote": "https://git.mozilla.org/releases/gaia.git",
"branch": "" "branch": ""
}, },
"revision": "457b84a122653f399cb817513b5149c4c087afe9", "revision": "5e00921aa36301b179b4912d352e6bcc0de89edc",
"repo_path": "integration/gaia-central" "repo_path": "integration/gaia-central"
} }

Просмотреть файл

@ -17,10 +17,10 @@
</project> </project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things --> <!-- Stock Android things -->

Просмотреть файл

@ -12,18 +12,18 @@
<!--original fetch url was https://git.mozilla.org/releases--> <!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. --> <!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="6b0721ca0e92788df30daf8f7a5fb2863544f9c8"> <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15134b080b5f406e5aa36f5136c17dafb4e31f64"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="a7dcc5fb595030dab140d5ff0e7eb5ef04017d51"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f2f2f0cbee2f2517070dd194051d509c07cdacff"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/> <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="f4c86a6371082db0be8087b17a31bb79d35fb1d1"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
<!-- Stock Android things --> <!-- 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="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/> <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
<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="337e0ef5e40f02a1ae59b90db0548976c70a7226"/> <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="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>

Просмотреть файл

@ -707,6 +707,19 @@ function injectLoopAPI(targetWindow) {
}, },
}, },
/**
* Opens a URL in a new tab in the browser.
*
* @param {String} url The new url to open
*/
openURL: {
enumerable: true,
writable: true,
value: function(url) {
return MozLoopService.openURL(url);
}
},
/** /**
* Copies passed string onto the system clipboard. * Copies passed string onto the system clipboard.
* *

Просмотреть файл

@ -1650,6 +1650,16 @@ this.MozLoopService = {
} }
}), }),
/**
* Opens a URL in a new tab in the browser.
*
* @param {String} url The new url to open
*/
openURL: function(url) {
let win = Services.wm.getMostRecentWindow("navigator:browser");
win.openUILinkIn(url, "tab");
},
/** /**
* Performs a hawk based request to the loop server. * Performs a hawk based request to the loop server.
* *

Просмотреть файл

@ -260,6 +260,8 @@ body[dir=rtl] .new-room-view > .context > .context-preview {
display: inline-block; display: inline-block;
font-size: .85rem; font-size: .85rem;
color: #777; color: #777;
/* See .room-entry-context-item for the margin/size reductions. */
width: calc(100% - 1rem - 16px);
} }
.room-list > .room-entry.room-active > h2 { .room-list > .room-entry.room-active > h2 {
@ -354,6 +356,19 @@ body[dir=rtl] .new-room-view > .context > .context-preview {
vertical-align: middle; vertical-align: middle;
} }
/* Keep ".room-list > .room-entry > h2" in sync with these. */
.room-entry-context-item {
display: inline-block;
vertical-align: middle;
margin-left: 1rem;
height: 16px;
}
.room-entry-context-item > a > img {
height: 16px;
width: 16px;
}
/* Buttons */ /* Buttons */
.button-group { .button-group {

Просмотреть файл

@ -11,6 +11,8 @@ var loop = loop || {};
loop.contacts = (function(_, mozL10n) { loop.contacts = (function(_, mozL10n) {
"use strict"; "use strict";
var sharedMixins = loop.shared.mixins;
const Button = loop.shared.views.Button; const Button = loop.shared.views.Button;
const ButtonGroup = loop.shared.views.ButtonGroup; const ButtonGroup = loop.shared.views.ButtonGroup;
const CALL_TYPES = loop.shared.utils.CALL_TYPES; const CALL_TYPES = loop.shared.utils.CALL_TYPES;
@ -82,6 +84,8 @@ loop.contacts = (function(_, mozL10n) {
}; };
const GravatarPromo = React.createClass({displayName: "GravatarPromo", const GravatarPromo = React.createClass({displayName: "GravatarPromo",
mixins: [sharedMixins.WindowCloseMixin],
propTypes: { propTypes: {
handleUse: React.PropTypes.func.isRequired handleUse: React.PropTypes.func.isRequired
}, },
@ -98,6 +102,16 @@ loop.contacts = (function(_, mozL10n) {
this.setState({ showMe: false }); this.setState({ showMe: false });
}, },
handleLinkClick: function(event) {
if (!event.target || !event.target.href) {
return;
}
event.preventDefault();
navigator.mozLoop.openURL(event.target.href);
this.closeWindow();
},
handleUseButtonClick: function() { handleUseButtonClick: function() {
navigator.mozLoop.setLoopPref("contacts.gravatars.promo", false); navigator.mozLoop.setLoopPref("contacts.gravatars.promo", false);
navigator.mozLoop.setLoopPref("contacts.gravatars.show", true); navigator.mozLoop.setLoopPref("contacts.gravatars.show", true);
@ -121,7 +135,8 @@ loop.contacts = (function(_, mozL10n) {
return ( return (
React.createElement("div", {className: "contacts-gravatar-promo"}, React.createElement("div", {className: "contacts-gravatar-promo"},
React.createElement(Button, {additionalClass: "button-close", onClick: this.handleCloseButtonClick}), React.createElement(Button, {additionalClass: "button-close", onClick: this.handleCloseButtonClick}),
React.createElement("p", {dangerouslySetInnerHTML: {__html: message}}), React.createElement("p", {dangerouslySetInnerHTML: {__html: message},
onClick: this.handleLinkClick}),
React.createElement(ButtonGroup, null, React.createElement(ButtonGroup, null,
React.createElement(Button, {caption: mozL10n.get("gravatars_promo_button_nothanks"), React.createElement(Button, {caption: mozL10n.get("gravatars_promo_button_nothanks"),
onClick: this.handleCloseButtonClick}), onClick: this.handleCloseButtonClick}),

Просмотреть файл

@ -11,6 +11,8 @@ var loop = loop || {};
loop.contacts = (function(_, mozL10n) { loop.contacts = (function(_, mozL10n) {
"use strict"; "use strict";
var sharedMixins = loop.shared.mixins;
const Button = loop.shared.views.Button; const Button = loop.shared.views.Button;
const ButtonGroup = loop.shared.views.ButtonGroup; const ButtonGroup = loop.shared.views.ButtonGroup;
const CALL_TYPES = loop.shared.utils.CALL_TYPES; const CALL_TYPES = loop.shared.utils.CALL_TYPES;
@ -82,6 +84,8 @@ loop.contacts = (function(_, mozL10n) {
}; };
const GravatarPromo = React.createClass({ const GravatarPromo = React.createClass({
mixins: [sharedMixins.WindowCloseMixin],
propTypes: { propTypes: {
handleUse: React.PropTypes.func.isRequired handleUse: React.PropTypes.func.isRequired
}, },
@ -98,6 +102,16 @@ loop.contacts = (function(_, mozL10n) {
this.setState({ showMe: false }); this.setState({ showMe: false });
}, },
handleLinkClick: function(event) {
if (!event.target || !event.target.href) {
return;
}
event.preventDefault();
navigator.mozLoop.openURL(event.target.href);
this.closeWindow();
},
handleUseButtonClick: function() { handleUseButtonClick: function() {
navigator.mozLoop.setLoopPref("contacts.gravatars.promo", false); navigator.mozLoop.setLoopPref("contacts.gravatars.promo", false);
navigator.mozLoop.setLoopPref("contacts.gravatars.show", true); navigator.mozLoop.setLoopPref("contacts.gravatars.show", true);
@ -121,7 +135,8 @@ loop.contacts = (function(_, mozL10n) {
return ( return (
<div className="contacts-gravatar-promo"> <div className="contacts-gravatar-promo">
<Button additionalClass="button-close" onClick={this.handleCloseButtonClick}/> <Button additionalClass="button-close" onClick={this.handleCloseButtonClick}/>
<p dangerouslySetInnerHTML={{__html: message}}></p> <p dangerouslySetInnerHTML={{__html: message}}
onClick={this.handleLinkClick}></p>
<ButtonGroup> <ButtonGroup>
<Button caption={mozL10n.get("gravatars_promo_button_nothanks")} <Button caption={mozL10n.get("gravatars_promo_button_nothanks")}
onClick={this.handleCloseButtonClick}/> onClick={this.handleCloseButtonClick}/>

Просмотреть файл

@ -215,6 +215,8 @@ loop.panel = (function(_, mozL10n) {
}); });
var ToSView = React.createClass({displayName: "ToSView", var ToSView = React.createClass({displayName: "ToSView",
mixins: [sharedMixins.WindowCloseMixin],
getInitialState: function() { getInitialState: function() {
var getPref = navigator.mozLoop.getLoopPref.bind(navigator.mozLoop); var getPref = navigator.mozLoop.getLoopPref.bind(navigator.mozLoop);
@ -225,6 +227,16 @@ loop.panel = (function(_, mozL10n) {
}; };
}, },
handleLinkClick: function(event) {
if (!event.target || !event.target.href) {
return;
}
event.preventDefault();
navigator.mozLoop.openURL(event.target.href);
this.closeWindow();
},
renderPartnerLogo: function() { renderPartnerLogo: function() {
if (!this.state.showPartnerLogo) { if (!this.state.showPartnerLogo) {
return null; return null;
@ -262,7 +274,8 @@ loop.panel = (function(_, mozL10n) {
React.createElement("div", {id: "powered-by-wrapper"}, React.createElement("div", {id: "powered-by-wrapper"},
this.renderPartnerLogo(), this.renderPartnerLogo(),
React.createElement("p", {className: "terms-service", React.createElement("p", {className: "terms-service",
dangerouslySetInnerHTML: {__html: tosHTML}}) dangerouslySetInnerHTML: {__html: tosHTML},
onClick: this.handleLinkClick})
) )
); );
} else { } else {
@ -305,6 +318,10 @@ loop.panel = (function(_, mozL10n) {
* Panel settings (gear) menu. * Panel settings (gear) menu.
*/ */
var SettingsDropdown = React.createClass({displayName: "SettingsDropdown", var SettingsDropdown = React.createClass({displayName: "SettingsDropdown",
propTypes: {
mozLoop: React.PropTypes.object.isRequired
},
mixins: [sharedMixins.DropdownMenuMixin, sharedMixins.WindowCloseMixin], mixins: [sharedMixins.DropdownMenuMixin, sharedMixins.WindowCloseMixin],
handleClickSettingsEntry: function() { handleClickSettingsEntry: function() {
@ -312,30 +329,31 @@ loop.panel = (function(_, mozL10n) {
}, },
handleClickAccountEntry: function() { handleClickAccountEntry: function() {
navigator.mozLoop.openFxASettings(); this.props.mozLoop.openFxASettings();
this.closeWindow();
}, },
handleClickAuthEntry: function() { handleClickAuthEntry: function() {
if (this._isSignedIn()) { if (this._isSignedIn()) {
navigator.mozLoop.logOutFromFxA(); this.props.mozLoop.logOutFromFxA();
} else { } else {
navigator.mozLoop.logInToFxA(); this.props.mozLoop.logInToFxA();
} }
}, },
handleHelpEntry: function(event) { handleHelpEntry: function(event) {
event.preventDefault(); event.preventDefault();
var helloSupportUrl = navigator.mozLoop.getLoopPref('support_url'); var helloSupportUrl = this.props.mozLoop.getLoopPref("support_url");
window.open(helloSupportUrl); this.props.mozLoop.openURL(helloSupportUrl);
window.close(); this.closeWindow();
}, },
_isSignedIn: function() { _isSignedIn: function() {
return !!navigator.mozLoop.userProfile; return !!this.props.mozLoop.userProfile;
}, },
openGettingStartedTour: function() { openGettingStartedTour: function() {
navigator.mozLoop.openGettingStartedTour("settings-menu"); this.props.mozLoop.openGettingStartedTour("settings-menu");
this.closeWindow(); this.closeWindow();
}, },
@ -356,7 +374,7 @@ loop.panel = (function(_, mozL10n) {
React.createElement(SettingsDropdownEntry, {label: mozL10n.get("settings_menu_item_account"), React.createElement(SettingsDropdownEntry, {label: mozL10n.get("settings_menu_item_account"),
onClick: this.handleClickAccountEntry, onClick: this.handleClickAccountEntry,
icon: "account", icon: "account",
displayed: this._isSignedIn() && navigator.mozLoop.fxAEnabled}), displayed: this._isSignedIn() && this.props.mozLoop.fxAEnabled}),
React.createElement(SettingsDropdownEntry, {icon: "tour", React.createElement(SettingsDropdownEntry, {icon: "tour",
label: mozL10n.get("tour_label"), label: mozL10n.get("tour_label"),
onClick: this.openGettingStartedTour}), onClick: this.openGettingStartedTour}),
@ -364,7 +382,7 @@ loop.panel = (function(_, mozL10n) {
mozL10n.get("settings_menu_item_signout") : mozL10n.get("settings_menu_item_signout") :
mozL10n.get("settings_menu_item_signin"), mozL10n.get("settings_menu_item_signin"),
onClick: this.handleClickAuthEntry, onClick: this.handleClickAuthEntry,
displayed: navigator.mozLoop.fxAEnabled, displayed: this.props.mozLoop.fxAEnabled,
icon: this._isSignedIn() ? "signout" : "signin"}), icon: this._isSignedIn() ? "signout" : "signin"}),
React.createElement(SettingsDropdownEntry, {label: mozL10n.get("help_label"), React.createElement(SettingsDropdownEntry, {label: mozL10n.get("help_label"),
onClick: this.handleHelpEntry, onClick: this.handleHelpEntry,
@ -413,13 +431,43 @@ loop.panel = (function(_, mozL10n) {
} }
}); });
var RoomEntryContextItem = React.createClass({displayName: "RoomEntryContextItem",
propTypes: {
mozLoop: React.PropTypes.object.isRequired,
roomUrls: React.PropTypes.object
},
handleClick: function(event) {
event.stopPropagation();
event.preventDefault();
this.props.mozLoop.openURL(event.currentTarget.href);
},
render: function() {
var roomUrl = this.props.roomUrls && this.props.roomUrls[0];
if (!roomUrl) {
return null;
}
return (
React.createElement("div", {className: "room-entry-context-item"},
React.createElement("a", {href: roomUrl.location, onClick: this.handleClick},
React.createElement("img", {title: roomUrl.description,
src: roomUrl.thumbnail})
)
)
);
}
});
/** /**
* Room list entry. * Room list entry.
*/ */
var RoomEntry = React.createClass({displayName: "RoomEntry", var RoomEntry = React.createClass({displayName: "RoomEntry",
propTypes: { propTypes: {
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
room: React.PropTypes.instanceOf(loop.store.Room).isRequired mozLoop: React.PropTypes.object.isRequired,
room: React.PropTypes.instanceOf(loop.store.Room).isRequired
}, },
mixins: [loop.shared.mixins.WindowCloseMixin], mixins: [loop.shared.mixins.WindowCloseMixin],
@ -453,7 +501,7 @@ loop.panel = (function(_, mozL10n) {
handleDeleteButtonClick: function(event) { handleDeleteButtonClick: function(event) {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
navigator.mozLoop.confirm({ this.props.mozLoop.confirm({
message: mozL10n.get("rooms_list_deleteConfirmation_label"), message: mozL10n.get("rooms_list_deleteConfirmation_label"),
okButton: null, okButton: null,
cancelButton: null cancelButton: null
@ -502,7 +550,9 @@ loop.panel = (function(_, mozL10n) {
React.createElement("button", {className: "delete-link", React.createElement("button", {className: "delete-link",
title: mozL10n.get("rooms_list_delete_tooltip"), title: mozL10n.get("rooms_list_delete_tooltip"),
onClick: this.handleDeleteButtonClick}) onClick: this.handleDeleteButtonClick})
) ),
React.createElement(RoomEntryContextItem, {mozLoop: this.props.mozLoop,
roomUrls: this.props.room.decryptedContext.urls})
) )
); );
} }
@ -574,6 +624,7 @@ loop.panel = (function(_, mozL10n) {
React.createElement(RoomEntry, { React.createElement(RoomEntry, {
key: room.roomToken, key: room.roomToken,
dispatcher: this.props.dispatcher, dispatcher: this.props.dispatcher,
mozLoop: this.props.mozLoop,
room: room} room: room}
) )
); );
@ -689,7 +740,7 @@ loop.panel = (function(_, mozL10n) {
showTabButtons: React.PropTypes.bool, showTabButtons: React.PropTypes.bool,
selectedTab: React.PropTypes.string, selectedTab: React.PropTypes.string,
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
mozLoop: React.PropTypes.object, mozLoop: React.PropTypes.object.isRequired,
roomStore: roomStore:
React.PropTypes.instanceOf(loop.store.RoomStore).isRequired React.PropTypes.instanceOf(loop.store.RoomStore).isRequired
}, },
@ -848,7 +899,7 @@ loop.panel = (function(_, mozL10n) {
React.createElement("div", {className: "signin-details"}, React.createElement("div", {className: "signin-details"},
React.createElement(AuthLink, null), React.createElement(AuthLink, null),
React.createElement("div", {className: "footer-signin-separator"}), React.createElement("div", {className: "footer-signin-separator"}),
React.createElement(SettingsDropdown, null) React.createElement(SettingsDropdown, {mozLoop: this.props.mozLoop})
) )
) )
) )

Просмотреть файл

@ -215,6 +215,8 @@ loop.panel = (function(_, mozL10n) {
}); });
var ToSView = React.createClass({ var ToSView = React.createClass({
mixins: [sharedMixins.WindowCloseMixin],
getInitialState: function() { getInitialState: function() {
var getPref = navigator.mozLoop.getLoopPref.bind(navigator.mozLoop); var getPref = navigator.mozLoop.getLoopPref.bind(navigator.mozLoop);
@ -225,6 +227,16 @@ loop.panel = (function(_, mozL10n) {
}; };
}, },
handleLinkClick: function(event) {
if (!event.target || !event.target.href) {
return;
}
event.preventDefault();
navigator.mozLoop.openURL(event.target.href);
this.closeWindow();
},
renderPartnerLogo: function() { renderPartnerLogo: function() {
if (!this.state.showPartnerLogo) { if (!this.state.showPartnerLogo) {
return null; return null;
@ -262,7 +274,8 @@ loop.panel = (function(_, mozL10n) {
<div id="powered-by-wrapper"> <div id="powered-by-wrapper">
{this.renderPartnerLogo()} {this.renderPartnerLogo()}
<p className="terms-service" <p className="terms-service"
dangerouslySetInnerHTML={{__html: tosHTML}}></p> dangerouslySetInnerHTML={{__html: tosHTML}}
onClick={this.handleLinkClick}></p>
</div> </div>
); );
} else { } else {
@ -305,6 +318,10 @@ loop.panel = (function(_, mozL10n) {
* Panel settings (gear) menu. * Panel settings (gear) menu.
*/ */
var SettingsDropdown = React.createClass({ var SettingsDropdown = React.createClass({
propTypes: {
mozLoop: React.PropTypes.object.isRequired
},
mixins: [sharedMixins.DropdownMenuMixin, sharedMixins.WindowCloseMixin], mixins: [sharedMixins.DropdownMenuMixin, sharedMixins.WindowCloseMixin],
handleClickSettingsEntry: function() { handleClickSettingsEntry: function() {
@ -312,30 +329,31 @@ loop.panel = (function(_, mozL10n) {
}, },
handleClickAccountEntry: function() { handleClickAccountEntry: function() {
navigator.mozLoop.openFxASettings(); this.props.mozLoop.openFxASettings();
this.closeWindow();
}, },
handleClickAuthEntry: function() { handleClickAuthEntry: function() {
if (this._isSignedIn()) { if (this._isSignedIn()) {
navigator.mozLoop.logOutFromFxA(); this.props.mozLoop.logOutFromFxA();
} else { } else {
navigator.mozLoop.logInToFxA(); this.props.mozLoop.logInToFxA();
} }
}, },
handleHelpEntry: function(event) { handleHelpEntry: function(event) {
event.preventDefault(); event.preventDefault();
var helloSupportUrl = navigator.mozLoop.getLoopPref('support_url'); var helloSupportUrl = this.props.mozLoop.getLoopPref("support_url");
window.open(helloSupportUrl); this.props.mozLoop.openURL(helloSupportUrl);
window.close(); this.closeWindow();
}, },
_isSignedIn: function() { _isSignedIn: function() {
return !!navigator.mozLoop.userProfile; return !!this.props.mozLoop.userProfile;
}, },
openGettingStartedTour: function() { openGettingStartedTour: function() {
navigator.mozLoop.openGettingStartedTour("settings-menu"); this.props.mozLoop.openGettingStartedTour("settings-menu");
this.closeWindow(); this.closeWindow();
}, },
@ -356,7 +374,7 @@ loop.panel = (function(_, mozL10n) {
<SettingsDropdownEntry label={mozL10n.get("settings_menu_item_account")} <SettingsDropdownEntry label={mozL10n.get("settings_menu_item_account")}
onClick={this.handleClickAccountEntry} onClick={this.handleClickAccountEntry}
icon="account" icon="account"
displayed={this._isSignedIn() && navigator.mozLoop.fxAEnabled} /> displayed={this._isSignedIn() && this.props.mozLoop.fxAEnabled} />
<SettingsDropdownEntry icon="tour" <SettingsDropdownEntry icon="tour"
label={mozL10n.get("tour_label")} label={mozL10n.get("tour_label")}
onClick={this.openGettingStartedTour} /> onClick={this.openGettingStartedTour} />
@ -364,7 +382,7 @@ loop.panel = (function(_, mozL10n) {
mozL10n.get("settings_menu_item_signout") : mozL10n.get("settings_menu_item_signout") :
mozL10n.get("settings_menu_item_signin")} mozL10n.get("settings_menu_item_signin")}
onClick={this.handleClickAuthEntry} onClick={this.handleClickAuthEntry}
displayed={navigator.mozLoop.fxAEnabled} displayed={this.props.mozLoop.fxAEnabled}
icon={this._isSignedIn() ? "signout" : "signin"} /> icon={this._isSignedIn() ? "signout" : "signin"} />
<SettingsDropdownEntry label={mozL10n.get("help_label")} <SettingsDropdownEntry label={mozL10n.get("help_label")}
onClick={this.handleHelpEntry} onClick={this.handleHelpEntry}
@ -413,13 +431,43 @@ loop.panel = (function(_, mozL10n) {
} }
}); });
var RoomEntryContextItem = React.createClass({
propTypes: {
mozLoop: React.PropTypes.object.isRequired,
roomUrls: React.PropTypes.object
},
handleClick: function(event) {
event.stopPropagation();
event.preventDefault();
this.props.mozLoop.openURL(event.currentTarget.href);
},
render: function() {
var roomUrl = this.props.roomUrls && this.props.roomUrls[0];
if (!roomUrl) {
return null;
}
return (
<div className="room-entry-context-item">
<a href={roomUrl.location} onClick={this.handleClick}>
<img title={roomUrl.description}
src={roomUrl.thumbnail} />
</a>
</div>
);
}
});
/** /**
* Room list entry. * Room list entry.
*/ */
var RoomEntry = React.createClass({ var RoomEntry = React.createClass({
propTypes: { propTypes: {
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
room: React.PropTypes.instanceOf(loop.store.Room).isRequired mozLoop: React.PropTypes.object.isRequired,
room: React.PropTypes.instanceOf(loop.store.Room).isRequired
}, },
mixins: [loop.shared.mixins.WindowCloseMixin], mixins: [loop.shared.mixins.WindowCloseMixin],
@ -453,7 +501,7 @@ loop.panel = (function(_, mozL10n) {
handleDeleteButtonClick: function(event) { handleDeleteButtonClick: function(event) {
event.stopPropagation(); event.stopPropagation();
event.preventDefault(); event.preventDefault();
navigator.mozLoop.confirm({ this.props.mozLoop.confirm({
message: mozL10n.get("rooms_list_deleteConfirmation_label"), message: mozL10n.get("rooms_list_deleteConfirmation_label"),
okButton: null, okButton: null,
cancelButton: null cancelButton: null
@ -503,6 +551,8 @@ loop.panel = (function(_, mozL10n) {
title={mozL10n.get("rooms_list_delete_tooltip")} title={mozL10n.get("rooms_list_delete_tooltip")}
onClick={this.handleDeleteButtonClick} /> onClick={this.handleDeleteButtonClick} />
</h2> </h2>
<RoomEntryContextItem mozLoop={this.props.mozLoop}
roomUrls={this.props.room.decryptedContext.urls} />
</div> </div>
); );
} }
@ -574,6 +624,7 @@ loop.panel = (function(_, mozL10n) {
<RoomEntry <RoomEntry
key={room.roomToken} key={room.roomToken}
dispatcher={this.props.dispatcher} dispatcher={this.props.dispatcher}
mozLoop={this.props.mozLoop}
room={room} room={room}
/> />
); );
@ -689,7 +740,7 @@ loop.panel = (function(_, mozL10n) {
showTabButtons: React.PropTypes.bool, showTabButtons: React.PropTypes.bool,
selectedTab: React.PropTypes.string, selectedTab: React.PropTypes.string,
dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired, dispatcher: React.PropTypes.instanceOf(loop.Dispatcher).isRequired,
mozLoop: React.PropTypes.object, mozLoop: React.PropTypes.object.isRequired,
roomStore: roomStore:
React.PropTypes.instanceOf(loop.store.RoomStore).isRequired React.PropTypes.instanceOf(loop.store.RoomStore).isRequired
}, },
@ -848,7 +899,7 @@ loop.panel = (function(_, mozL10n) {
<div className="signin-details"> <div className="signin-details">
<AuthLink /> <AuthLink />
<div className="footer-signin-separator" /> <div className="footer-signin-separator" />
<SettingsDropdown /> <SettingsDropdown mozLoop={this.props.mozLoop}/>
</div> </div>
</div> </div>
</div> </div>

Просмотреть файл

@ -71,6 +71,7 @@ describe("loop.panel", function() {
}, },
confirm: sandbox.stub(), confirm: sandbox.stub(),
notifyUITour: sandbox.stub(), notifyUITour: sandbox.stub(),
openURL: sandbox.stub(),
getSelectedTabMetadata: sandbox.stub() getSelectedTabMetadata: sandbox.stub()
}; };
@ -188,6 +189,19 @@ describe("loop.panel", function() {
})); }));
} }
it("should hide the account entry when FxA is not enabled", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"};
navigator.mozLoop.fxAEnabled = false;
var view = TestUtils.renderIntoDocument(
React.createElement(loop.panel.SettingsDropdown, {
mozLoop: fakeMozLoop
}));
expect(view.getDOMNode().querySelectorAll(".icon-account"))
.to.have.length.of(0);
});
describe('TabView', function() { describe('TabView', function() {
var view, callTab, roomsTab, contactsTab; var view, callTab, roomsTab, contactsTab;
@ -268,18 +282,14 @@ describe("loop.panel", function() {
}); });
}); });
it("should hide the account entry when FxA is not enabled", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"};
navigator.mozLoop.fxAEnabled = false;
var view = TestUtils.renderIntoDocument(
React.createElement(loop.panel.SettingsDropdown));
expect(view.getDOMNode().querySelectorAll(".icon-account"))
.to.have.length.of(0);
});
describe("SettingsDropdown", function() { describe("SettingsDropdown", function() {
function mountTestComponent() {
return TestUtils.renderIntoDocument(
React.createElement(loop.panel.SettingsDropdown, {
mozLoop: fakeMozLoop
}));
}
beforeEach(function() { beforeEach(function() {
navigator.mozLoop.logInToFxA = sandbox.stub(); navigator.mozLoop.logInToFxA = sandbox.stub();
navigator.mozLoop.logOutFromFxA = sandbox.stub(); navigator.mozLoop.logOutFromFxA = sandbox.stub();
@ -294,8 +304,7 @@ describe("loop.panel", function() {
function() { function() {
navigator.mozLoop.loggedInToFxA = false; navigator.mozLoop.loggedInToFxA = false;
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
expect(view.getDOMNode().querySelectorAll(".icon-signout")) expect(view.getDOMNode().querySelectorAll(".icon-signout"))
.to.have.length.of(0); .to.have.length.of(0);
@ -306,8 +315,7 @@ describe("loop.panel", function() {
it("should show a signout entry when user is authenticated", function() { it("should show a signout entry when user is authenticated", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"}; navigator.mozLoop.userProfile = {email: "test@example.com"};
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
expect(view.getDOMNode().querySelectorAll(".icon-signout")) expect(view.getDOMNode().querySelectorAll(".icon-signout"))
.to.have.length.of(1); .to.have.length.of(1);
@ -318,8 +326,7 @@ describe("loop.panel", function() {
it("should show an account entry when user is authenticated", function() { it("should show an account entry when user is authenticated", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"}; navigator.mozLoop.userProfile = {email: "test@example.com"};
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
expect(view.getDOMNode().querySelectorAll(".icon-account")) expect(view.getDOMNode().querySelectorAll(".icon-account"))
.to.have.length.of(1); .to.have.length.of(1);
@ -328,8 +335,7 @@ describe("loop.panel", function() {
it("should open the FxA settings when the account entry is clicked", function() { it("should open the FxA settings when the account entry is clicked", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"}; navigator.mozLoop.userProfile = {email: "test@example.com"};
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
TestUtils.Simulate.click( TestUtils.Simulate.click(
view.getDOMNode().querySelector(".icon-account")); view.getDOMNode().querySelector(".icon-account"));
@ -341,8 +347,7 @@ describe("loop.panel", function() {
function() { function() {
navigator.mozLoop.loggedInToFxA = false; navigator.mozLoop.loggedInToFxA = false;
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
expect(view.getDOMNode().querySelectorAll(".icon-account")) expect(view.getDOMNode().querySelectorAll(".icon-account"))
.to.have.length.of(0); .to.have.length.of(0);
@ -350,8 +355,7 @@ describe("loop.panel", function() {
it("should sign in the user on click when unauthenticated", function() { it("should sign in the user on click when unauthenticated", function() {
navigator.mozLoop.loggedInToFxA = false; navigator.mozLoop.loggedInToFxA = false;
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
TestUtils.Simulate.click( TestUtils.Simulate.click(
view.getDOMNode().querySelector(".icon-signin")); view.getDOMNode().querySelector(".icon-signin"));
@ -361,8 +365,7 @@ describe("loop.panel", function() {
it("should sign out the user on click when authenticated", function() { it("should sign out the user on click when authenticated", function() {
navigator.mozLoop.userProfile = {email: "test@example.com"}; navigator.mozLoop.userProfile = {email: "test@example.com"};
var view = TestUtils.renderIntoDocument( var view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
TestUtils.Simulate.click( TestUtils.Simulate.click(
view.getDOMNode().querySelector(".icon-signout")); view.getDOMNode().querySelector(".icon-signout"));
@ -372,28 +375,41 @@ describe("loop.panel", function() {
}); });
describe("Help", function() { describe("Help", function() {
var supportUrl = "https://example.com"; var view, supportUrl;
function mountTestComponent() {
return TestUtils.renderIntoDocument(
React.createElement(loop.panel.SettingsDropdown, {
mozLoop: fakeMozLoop
}));
}
beforeEach(function() { beforeEach(function() {
supportUrl = "https://example.com";
navigator.mozLoop.getLoopPref = function(pref) { navigator.mozLoop.getLoopPref = function(pref) {
if (pref === "support_url") if (pref === "support_url")
return supportUrl; return supportUrl;
return "unseen"; return "unseen";
}; };
sandbox.stub(window, "open");
sandbox.stub(window, "close");
}); });
it("should open a tab to the support page", function() { it("should open a tab to the support page", function() {
var view = TestUtils.renderIntoDocument( view = mountTestComponent();
React.createElement(loop.panel.SettingsDropdown));
TestUtils.Simulate TestUtils.Simulate
.click(view.getDOMNode().querySelector(".icon-help")); .click(view.getDOMNode().querySelector(".icon-help"));
sinon.assert.calledOnce(window.open); sinon.assert.calledOnce(fakeMozLoop.openURL);
sinon.assert.calledWithExactly(window.open, supportUrl); sinon.assert.calledWithExactly(fakeMozLoop.openURL, supportUrl);
});
it("should close the panel", function() {
view = mountTestComponent();
TestUtils.Simulate
.click(view.getDOMNode().querySelector(".icon-help"));
sinon.assert.calledOnce(fakeWindow.close);
}); });
}); });
@ -463,6 +479,10 @@ describe("loop.panel", function() {
}); });
function mountRoomEntry(props) { function mountRoomEntry(props) {
props = _.extend({
dispatcher: dispatcher,
mozLoop: fakeMozLoop
}, props);
return TestUtils.renderIntoDocument( return TestUtils.renderIntoDocument(
React.createElement(loop.panel.RoomEntry, props)); React.createElement(loop.panel.RoomEntry, props));
} }
@ -472,7 +492,6 @@ describe("loop.panel", function() {
beforeEach(function() { beforeEach(function() {
roomEntry = mountRoomEntry({ roomEntry = mountRoomEntry({
dispatcher: dispatcher,
deleteRoom: sandbox.stub(), deleteRoom: sandbox.stub(),
room: new loop.store.Room(roomData) room: new loop.store.Room(roomData)
}); });
@ -522,7 +541,6 @@ describe("loop.panel", function() {
beforeEach(function() { beforeEach(function() {
roomEntry = mountRoomEntry({ roomEntry = mountRoomEntry({
dispatcher: dispatcher,
room: new loop.store.Room(roomData) room: new loop.store.Room(roomData)
}); });
deleteButton = roomEntry.getDOMNode().querySelector("button.delete-link"); deleteButton = roomEntry.getDOMNode().querySelector("button.delete-link");
@ -555,6 +573,49 @@ describe("loop.panel", function() {
}); });
}); });
describe("Context Indicator", function() {
var roomEntry;
function mountEntryForContext() {
return mountRoomEntry({
room: new loop.store.Room(roomData)
});
}
it("should not display a context indicator if the room doesn't have any", function() {
roomEntry = mountEntryForContext();
expect(roomEntry.getDOMNode().querySelector(".room-entry-context-item")).eql(null);
});
it("should a context indicator if the room specifies context", function() {
roomData.decryptedContext.urls = [{
description: "invalid entry",
location: "http://invalid",
thumbnail: "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
}];
roomEntry = mountEntryForContext();
expect(roomEntry.getDOMNode().querySelector(".room-entry-context-item")).not.eql(null);
});
it("should call mozLoop.openURL to open a new url", function() {
roomData.decryptedContext.urls = [{
description: "invalid entry",
location: "http://invalid/",
thumbnail: "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
}];
roomEntry = mountEntryForContext();
TestUtils.Simulate.click(roomEntry.getDOMNode().querySelector("a"));
sinon.assert.calledOnce(fakeMozLoop.openURL);
sinon.assert.calledWithExactly(fakeMozLoop.openURL, "http://invalid/");
});
});
describe("Room Entry click", function() { describe("Room Entry click", function() {
var roomEntry, roomEntryNode; var roomEntry, roomEntryNode;

Просмотреть файл

@ -7,7 +7,12 @@ var fakeRooms = [
{ {
"roomToken": "_nxD4V4FflQ", "roomToken": "_nxD4V4FflQ",
"decryptedContext": { "decryptedContext": {
"roomName": "First Room Name" "roomName": "First Room Name",
"urls": [{
description: "The mozilla page",
location: "https://www.mozilla.org",
thumbnail: "https://www.mozilla.org/favicon.ico"
}]
}, },
"roomUrl": "http://localhost:3000/rooms/_nxD4V4FflQ", "roomUrl": "http://localhost:3000/rooms/_nxD4V4FflQ",
"roomOwner": "Alexis", "roomOwner": "Alexis",

Просмотреть файл

@ -7,6 +7,7 @@
const {classes: Cc, interfaces: Ci, utils: Cu} = Components; const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
const policy = Cc["@mozilla.org/datareporting/service;1"] const policy = Cc["@mozilla.org/datareporting/service;1"]
.getService(Ci.nsISupports) .getService(Ci.nsISupports)
@ -63,6 +64,10 @@ MozSelfSupportInterface.prototype = {
} }
}.bind(this)); }.bind(this));
}, },
resetPref: function(name) {
Services.prefs.clearUserPref(name);
},
} }
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MozSelfSupportInterface]); this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MozSelfSupportInterface]);

Просмотреть файл

@ -8,3 +8,7 @@ EXTRA_COMPONENTS += [
'SelfSupportService.js', 'SelfSupportService.js',
'SelfSupportService.manifest', 'SelfSupportService.manifest',
] ]
BROWSER_CHROME_MANIFESTS += [
'test/browser.ini',
]

Просмотреть файл

@ -0,0 +1,3 @@
[DEFAULT]
[browser_selfsupportAPI.js]

Просмотреть файл

@ -0,0 +1,47 @@
Cu.import("resource://gre/modules/Preferences.jsm");
function test() {
const prefNewName = "browser.newpref.fake";
Assert.ok(!Preferences.has(prefNewName), "pref should not exist");
const prefExistingName = "extensions.hotfix.id";
Assert.ok(Preferences.has(prefExistingName), "pref should exist");
Assert.ok(!Preferences.isSet(prefExistingName), "pref should not be user-set");
let prefExistingOriginalValue = Preferences.get(prefExistingName);
registerCleanupFunction(function() {
Preferences.set(prefExistingName, prefExistingOriginalValue);
Services.prefs.deleteBranch(prefNewName);
});
// 1. do nothing on an inexistent pref
MozSelfSupport.resetPref(prefNewName);
Assert.ok(!Preferences.has(prefNewName), "pref should still not exist");
// 2. creation of a new pref
Preferences.set(prefNewName, 10);
Assert.ok(Preferences.has(prefNewName), "pref should exist");
Assert.equal(Preferences.get(prefNewName), 10, "pref value should be 10");
MozSelfSupport.resetPref(prefNewName);
Assert.ok(!Preferences.has(prefNewName), "pref should not exist any more");
// 3. do nothing on an unchanged existing pref
MozSelfSupport.resetPref(prefExistingName);
Assert.ok(Preferences.has(prefExistingName), "pref should still exist");
Assert.equal(Preferences.get(prefExistingName), prefExistingOriginalValue, "pref value should be the same as original");
// 4. change the value of an existing pref
Preferences.set(prefExistingName, "anyone@mozilla.org");
Assert.ok(Preferences.has(prefExistingName), "pref should exist");
Assert.equal(Preferences.get(prefExistingName), "anyone@mozilla.org", "pref value should have changed");
MozSelfSupport.resetPref(prefExistingName);
Assert.ok(Preferences.has(prefExistingName), "pref should still exist");
Assert.equal(Preferences.get(prefExistingName), prefExistingOriginalValue, "pref value should be the same as original");
// 5. delete an existing pref
// deleteBranch is implemented in such a way that
// clearUserPref can't undo its action
// see discussion in bug 1075160
}

Просмотреть файл

@ -2162,7 +2162,7 @@ MarkupElementContainer.prototype = Heritage.extend(MarkupContainer.prototype, {
*/ */
isImagePreviewTarget: function(target, tooltip) { isImagePreviewTarget: function(target, tooltip) {
if (!this.tooltipData || this.tooltipData.target !== target) { if (!this.tooltipData || this.tooltipData.target !== target) {
return promise.reject(); return promise.reject(false);
} }
return this.tooltipData.data.then(({data, size}) => { return this.tooltipData.data.then(({data, size}) => {

Просмотреть файл

@ -453,8 +453,6 @@ Tooltip.prototype = {
if (res && res.then) { if (res && res.then) {
return res.then(arg => { return res.then(arg => {
return arg instanceof Ci.nsIDOMNode ? arg : target; return arg instanceof Ci.nsIDOMNode ? arg : target;
}, () => {
return false;
}); });
} else { } else {
let newTarget = res instanceof Ci.nsIDOMNode ? res : target; let newTarget = res instanceof Ci.nsIDOMNode ? res : target;

Просмотреть файл

@ -220,6 +220,11 @@ function Editor(config) {
cm.replaceSelection(" ".repeat(num), "end", "+input"); cm.replaceSelection(" ".repeat(num), "end", "+input");
}; };
// Allow add-ons to inject scripts for their editor instances
if (!this.config.externalScripts) {
this.config.externalScripts = [];
}
events.decorate(this); events.decorate(this);
} }
@ -258,9 +263,11 @@ Editor.prototype = {
if (!this.config.themeSwitching) if (!this.config.themeSwitching)
win.document.documentElement.setAttribute("force-theme", "light"); win.document.documentElement.setAttribute("force-theme", "light");
CM_SCRIPTS.forEach((url) => let scriptsToInject = CM_SCRIPTS.concat(this.config.externalScripts);
Services.scriptloader.loadSubScript(url, win, "utf8")); scriptsToInject.forEach((url) => {
if (url.startsWith("chrome://"))
Services.scriptloader.loadSubScript(url, win, "utf8");
});
// Replace the propertyKeywords, colorKeywords and valueKeywords // Replace the propertyKeywords, colorKeywords and valueKeywords
// properties of the CSS MIME type with the values provided by Gecko. // properties of the CSS MIME type with the values provided by Gecko.
let cssSpec = win.CodeMirror.resolveMode("text/css"); let cssSpec = win.CodeMirror.resolveMode("text/css");
@ -335,6 +342,11 @@ Editor.prototype = {
this._prefObserver.on(ENABLE_CODE_FOLDING, this.reloadPreferences); this._prefObserver.on(ENABLE_CODE_FOLDING, this.reloadPreferences);
this.reloadPreferences(); this.reloadPreferences();
win.editor = this;
let editorReadyEvent = new win.CustomEvent("editorReady");
win.dispatchEvent(editorReadyEvent);
def.resolve(); def.resolve();
}; };

Просмотреть файл

@ -9,6 +9,8 @@ support-files =
cm_mode_test.css cm_mode_test.css
cm_mode_test.js cm_mode_test.js
cm_multi_test.js cm_multi_test.js
cm_mode_ruby.js
cm_script_injection_test.js
cm_search_test.js cm_search_test.js
cm_sublime_test.js cm_sublime_test.js
cm_test.js cm_test.js
@ -31,6 +33,7 @@ support-files =
[browser_editor_markers.js] [browser_editor_markers.js]
[browser_editor_movelines.js] [browser_editor_movelines.js]
[browser_editor_prefs.js] [browser_editor_prefs.js]
[browser_editor_script_injection.js]
[browser_editor_addons.js] [browser_editor_addons.js]
[browser_codemirror.js] [browser_codemirror.js]
[browser_css_autocompletion.js] [browser_css_autocompletion.js]

Просмотреть файл

@ -0,0 +1,26 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Test the externalScripts option, which allows custom language modes or
// other scripts to be injected into the editor window. See Bug 1089428.
"use strict";
add_task(function*() {
yield runTest();
});
function* runTest() {
const baseURL = "chrome://mochitests/content/browser/browser/devtools/sourceeditor/test"
const injectedText = "Script successfully injected !";
let {ed, win} = yield setup(null, {
mode: "ruby",
externalScripts: [`${baseURL}/cm_script_injection_test.js`,
`${baseURL}/cm_mode_ruby.js`]
});
is(ed.getText(), injectedText, "The text has been injected");
is(ed.getOption("mode"), "ruby", "The ruby mode is correctly set");
teardown(ed, win);
}

Просмотреть файл

@ -0,0 +1,285 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("ruby", function(config) {
function wordObj(words) {
var o = {};
for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
return o;
}
var keywords = wordObj([
"alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else",
"elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or",
"redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless",
"until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc",
"caller", "lambda", "proc", "public", "protected", "private", "require", "load",
"require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__"
]);
var indentWords = wordObj(["def", "class", "case", "for", "while", "module", "then",
"catch", "loop", "proc", "begin"]);
var dedentWords = wordObj(["end", "until"]);
var matching = {"[": "]", "{": "}", "(": ")"};
var curPunc;
function chain(newtok, stream, state) {
state.tokenize.push(newtok);
return newtok(stream, state);
}
function tokenBase(stream, state) {
curPunc = null;
if (stream.sol() && stream.match("=begin") && stream.eol()) {
state.tokenize.push(readBlockComment);
return "comment";
}
if (stream.eatSpace()) return null;
var ch = stream.next(), m;
if (ch == "`" || ch == "'" || ch == '"') {
return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state);
} else if (ch == "/") {
var currentIndex = stream.current().length;
if (stream.skipTo("/")) {
var search_till = stream.current().length;
stream.backUp(stream.current().length - currentIndex);
var balance = 0; // balance brackets
while (stream.current().length < search_till) {
var chchr = stream.next();
if (chchr == "(") balance += 1;
else if (chchr == ")") balance -= 1;
if (balance < 0) break;
}
stream.backUp(stream.current().length - currentIndex);
if (balance == 0)
return chain(readQuoted(ch, "string-2", true), stream, state);
}
return "operator";
} else if (ch == "%") {
var style = "string", embed = true;
if (stream.eat("s")) style = "atom";
else if (stream.eat(/[WQ]/)) style = "string";
else if (stream.eat(/[r]/)) style = "string-2";
else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; }
var delim = stream.eat(/[^\w\s=]/);
if (!delim) return "operator";
if (matching.propertyIsEnumerable(delim)) delim = matching[delim];
return chain(readQuoted(delim, style, embed, true), stream, state);
} else if (ch == "#") {
stream.skipToEnd();
return "comment";
} else if (ch == "<" && (m = stream.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) {
return chain(readHereDoc(m[1]), stream, state);
} else if (ch == "0") {
if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/);
else if (stream.eat("b")) stream.eatWhile(/[01]/);
else stream.eatWhile(/[0-7]/);
return "number";
} else if (/\d/.test(ch)) {
stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/);
return "number";
} else if (ch == "?") {
while (stream.match(/^\\[CM]-/)) {}
if (stream.eat("\\")) stream.eatWhile(/\w/);
else stream.next();
return "string";
} else if (ch == ":") {
if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state);
if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state);
// :> :>> :< :<< are valid symbols
if (stream.eat(/[\<\>]/)) {
stream.eat(/[\<\>]/);
return "atom";
}
// :+ :- :/ :* :| :& :! are valid symbols
if (stream.eat(/[\+\-\*\/\&\|\:\!]/)) {
return "atom";
}
// Symbols can't start by a digit
if (stream.eat(/[a-zA-Z$@_\xa1-\uffff]/)) {
stream.eatWhile(/[\w$\xa1-\uffff]/);
// Only one ? ! = is allowed and only as the last character
stream.eat(/[\?\!\=]/);
return "atom";
}
return "operator";
} else if (ch == "@" && stream.match(/^@?[a-zA-Z_\xa1-\uffff]/)) {
stream.eat("@");
stream.eatWhile(/[\w\xa1-\uffff]/);
return "variable-2";
} else if (ch == "$") {
if (stream.eat(/[a-zA-Z_]/)) {
stream.eatWhile(/[\w]/);
} else if (stream.eat(/\d/)) {
stream.eat(/\d/);
} else {
stream.next(); // Must be a special global like $: or $!
}
return "variable-3";
} else if (/[a-zA-Z_\xa1-\uffff]/.test(ch)) {
stream.eatWhile(/[\w\xa1-\uffff]/);
stream.eat(/[\?\!]/);
if (stream.eat(":")) return "atom";
return "ident";
} else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) {
curPunc = "|";
return null;
} else if (/[\(\)\[\]{}\\;]/.test(ch)) {
curPunc = ch;
return null;
} else if (ch == "-" && stream.eat(">")) {
return "arrow";
} else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) {
var more = stream.eatWhile(/[=+\-\/*:\.^%<>~|]/);
if (ch == "." && !more) curPunc = ".";
return "operator";
} else {
return null;
}
}
function tokenBaseUntilBrace(depth) {
if (!depth) depth = 1;
return function(stream, state) {
if (stream.peek() == "}") {
if (depth == 1) {
state.tokenize.pop();
return state.tokenize[state.tokenize.length-1](stream, state);
} else {
state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth - 1);
}
} else if (stream.peek() == "{") {
state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth + 1);
}
return tokenBase(stream, state);
};
}
function tokenBaseOnce() {
var alreadyCalled = false;
return function(stream, state) {
if (alreadyCalled) {
state.tokenize.pop();
return state.tokenize[state.tokenize.length-1](stream, state);
}
alreadyCalled = true;
return tokenBase(stream, state);
};
}
function readQuoted(quote, style, embed, unescaped) {
return function(stream, state) {
var escaped = false, ch;
if (state.context.type === 'read-quoted-paused') {
state.context = state.context.prev;
stream.eat("}");
}
while ((ch = stream.next()) != null) {
if (ch == quote && (unescaped || !escaped)) {
state.tokenize.pop();
break;
}
if (embed && ch == "#" && !escaped) {
if (stream.eat("{")) {
if (quote == "}") {
state.context = {prev: state.context, type: 'read-quoted-paused'};
}
state.tokenize.push(tokenBaseUntilBrace());
break;
} else if (/[@\$]/.test(stream.peek())) {
state.tokenize.push(tokenBaseOnce());
break;
}
}
escaped = !escaped && ch == "\\";
}
return style;
};
}
function readHereDoc(phrase) {
return function(stream, state) {
if (stream.match(phrase)) state.tokenize.pop();
else stream.skipToEnd();
return "string";
};
}
function readBlockComment(stream, state) {
if (stream.sol() && stream.match("=end") && stream.eol())
state.tokenize.pop();
stream.skipToEnd();
return "comment";
}
return {
startState: function() {
return {tokenize: [tokenBase],
indented: 0,
context: {type: "top", indented: -config.indentUnit},
continuedLine: false,
lastTok: null,
varList: false};
},
token: function(stream, state) {
if (stream.sol()) state.indented = stream.indentation();
var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;
var thisTok = curPunc;
if (style == "ident") {
var word = stream.current();
style = state.lastTok == "." ? "property"
: keywords.propertyIsEnumerable(stream.current()) ? "keyword"
: /^[A-Z]/.test(word) ? "tag"
: (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def"
: "variable";
if (style == "keyword") {
thisTok = word;
if (indentWords.propertyIsEnumerable(word)) kwtype = "indent";
else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent";
else if ((word == "if" || word == "unless") && stream.column() == stream.indentation())
kwtype = "indent";
else if (word == "do" && state.context.indented < state.indented)
kwtype = "indent";
}
}
if (curPunc || (style && style != "comment")) state.lastTok = thisTok;
if (curPunc == "|") state.varList = !state.varList;
if (kwtype == "indent" || /[\(\[\{]/.test(curPunc))
state.context = {prev: state.context, type: curPunc || style, indented: state.indented};
else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev)
state.context = state.context.prev;
if (stream.eol())
state.continuedLine = (curPunc == "\\" || style == "operator");
return style;
},
indent: function(state, textAfter) {
if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0;
var firstChar = textAfter && textAfter.charAt(0);
var ct = state.context;
var closing = ct.type == matching[firstChar] ||
ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter);
return ct.indented + (closing ? 0 : config.indentUnit) +
(state.continuedLine ? config.indentUnit : 0);
},
electricChars: "}de", // enD and rescuE
lineComment: "#"
};
});
CodeMirror.defineMIME("text/x-ruby", "ruby");
});

Просмотреть файл

@ -0,0 +1,3 @@
window.addEventListener("editorReady", function(event) {
editor.setText("Script successfully injected !");
});

Просмотреть файл

@ -54,7 +54,7 @@
<div class="devtools-searchbox"> <div class="devtools-searchbox">
<input id="computedview-searchbox" <input id="computedview-searchbox"
class="devtools-searchinput devtools-rule-searchbox" class="devtools-searchinput devtools-rule-searchbox"
type="search" placeholder="&userStylesSearch;"/> type="search" placeholder="&filterStylesPlaceholder;"/>
<button id="computedview-searchinput-clear" class="devtools-searchinput-clear"></button> <button id="computedview-searchinput-clear" class="devtools-searchinput-clear"></button>
</div> </div>
<xul:checkbox id="browser-style-checkbox" <xul:checkbox id="browser-style-checkbox"

Просмотреть файл

@ -42,7 +42,7 @@
<div class="devtools-searchbox"> <div class="devtools-searchbox">
<input id="ruleview-searchbox" <input id="ruleview-searchbox"
class="devtools-searchinput devtools-rule-searchbox" class="devtools-searchinput devtools-rule-searchbox"
type="search" placeholder="&userStylesSearch;"/> type="search" placeholder="&filterStylesPlaceholder;"/>
<button id="ruleview-searchinput-clear" class="devtools-searchinput-clear"></button> <button id="ruleview-searchinput-clear" class="devtools-searchinput-clear"></button>
</div> </div>
</div> </div>

Просмотреть файл

@ -13,9 +13,9 @@
- should be displayed or not. --> - should be displayed or not. -->
<!ENTITY browserStylesLabel "Browser styles"> <!ENTITY browserStylesLabel "Browser styles">
<!-- LOCALIZATION NOTE (userStylesSearch): This is the placeholder that goes in <!-- LOCALIZATION NOTE (filterStylesPlaceholder): This is the placeholder that goes in
- the search box when no search term has been entered. --> - the search box when no search term has been entered. -->
<!ENTITY userStylesSearch "Filter Styles"> <!ENTITY filterStylesPlaceholder "Filter Styles">
<!-- LOCALIZATION NOTE (selectedElementLabel): This is the label for the path of <!-- LOCALIZATION NOTE (selectedElementLabel): This is the label for the path of
- the highlighted element in the web page. This path is based on the document - the highlighted element in the web page. This path is based on the document

Просмотреть файл

@ -388,6 +388,13 @@ EXTRA_COMPONENTS += [
'SlowScriptDebug.manifest', 'SlowScriptDebug.manifest',
] ]
# Firefox for Android provides an alternate version of this component
if CONFIG['MOZ_BUILD_APP'] != 'mobile/android':
EXTRA_COMPONENTS += [
'SiteSpecificUserAgent.js',
'SiteSpecificUserAgent.manifest',
]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'DOMRequestHelper.jsm', 'DOMRequestHelper.jsm',
'IndexedDBHelper.jsm', 'IndexedDBHelper.jsm',

Просмотреть файл

@ -44,7 +44,6 @@ skip-if = (toolkit == 'gonk' && !debug)
skip-if = (toolkit == 'gonk' && !debug) skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_GetScreenshot.html] [test_browserElement_oop_GetScreenshot.html]
[test_browserElement_oop_GetScreenshotDppx.html] [test_browserElement_oop_GetScreenshotDppx.html]
skip-if = (toolkit == 'windows')
[test_browserElement_oop_Iconchange.html] [test_browserElement_oop_Iconchange.html]
[test_browserElement_oop_LoadEvents.html] [test_browserElement_oop_LoadEvents.html]
[test_browserElement_oop_Manifestchange.html] [test_browserElement_oop_Manifestchange.html]

Просмотреть файл

@ -162,7 +162,6 @@ skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_GetScreenshot.html] [test_browserElement_inproc_GetScreenshot.html]
skip-if = (toolkit == 'android' && processor == 'x86') #x86 only skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
[test_browserElement_inproc_GetScreenshotDppx.html] [test_browserElement_inproc_GetScreenshotDppx.html]
skip-if = (toolkit == 'windows')
[test_browserElement_inproc_Iconchange.html] [test_browserElement_inproc_Iconchange.html]
[test_browserElement_inproc_LoadEvents.html] [test_browserElement_inproc_LoadEvents.html]
[test_browserElement_inproc_Manifestchange.html] [test_browserElement_inproc_Manifestchange.html]

Просмотреть файл

@ -39,4 +39,15 @@ interface MozSelfSupport
* Resolved when the FHR payload data has been collected. * Resolved when the FHR payload data has been collected.
*/ */
Promise<object> getHealthReportPayload(); Promise<object> getHealthReportPayload();
/**
* Resets a named pref:
* - if there is a default value, then change the value back to default,
* - if there's no default value, then delete the pref,
* - no-op otherwise.
*
* @param DOMString
* The name of the pref to reset.
*/
void resetPref(DOMString name);
}; };

Просмотреть файл

@ -77,7 +77,7 @@ skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-hyphen-multiple-
== unneeded_scroll.html unneeded_scroll-ref.html == unneeded_scroll.html unneeded_scroll-ref.html
skip-if(B2G||Mulet) == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) == 642800.html 642800-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == 642800.html 642800-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html == selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html != selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html != selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html

Просмотреть файл

@ -54,7 +54,7 @@ skip-if = buildapp == 'b2g'
[test_fixed_bg_scrolling_repaints.html] [test_fixed_bg_scrolling_repaints.html]
skip-if = buildapp == 'b2g' skip-if = buildapp == 'b2g'
[test_leaf_layers_partition_browser_window.xul] [test_leaf_layers_partition_browser_window.xul]
skip-if = (!debug) || (toolkit == "cocoa") || (buildapp == 'b2g') || (toolkit == 'windows') # Disabled on Mac because of Bug 748219 skip-if = (!debug) || (toolkit == "cocoa") || (buildapp == 'b2g') # Disabled on Mac because of Bug 748219
[test_no_clip_iframe.xul] [test_no_clip_iframe.xul]
skip-if = buildapp == 'b2g' skip-if = buildapp == 'b2g'
[test_passpointerevents.html] [test_passpointerevents.html]

Просмотреть файл

@ -47,7 +47,7 @@ load 478219-1.xhtml
load 513113-1.html load 513113-1.html
load 538062-1.xhtml load 538062-1.xhtml
load 570624-1.html load 570624-1.html
skip-if(B2G) skip-if(asyncPanZoom&&winWidget) load 498698-1.html # bug 833371 skip-if(B2G) load 498698-1.html # bug 833371
asserts(1) load 578604-1.html # bug 584564 asserts(1) load 578604-1.html # bug 584564
asserts(4-7) load 590302-1.xhtml # bug 584564 asserts(4-7) load 590302-1.xhtml # bug 584564
load 626014.xhtml load 626014.xhtml

Просмотреть файл

@ -363,7 +363,7 @@ load 496742.html
load 499138.html load 499138.html
load 499862-1.html load 499862-1.html
load 499857-1.html load 499857-1.html
asserts-if(winWidget,0-3) skip-if(asyncPanZoom&&winWidget) load 499885-1.xhtml asserts-if(winWidget,0-3) load 499885-1.xhtml
load 501535-1.html load 501535-1.html
load 503961-1.xhtml load 503961-1.xhtml
load 503961-2.html load 503961-2.html

Просмотреть файл

@ -49,11 +49,11 @@ skip-if((B2G&&browserIsRemote)||Mulet) != table-cell-8.html table-print-1-ref.ht
== continuation-positioned-inline-1.html continuation-positioned-inline-ref.html == continuation-positioned-inline-1.html continuation-positioned-inline-ref.html
== continuation-positioned-inline-2.html continuation-positioned-inline-ref.html == continuation-positioned-inline-2.html continuation-positioned-inline-ref.html
== scrollframe-1.html scrollframe-1-ref.html == scrollframe-1.html scrollframe-1-ref.html
skip-if(B2G||Mulet) fuzzy-if(Android,9,185) skip-if(asyncPanZoom&&winWidget) == scrollframe-2.html scrollframe-2-ref.html #bug 756530 # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fuzzy-if(Android,9,185) == scrollframe-2.html scrollframe-2-ref.html #bug 756530 # Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(gtk2Widget,1,8) == select-1.html select-1-ref.html fuzzy-if(gtk2Widget,1,8) == select-1.html select-1-ref.html
fuzzy-if(gtk2Widget,1,8) == select-1-dynamic.html select-1-ref.html fuzzy-if(gtk2Widget,1,8) == select-1-dynamic.html select-1-ref.html
== select-2.html select-2-ref.html == select-2.html select-2-ref.html
fuzzy-if(gtk2Widget,1,19) fuzzy-if(Android||B2G,17,726) skip-if(asyncPanZoom&&winWidget) == select-3.html select-3-ref.html fuzzy-if(gtk2Widget,1,19) fuzzy-if(Android||B2G,17,726) == select-3.html select-3-ref.html
== multi-column-1.html multi-column-1-ref.html == multi-column-1.html multi-column-1-ref.html
== button-1.html button-1-ref.html == button-1.html button-1-ref.html
== button-2.html button-2-ref.html == button-2.html button-2-ref.html

Просмотреть файл

@ -36,7 +36,7 @@ fails-if(Android||B2G) == center-scaling-3.html center-scaling-3-ref.html # Andr
== border-image-outset-1c.html border-image-outset-1-ref.html == border-image-outset-1c.html border-image-outset-1-ref.html
== border-image-nofill-1.html border-image-nofill-1-ref.html == border-image-nofill-1.html border-image-nofill-1-ref.html
== border-image-outset-resize-1.html border-image-outset-resize-1-ref.html == border-image-outset-resize-1.html border-image-outset-resize-1-ref.html
skip-if(asyncPanZoom&&winWidget) == border-image-outset-move-1.html border-image-outset-move-1-ref.html == border-image-outset-move-1.html border-image-outset-move-1-ref.html
== border-image-style-none.html border-image-style-none-ref.html == border-image-style-none.html border-image-style-none-ref.html
== border-image-style-none-length.html border-image-style-none-length-ref.html == border-image-style-none-length.html border-image-style-none-length-ref.html
== border-image-style-none-auto.html border-image-style-none-auto-ref.html == border-image-style-none-auto.html border-image-style-none-auto-ref.html

Просмотреть файл

@ -71,7 +71,7 @@ fuzzy-if(azureQuartz,1,3) skip-if(B2G||Mulet) == invalidate-1a.html invalidate-1
fuzzy-if(azureQuartz,1,3) skip-if(B2G||Mulet) == invalidate-1b.html invalidate-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop fuzzy-if(azureQuartz,1,3) skip-if(B2G||Mulet) == invalidate-1b.html invalidate-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
# test that border-radius is reduced for scrollbars # test that border-radius is reduced for scrollbars
skip-if(B2G||Mulet) fails-if(Android) skip-if(asyncPanZoom&&winWidget) == scrollbar-clamping-1.html scrollbar-clamping-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) == scrollbar-clamping-1.html scrollbar-clamping-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) fails-if(Android) == scrollbar-clamping-2.html scrollbar-clamping-2-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) == scrollbar-clamping-2.html scrollbar-clamping-2-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
# Test for bad corner joins. # Test for bad corner joins.

Просмотреть файл

@ -88,7 +88,7 @@ fuzzy-if(gtk2Widget,6,26200) == 28811-2b.html 28811-2-ref.html # Bug 1128229
!= 82711-1-ref.html 82711-2-ref.html != 82711-1-ref.html 82711-2-ref.html
!= 82711-1-ref.html 82711-3-ref.html != 82711-1-ref.html 82711-3-ref.html
!= 82711-2-ref.html 82711-3-ref.html != 82711-2-ref.html 82711-3-ref.html
skip-if(asyncPanZoom&&winWidget) == 84400-1.html 84400-1-ref.html == 84400-1.html 84400-1-ref.html
== 84400-2.html 84400-2-ref.html == 84400-2.html 84400-2-ref.html
== 97777-1.html 97777-1-ref.html == 97777-1.html 97777-1-ref.html
== 97777-2.html 97777-2-ref.html == 97777-2.html 97777-2-ref.html
@ -1404,7 +1404,7 @@ skip-if(B2G||Mulet) == 502447-1.html 502447-1-ref.html # Initial mulet triage: p
needs-focus fails == 503531-1.html 503531-1-ref.html needs-focus fails == 503531-1.html 503531-1-ref.html
== 504032-1.html 504032-1-ref.html == 504032-1.html 504032-1-ref.html
== 505743-1.html about:blank == 505743-1.html about:blank
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) fuzzy-if(Android,5,2800) == 506481-1.html 506481-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fuzzy-if(Android,5,2800) == 506481-1.html 506481-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== 507187-1.html 507187-1-ref.html == 507187-1.html 507187-1-ref.html
== 507487-1.html 507487-1-ref.html == 507487-1.html 507487-1-ref.html
== 507487-2.xhtml 507487-2-ref.xhtml == 507487-2.xhtml 507487-2-ref.xhtml
@ -1417,7 +1417,7 @@ skip-if(B2G||Mulet) == 508816-2.html 508816-2-ref.html # Initial mulet triage: p
skip-if((B2G&&browserIsRemote)||Mulet) == 508908-1.xul 508908-1-ref.xul # bug 974780 # Initial mulet triage: parity with B2G/B2G Desktop skip-if((B2G&&browserIsRemote)||Mulet) == 508908-1.xul 508908-1-ref.xul # bug 974780 # Initial mulet triage: parity with B2G/B2G Desktop
== 508919-1.xhtml 508919-1-ref.xhtml == 508919-1.xhtml 508919-1-ref.xhtml
== 509155-1.xhtml 509155-1-ref.xhtml == 509155-1.xhtml 509155-1-ref.xhtml
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) fuzzy-if(Android,5,1656) == 512410.html 512410-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fuzzy-if(Android,5,1656) == 512410.html 512410-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== 512631-1.html 512631-1-ref.html == 512631-1.html 512631-1-ref.html
== 513153-1a.html 513153-1-ref.html == 513153-1a.html 513153-1-ref.html
== 513153-1b.html 513153-1-ref.html == 513153-1b.html 513153-1-ref.html
@ -1491,7 +1491,7 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
== 550325-2.html 550325-1-ref.html == 550325-2.html 550325-1-ref.html
== 550325-3.html 550325-1-ref.html == 550325-3.html 550325-1-ref.html
== 550716-1.html 550716-1-ref.html == 550716-1.html 550716-1-ref.html
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) fuzzy-if(Android&&AndroidVersion>=15,12,300) == 551463-1.html 551463-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fuzzy-if(Android&&AndroidVersion>=15,12,300) == 551463-1.html 551463-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== 551699-1.html 551699-1-ref.html == 551699-1.html 551699-1-ref.html
== 552334-1.html 552334-1-ref.html == 552334-1.html 552334-1-ref.html
# Bug 553571 was specific to MS Indic shaping behavior and Win7 font support; # Bug 553571 was specific to MS Indic shaping behavior and Win7 font support;
@ -1575,7 +1575,7 @@ random-if(!winWidget) fails-if(winWidget&&!d2d) random-if(winWidget&&d2d) != 574
skip-if(!haveTestPlugin) skip-if(B2G||Mulet) fails-if(Android) == 579808-1.html 579808-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(!haveTestPlugin) skip-if(B2G||Mulet) fails-if(Android) == 579808-1.html 579808-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) fails-if(Android) random-if(layersGPUAccelerated) == 579985-1.html 579985-1-ref.html # bug 623452 for WinXP; this bug was only for a regression in BasicLayers anyway # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) random-if(layersGPUAccelerated) == 579985-1.html 579985-1-ref.html # bug 623452 for WinXP; this bug was only for a regression in BasicLayers anyway # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) skip-if(Android) == 580160-1.html 580160-1-ref.html # bug 920927 for Android; issues without the test-plugin # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) skip-if(Android) == 580160-1.html 580160-1-ref.html # bug 920927 for Android; issues without the test-plugin # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(asyncPanZoom&&winWidget) HTTP(..) == 580863-1.html 580863-1-ref.html HTTP(..) == 580863-1.html 580863-1-ref.html
skip-if(B2G||Mulet) fails-if(Android) random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== 581579-1.html 581579-1-ref.html == 581579-1.html 581579-1-ref.html
== 582037-1a.html 582037-1-ref.html == 582037-1a.html 582037-1-ref.html
@ -1667,11 +1667,11 @@ random == 637597-1.html 637597-1-ref.html # bug 637597 was never really fixed!
fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-1.html 637852-1-ref.html fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-1.html 637852-1-ref.html
fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-2.html 637852-2-ref.html fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-2.html 637852-2-ref.html
fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-3.html 637852-3-ref.html fuzzy-if(Android&&AndroidVersion>=15,8,500) == 637852-3.html 637852-3-ref.html
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) == 641770-1.html 641770-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == 641770-1.html 641770-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== 641856-1.html 641856-1-ref.html == 641856-1.html 641856-1-ref.html
== 645491-1.html 645491-1-ref.html == 645491-1.html 645491-1-ref.html
== 645768-1.html 645768-1-ref.html == 645768-1.html 645768-1-ref.html
fails-if(layersGPUAccelerated&&cocoaWidget) fails-if(Android&&AndroidVersion<15&&AndroidVersion!=10) skip-if(asyncPanZoom&&winWidget) == 650228-1.html 650228-1-ref.html # Quartz alpha blending doesn't match GL alpha blending fails-if(layersGPUAccelerated&&cocoaWidget) fails-if(Android&&AndroidVersion<15&&AndroidVersion!=10) == 650228-1.html 650228-1-ref.html # Quartz alpha blending doesn't match GL alpha blending
needs-focus == 652301-1a.html 652301-1-ref.html needs-focus == 652301-1a.html 652301-1-ref.html
needs-focus == 652301-1b.html 652301-1-ref.html needs-focus == 652301-1b.html 652301-1-ref.html
== 652775-1.html 652775-1-ref.html == 652775-1.html 652775-1-ref.html
@ -1756,7 +1756,7 @@ skip-if(B2G||Mulet) fuzzy-if(Android,4,400) == 815593-1.html 815593-1-ref.html #
== 816948-1.html 816948-1-ref.html == 816948-1.html 816948-1-ref.html
== 817019-1.html about:blank == 817019-1.html about:blank
skip-if(B2G||Mulet) == 818276-1.html 818276-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == 818276-1.html 818276-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(asyncPanZoom&&!winWidget,190,27) skip-if(asyncPanZoom&&winWidget) == 825999.html 825999-ref.html fuzzy-if(asyncPanZoom,190,27) == 825999.html 825999-ref.html
== 827577-1a.html 827577-1-ref.html == 827577-1a.html 827577-1-ref.html
== 827577-1b.html 827577-1-ref.html == 827577-1b.html 827577-1-ref.html
== 827799-1.html about:blank == 827799-1.html about:blank
@ -1806,7 +1806,7 @@ fuzzy-if(B2G,1,7) == 942672-1.html 942672-1-ref.html
== 961887-1.html 961887-1-ref.html == 961887-1.html 961887-1-ref.html
== 961887-2.html 961887-2-ref.html == 961887-2.html 961887-2-ref.html
== 961887-3.html 961887-3-ref.html == 961887-3.html 961887-3-ref.html
pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,145) skip-if(asyncPanZoom&&winWidget) == 966992-1.html 966992-1-ref.html pref(layout.css.overflow-clip-box.enabled,true) fuzzy(50,145) == 966992-1.html 966992-1-ref.html
skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed skip-if(Android) == 966510-1.html 966510-1-ref.html # scrollable elements other than the root probably won't work well on android until bug 776030 is fixed
skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above skip-if(Android) == 966510-2.html 966510-2-ref.html # same as above
== 978911-1.svg 978911-1-ref.svg == 978911-1.svg 978911-1-ref.svg

Просмотреть файл

@ -10,7 +10,7 @@ needs-focus == select-required-invalid-changed-1.html select-required-ref.html
needs-focus == select-required-invalid-changed-2.html select-required-ref.html needs-focus == select-required-invalid-changed-2.html select-required-ref.html
needs-focus == select-required-valid.html select-required-ref.html needs-focus == select-required-valid.html select-required-ref.html
needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html
skip-if(asyncPanZoom&&winWidget) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-ref.html needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-ref.html
needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html
skip-if(B2G||Mulet) fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) fails-if(Android) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) fails-if(Android) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop

Просмотреть файл

@ -11,7 +11,7 @@ needs-focus == select-required-valid-changed-1.html select-required-ref.html
needs-focus == select-required-valid-changed-2.html select-required-ref.html needs-focus == select-required-valid-changed-2.html select-required-ref.html
needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html
needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html
fuzzy(64,4) skip-if(asyncPanZoom&&winWidget) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-ref.html fuzzy(64,4) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-ref.html
fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html

Просмотреть файл

@ -37,7 +37,7 @@ test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceE
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == textarea-3.html textarea-3-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == textarea-3.html textarea-3-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-1.html css-transform-1-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-1.html css-transform-1-ref.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-2.html css-transform-2-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == css-transform-2.html css-transform-2-ref.html
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == container-with-clamping.html container-with-clamping-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == container-with-clamping.html container-with-clamping-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) load video-1.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) load video-1.html
test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-min-1.html intrinsic-min-1-ref.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-min-1.html intrinsic-min-1-ref.html
skip-if(B2G||Mulet) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-max-1.html intrinsic-max-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) HTTP(..) == intrinsic-max-1.html intrinsic-max-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop

Просмотреть файл

@ -5,7 +5,7 @@
== fieldset-scroll-1.html fieldset-scroll-1-ref.html == fieldset-scroll-1.html fieldset-scroll-1-ref.html
== fieldset-scrolled-1.html fieldset-scrolled-1-ref.html == fieldset-scrolled-1.html fieldset-scrolled-1-ref.html
random-if(B2G||Mulet) == fieldset-overflow-auto-1.html fieldset-overflow-auto-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop random-if(B2G||Mulet) == fieldset-overflow-auto-1.html fieldset-overflow-auto-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(winWidget&&!layersGPUAccelerated,102,205) skip-if(asyncPanZoom&&winWidget) == positioned-container-1.html positioned-container-1-ref.html fuzzy-if(winWidget&&!layersGPUAccelerated,102,205) == positioned-container-1.html positioned-container-1-ref.html
== relpos-legend-1.html relpos-legend-1-ref.html == relpos-legend-1.html relpos-legend-1-ref.html
== relpos-legend-2.html relpos-legend-2-ref.html == relpos-legend-2.html relpos-legend-2-ref.html
test-pref(layout.css.sticky.enabled,true) skip-if((B2G&&browserIsRemote)||Mulet) == sticky-legend-1.html sticky-legend-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop test-pref(layout.css.sticky.enabled,true) skip-if((B2G&&browserIsRemote)||Mulet) == sticky-legend-1.html sticky-legend-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop

Просмотреть файл

@ -1,5 +1,5 @@
== bounds-1.html bounds-1-ref.html == bounds-1.html bounds-1-ref.html
skip-if(asyncPanZoom&&winWidget) == size-1.html size-1-ref.html == size-1.html size-1-ref.html
skip-if(B2G||Mulet) == size-2.html size-2-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == size-2.html size-2-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
HTTP(..) == baseline-1.html baseline-1-ref.html HTTP(..) == baseline-1.html baseline-1-ref.html
skip-if((B2G&&browserIsRemote)||Mulet) HTTP(..) == centering-1.xul centering-1-ref.xul # bug 974780 # Initial mulet triage: parity with B2G/B2G Desktop skip-if((B2G&&browserIsRemote)||Mulet) HTTP(..) == centering-1.xul centering-1-ref.xul # bug 974780 # Initial mulet triage: parity with B2G/B2G Desktop

Просмотреть файл

@ -16,8 +16,8 @@
== placeholder-3.html placeholder-overridden-ref.html == placeholder-3.html placeholder-overridden-ref.html
== placeholder-4.html placeholder-overridden-ref.html == placeholder-4.html placeholder-overridden-ref.html
== placeholder-5.html placeholder-visible-ref.html == placeholder-5.html placeholder-visible-ref.html
skip-if(asyncPanZoom&&winWidget) == placeholder-6.html placeholder-overflow-ref.html fuzzy-if(winWidget,160,7) == placeholder-6.html placeholder-overflow-ref.html
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == placeholder-6-textarea.html placeholder-overflow-textarea-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
# needs-focus == placeholder-7.html placeholder-focus-ref.html # needs-focus == placeholder-7.html placeholder-focus-ref.html
# needs-focus == placeholder-8.html placeholder-focus-ref.html # needs-focus == placeholder-8.html placeholder-focus-ref.html
# needs-focus == placeholder-9.html placeholder-focus-ref.html # needs-focus == placeholder-9.html placeholder-focus-ref.html

Просмотреть файл

@ -10,5 +10,5 @@ skip-if(B2G||Mulet) fails-if(Android) fails-if(gtk2Widget) != rtl.html no-resize
== rtl.html rtl-dynamic-style.html == rtl.html rtl-dynamic-style.html
== rtl.html in-dynamic-rtl-doc.html == rtl.html in-dynamic-rtl-doc.html
== setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html == setvalue-framereconstruction-1.html setvalue-framereconstruction-ref.html
skip-if(asyncPanZoom&&winWidget) == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html == padding-scrollbar-placement.html padding-scrollbar-placement-ref.html
== various-cols.html various-cols-ref.html == various-cols.html various-cols-ref.html

Просмотреть файл

@ -73,7 +73,7 @@ fuzzy(1,1) == image-orientation-generated-content.html?270&flip image-orientat
fuzzy(1,1) == image-orientation-background.html?from-image image-orientation-ref.html?0 fuzzy(1,1) == image-orientation-background.html?from-image image-orientation-ref.html?0
fuzzy(1,1) == image-orientation-background.html?90&flip image-orientation-ref.html?0 fuzzy(1,1) == image-orientation-background.html?90&flip image-orientation-ref.html?0
== image-orientation-border-image.html?from-image image-orientation-border-image.html?0 == image-orientation-border-image.html?from-image image-orientation-border-image.html?0
skip-if(asyncPanZoom&&winWidget) == image-orientation-border-image.html?90&flip image-orientation-border-image.html?0 == image-orientation-border-image.html?90&flip image-orientation-border-image.html?0
== image-orientation-list-style-image.html?from-image image-orientation-list-style-image.html?0 == image-orientation-list-style-image.html?from-image image-orientation-list-style-image.html?0
== image-orientation-list-style-image.html?90&flip image-orientation-list-style-image.html?0 == image-orientation-list-style-image.html?90&flip image-orientation-list-style-image.html?0

Просмотреть файл

@ -6,8 +6,8 @@ skip-if((B2G&&browserIsRemote)||Mulet) == 540247-1.xul 540247-1-ref.xul # bug 9
skip-if((B2G&&browserIsRemote)||Mulet) == 543681-1.html 543681-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if((B2G&&browserIsRemote)||Mulet) == 543681-1.html 543681-1-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== test-image-layers.html test-image-layers-ref.html == test-image-layers.html test-image-layers-ref.html
random-if(B2G||Mulet) == test-image-layers-multiple-displayitem.html test-image-layers-ref.html # Initial mulet triage: parity with B2G/B2G Desktop random-if(B2G||Mulet) == test-image-layers-multiple-displayitem.html test-image-layers-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
pref(layout.animated-image-layers.enabled,true) random-if(Android||gtk2Widget) == test-animated-image-layers.html test-animated-image-layers-ref.html pref(layout.animated-image-layers.enabled,true) skip-if(Android||gtk2Widget) == test-animated-image-layers.html test-animated-image-layers-ref.html
pref(layout.animated-image-layers.enabled,true) random-if(Android||gtk2Widget) == test-animated-image-layers-background.html test-animated-image-layers-ref.html pref(layout.animated-image-layers.enabled,true) skip-if(Android||gtk2Widget) == test-animated-image-layers-background.html test-animated-image-layers-ref.html
== box-shadow-border-radius.html box-shadow-border-radius-ref.html == box-shadow-border-radius.html box-shadow-border-radius-ref.html
== filter-userspace-offset.svg?offsetContainer=rect filter-userspace-offset.svg == filter-userspace-offset.svg?offsetContainer=rect filter-userspace-offset.svg
== filter-userspace-offset.svg?offsetContainer=use filter-userspace-offset.svg == filter-userspace-offset.svg?offsetContainer=use filter-userspace-offset.svg
@ -61,6 +61,6 @@ pref(layout.animated-image-layers.enabled,true) random-if(Android||gtk2Widget) =
!= layer-splitting-2.html about:blank != layer-splitting-2.html about:blank
!= layer-splitting-3.html about:blank != layer-splitting-3.html about:blank
!= layer-splitting-4.html about:blank != layer-splitting-4.html about:blank
skip-if(asyncPanZoom&&winWidget) != layer-splitting-5.html about:blank != layer-splitting-5.html about:blank
skip-if(asyncPanZoom&&winWidget) != layer-splitting-6.html about:blank != layer-splitting-6.html about:blank
!= layer-splitting-7.html about:blank != layer-splitting-7.html about:blank

Просмотреть файл

@ -1,21 +1,20 @@
== move-to-background-1.html move-to-background-1-ref.html == move-to-background-1.html move-to-background-1-ref.html
fuzzy-if(cocoaWidget,2,6) random-if(Android&&!browserIsRemote) == component-alpha-exit-1.html component-alpha-exit-1-ref.html # bug 760275 fuzzy-if(cocoaWidget,2,6) random-if(Android&&!browserIsRemote) == component-alpha-exit-1.html component-alpha-exit-1-ref.html # bug 760275
!= pull-background-1.html about:blank
skip-if(asyncPanZoom) != pull-background-1.html about:blank != pull-background-2.html about:blank
skip-if(asyncPanZoom) != pull-background-2.html about:blank != pull-background-3.html about:blank
skip-if(asyncPanZoom) != pull-background-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515 != pull-background-4.html about:blank
skip-if(asyncPanZoom) != pull-background-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
skip-if(asyncPanZoom) != pull-background-5.html about:blank # Fails with event regions, bug 1150941 skip-if(asyncPanZoom) != pull-background-5.html about:blank # Fails with event regions, bug 1150941
skip-if(asyncPanZoom) != pull-background-6.html about:blank != pull-background-6.html about:blank
# The animated-position tests are disabled for intermittent failures / passes, bug 1150941 # The animated-position tests are disabled for intermittent failures / passes, bug 1150941
skip != pull-background-animated-position-1.html about:blank # Fails with event regions skip != pull-background-animated-position-1.html about:blank # Fails with event regions
skip != pull-background-animated-position-2.html about:blank skip != pull-background-animated-position-2.html about:blank
skip != pull-background-animated-position-3.html about:blank # Fails because PaintedLayer item assignment doesn't recognize overflow:hidden clips skip != pull-background-animated-position-3.html about:blank # Fails because PaintedLayer item assignment doesn't recognize overflow:hidden clips
skip != pull-background-animated-position-4.html about:blank # Fails because PaintedLayer item assignment and background pulling don't recognize overflow:hidden clips skip != pull-background-animated-position-4.html about:blank # Fails because PaintedLayer item assignment and background pulling don't recognize overflow:hidden clips
skip != pull-background-animated-position-5.html about:blank # Fails because ownLayer bounds don't anticipate changes of animated contents, but doesn't fail with event regions skip != pull-background-animated-position-5.html about:blank # Fails because ownLayer bounds don't anticipate changes of animated contents, but doesn't fail with event regions
skip-if(!asyncPanZoom) skip-if(asyncPanZoom) != pull-background-displayport-1.html about:blank skip-if(!asyncPanZoom) != pull-background-displayport-1.html about:blank
skip-if(!asyncPanZoom) skip-if(asyncPanZoom) != pull-background-displayport-2.html about:blank skip-if(!asyncPanZoom) != pull-background-displayport-2.html about:blank
skip-if(!asyncPanZoom) skip-if(asyncPanZoom) != pull-background-displayport-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515 skip-if(!asyncPanZoom) != pull-background-displayport-3.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
skip-if(!asyncPanZoom) skip-if(asyncPanZoom) != pull-background-displayport-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515 skip-if(!asyncPanZoom) != pull-background-displayport-4.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515
fails skip-if(!asyncPanZoom) != pull-background-displayport-5.html about:blank # bug 1147673 fails skip-if(!asyncPanZoom) != pull-background-displayport-5.html about:blank # bug 1147673
skip-if(!asyncPanZoom) skip-if(asyncPanZoom) != pull-background-displayport-6.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515 skip-if(!asyncPanZoom) != pull-background-displayport-6.html about:blank # fails with non-overlay scrollbars and event regions due to bug 1148515

Просмотреть файл

@ -1,5 +1,5 @@
skip-if(asyncPanZoom&&winWidget) fuzzy-if(cocoaWidget,1,2) fuzzy-if(d2d,47,26) == move-right-bottom.html move-right-bottom-ref.html fuzzy-if(cocoaWidget,1,2) fuzzy-if(d2d,47,26) == move-right-bottom.html move-right-bottom-ref.html
skip-if(asyncPanZoom&&winWidget) fuzzy-if(cocoaWidget,1,2) == move-top-left.html move-top-left-ref.html # Bug 688545 fuzzy-if(cocoaWidget,1,2) == move-top-left.html move-top-left-ref.html # Bug 688545
skip-if(asyncPanZoom&&winWidget) fuzzy-if(cocoaWidget,1,3) == move-right-bottom-table.html move-right-bottom-table-ref.html fuzzy-if(cocoaWidget,1,3) == move-right-bottom-table.html move-right-bottom-table-ref.html
skip-if(asyncPanZoom&&winWidget) fuzzy-if(cocoaWidget,1,3) == move-top-left-table.html move-top-left-table-ref.html # Bug 688545 fuzzy-if(cocoaWidget,1,3) == move-top-left-table.html move-top-left-table-ref.html # Bug 688545
== percent.html percent-ref.html == percent.html percent-ref.html

Просмотреть файл

@ -19,7 +19,7 @@ include w3c-css/received/reftest.list
include abs-pos/reftest.list include abs-pos/reftest.list
include position-relative/reftest.list include position-relative/reftest.list
skip-if(asyncPanZoom&&winWidget) include async-scrolling/reftest.list include async-scrolling/reftest.list
# backgrounds/ # backgrounds/
include backgrounds/reftest.list include backgrounds/reftest.list

Просмотреть файл

@ -15,7 +15,7 @@ skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.s
skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-3.html scroll-behavior-3.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-3.html scroll-behavior-3.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables
skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-4.html scroll-behavior-4.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-4.html scroll-behavior-4.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables
skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-5.html scroll-behavior-5.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables skip-if(Mulet) skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-5.html scroll-behavior-5.html?ref # see bug 1041833 # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables
skip-if(Android) skip-if(asyncPanZoom&&winWidget) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-6.html scroll-behavior-6.html?ref # see bug 1041833 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-6.html scroll-behavior-6.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-7.html scroll-behavior-7.html?ref # see bug 1041833 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-7.html scroll-behavior-7.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-8.html scroll-behavior-8.html?ref # see bug 1041833 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-8.html scroll-behavior-8.html?ref # see bug 1041833
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-9.html scroll-behavior-9.html?ref # see bug 1041833 skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-9.html scroll-behavior-9.html?ref # see bug 1041833
@ -27,11 +27,11 @@ skip-if(B2G||Mulet) fuzzy-if(Android&&AndroidVersion<15,251,722) fuzzy-if(d2d,1,
HTTP == transformed-1.html?up transformed-1.html?ref HTTP == transformed-1.html?up transformed-1.html?ref
fuzzy-if(Android,5,20000) == uncovering-1.html uncovering-1-ref.html fuzzy-if(Android,5,20000) == uncovering-1.html uncovering-1-ref.html
fuzzy-if(Android,5,20000) == uncovering-2.html uncovering-2-ref.html fuzzy-if(Android,5,20000) == uncovering-2.html uncovering-2-ref.html
skip-if(B2G||Mulet) skip-if(asyncPanZoom&&winWidget) == less-than-scrollbar-height.html less-than-scrollbar-height-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == less-than-scrollbar-height.html less-than-scrollbar-height-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == huge-horizontal-overflow.html huge-horizontal-overflow-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == huge-horizontal-overflow.html huge-horizontal-overflow-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == huge-vertical-overflow.html huge-vertical-overflow-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) == huge-vertical-overflow.html huge-vertical-overflow-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== iframe-scrolling-attr-1.html iframe-scrolling-attr-ref.html == iframe-scrolling-attr-1.html iframe-scrolling-attr-ref.html
skip-if((B2G&&browserIsRemote)||Mulet) == iframe-scrolling-attr-2.html iframe-scrolling-attr-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if((B2G&&browserIsRemote)||Mulet) == iframe-scrolling-attr-2.html iframe-scrolling-attr-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(asyncPanZoom&&winWidget) == frame-scrolling-attr-1.html frame-scrolling-attr-ref.html == frame-scrolling-attr-1.html frame-scrolling-attr-ref.html
skip-if(asyncPanZoom&&winWidget) == frame-scrolling-attr-2.html frame-scrolling-attr-ref.html == frame-scrolling-attr-2.html frame-scrolling-attr-ref.html
== move-item.html move-item-ref.html # bug 1125750 == move-item.html move-item-ref.html # bug 1125750

Просмотреть файл

@ -22,5 +22,5 @@ skip-if(B2G||Mulet) HTTP(..) == table-cell.html table-cell-ref.html # Initial mu
skip-if(Mulet) HTTP(..) == two-value-syntax.html two-value-syntax-ref.html # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables skip-if(Mulet) HTTP(..) == two-value-syntax.html two-value-syntax-ref.html # MULET: Bug 1144079: Re-enable Mulet mochitests and reftests taskcluster-specific disables
skip-if(B2G||Mulet) HTTP(..) == single-value.html single-value-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) HTTP(..) == single-value.html single-value-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) HTTP(..) == atomic-under-marker.html atomic-under-marker-ref.html # Initial mulet triage: parity with B2G/B2G Desktop skip-if(B2G||Mulet) HTTP(..) == atomic-under-marker.html atomic-under-marker-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
fuzzy(1,702) skip-if(Android||B2G||Mulet) skip-if(asyncPanZoom&&winWidget) HTTP(..) == xulscroll.html xulscroll-ref.html # Initial mulet triage: parity with B2G/B2G Desktop fuzzy(1,702) skip-if(Android||B2G||Mulet) HTTP(..) == xulscroll.html xulscroll-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
HTTP(..) == combobox-zoom.html combobox-zoom-ref.html HTTP(..) == combobox-zoom.html combobox-zoom-ref.html

Просмотреть файл

@ -40,7 +40,7 @@ public class TabQueueDispatcher extends Locales.LocaleAwareActivity {
// the tab queue build flag. // the tab queue build flag.
if (!AppConstants.MOZ_ANDROID_TAB_QUEUE) { if (!AppConstants.MOZ_ANDROID_TAB_QUEUE) {
loadNormally(intent.getUnsafe()); loadNormally(intent.getUnsafe());
finish(); return;
} }
// The URL is usually hiding somewhere in the extra text. Extract it. // The URL is usually hiding somewhere in the extra text. Extract it.
@ -50,13 +50,6 @@ public class TabQueueDispatcher extends Locales.LocaleAwareActivity {
return; return;
} }
// TODO: This code is shared with ShareDialog - we should extract this to a helper class.
final String pageUrl = new WebURLFinder(dataString).bestWebURL();
if (TextUtils.isEmpty(pageUrl)) {
abortDueToNoURL(dataString);
return;
}
boolean shouldShowOpenInBackgroundToast = GeckoSharedPrefs.forApp(this).getBoolean(GeckoPreferences.PREFS_TAB_QUEUE, false); boolean shouldShowOpenInBackgroundToast = GeckoSharedPrefs.forApp(this).getBoolean(GeckoPreferences.PREFS_TAB_QUEUE, false);
if (shouldShowOpenInBackgroundToast) { if (shouldShowOpenInBackgroundToast) {

Просмотреть файл

@ -478,17 +478,10 @@ pref("media.video_stats.enabled", true);
pref("media.audio_data.enabled", false); pref("media.audio_data.enabled", false);
// Whether to use async panning and zooming // Whether to use async panning and zooming
#ifdef XP_WIN
pref("layers.async-pan-zoom.enabled", true);
// Workaround a bug where inactive scrollframes test this pref directly.
pref("layout.event-regions.enabled", true);
#else
pref("layers.async-pan-zoom.enabled", false); pref("layers.async-pan-zoom.enabled", false);
// Whether to enable event region building during painting // Whether to enable event region building during painting
pref("layout.event-regions.enabled", false); pref("layout.event-regions.enabled", false);
#endif
// APZ preferences. For documentation/details on what these prefs do, check // APZ preferences. For documentation/details on what these prefs do, check
// gfx/layers/apz/src/AsyncPanZoomController.cpp. // gfx/layers/apz/src/AsyncPanZoomController.cpp.

Просмотреть файл

@ -23,11 +23,11 @@ this.initTestLogging = function initTestLogging(level) {
this.errorsLogged += 1; this.errorsLogged += 1;
} }
return message.loggerName + "\t" + message.levelDesc + "\t" + return message.time + "\t" + message.loggerName + "\t" + message.levelDesc + "\t" +
message.message + "\n"; this.formatText(message) + "\n";
} }
}; };
LogStats.prototype.__proto__ = new Log.Formatter(); LogStats.prototype.__proto__ = new Log.BasicFormatter();
let log = Log.repository.rootLogger; let log = Log.repository.rootLogger;
let logStats = new LogStats(); let logStats = new LogStats();

Просмотреть файл

@ -198,7 +198,7 @@ function addPageBook(aURI, aTitle, aBook, aTags, aKey, aTransitionType, aNoVisit
gNextTestSetupTasks.push([task_addPageBook, arguments]); gNextTestSetupTasks.push([task_addPageBook, arguments]);
} }
function task_addPageBook(aURI, aTitle, aBook, aTags, aKey, aTransitionType, aNoVisit) function* task_addPageBook(aURI, aTitle, aBook, aTags, aKey, aTransitionType, aNoVisit)
{ {
// Add a page entry for the current uri // Add a page entry for the current uri
gPages[aURI] = [aURI, aBook != undefined ? aBook : aTitle, aTags]; gPages[aURI] = [aURI, aBook != undefined ? aBook : aTitle, aTags];
@ -230,7 +230,7 @@ function task_addPageBook(aURI, aTitle, aBook, aTags, aKey, aTransitionType, aNo
// Add a keyword to the bookmark if we need to // Add a keyword to the bookmark if we need to
if (aKey != undefined) if (aKey != undefined)
bmsvc.setKeywordForBookmark(bmid, aKey); yield PlacesUtils.keywords.insert({url: uri.spec, keyword: aKey});
// Add tags if we need to // Add tags if we need to
if (aTags != undefined && aTags.length > 0) { if (aTags != undefined && aTags.length > 0) {

Просмотреть файл

@ -67,18 +67,16 @@ add_task(function () {
let count = getPlacesItemsCount(); let count = getPlacesItemsCount();
// Create Bookmark // Create Bookmark
let bookmarkTitle = "title " + windowsToClose.length; let title = "title " + windowsToClose.length;
let bookmarkKeyword = "keyword " + windowsToClose.length; let keyword = "keyword " + windowsToClose.length;
let bookmarkUri = NetUtil.newURI("http://test-a-" + windowsToClose.length + ".com/"); let url = "http://test-a-" + windowsToClose.length + ".com/";
let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.bookmarksMenuFolderId, yield PlacesUtils.bookmarks.insert({ url, title,
bookmarkUri, parentGuid: PlacesUtils.bookmarks.menuGuid });
PlacesUtils.bookmarks.DEFAULT_INDEX, yield PlacesUtils.keywords.insert({ url, keyword });
bookmarkTitle);
PlacesUtils.bookmarks.setKeywordForBookmark(id, bookmarkKeyword);
count++; count++;
ok(PlacesUtils.bookmarks.isBookmarked(bookmarkUri), ok((yield PlacesUtils.bookmarks.fetch({ url })),
"Bookmark should be bookmarked, data should be retrievable"); "Bookmark should be bookmarked, data should be retrievable");
is(getPlacesItemsCount(), count, is(getPlacesItemsCount(), count,
"Check the new bookmark items count"); "Check the new bookmark items count");

Просмотреть файл

@ -133,7 +133,7 @@ function task_populateDB(aArray)
if (qdata.isFolder) { if (qdata.isFolder) {
yield PlacesUtils.bookmarks.insert({ yield PlacesUtils.bookmarks.insert({
parentGuid: (yield PlacesUtils.promiseItemGuid(qdata.parentFolder)), parentGuid: qdata.parentGuid,
type: PlacesUtils.bookmarks.TYPE_FOLDER, type: PlacesUtils.bookmarks.TYPE_FOLDER,
title: qdata.title, title: qdata.title,
index: qdata.index index: qdata.index
@ -141,17 +141,17 @@ function task_populateDB(aArray)
} }
if (qdata.isLivemark) { if (qdata.isLivemark) {
PlacesUtils.livemarks.addLivemark({ title: qdata.title yield PlacesUtils.livemarks.addLivemark({ title: qdata.title
, parentId: qdata.parentFolder , parentId: (yield PlacesUtils.promiseItemId(qdata.parentGuid))
, index: qdata.index , index: qdata.index
, feedURI: uri(qdata.feedURI) , feedURI: uri(qdata.feedURI)
, siteURI: uri(qdata.uri) , siteURI: uri(qdata.uri)
}).then(null, do_throw); });
} }
if (qdata.isBookmark) { if (qdata.isBookmark) {
let data = { let data = {
parentGuid: (yield PlacesUtils.promiseItemGuid(qdata.parentFolder)), parentGuid: qdata.parentGuid,
index: qdata.index, index: qdata.index,
title: qdata.title, title: qdata.title,
url: qdata.uri url: qdata.uri
@ -168,8 +168,8 @@ function task_populateDB(aArray)
let item = yield PlacesUtils.bookmarks.insert(data); let item = yield PlacesUtils.bookmarks.insert(data);
if (qdata.keyword) { if (qdata.keyword) {
let itemId = yield PlacesUtils.promiseItemId(item.guid); yield PlacesUtils.keywords.insert({ url: qdata.uri,
PlacesUtils.bookmarks.setKeywordForBookmark(itemId, qdata.keyword); keyword: qdata.keyword });
} }
} }
@ -179,7 +179,7 @@ function task_populateDB(aArray)
if (qdata.isSeparator) { if (qdata.isSeparator) {
yield PlacesUtils.bookmarks.insert({ yield PlacesUtils.bookmarks.insert({
parentGuid: (yield PlacesUtils.promiseItemGuid(qdata.parentFolder)), parentGuid: qdata.parentGuid,
type: PlacesUtils.bookmarks.TYPE_SEPARATOR, type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
index: qdata.index index: qdata.index
}); });
@ -227,8 +227,7 @@ function queryData(obj) {
this.isTag = obj.isTag ? obj.isTag : false; this.isTag = obj.isTag ? obj.isTag : false;
this.tagArray = obj.tagArray ? obj.tagArray : null; this.tagArray = obj.tagArray ? obj.tagArray : null;
this.isLivemark = obj.isLivemark ? obj.isLivemark : false; this.isLivemark = obj.isLivemark ? obj.isLivemark : false;
this.parentFolder = obj.parentFolder ? obj.parentFolder this.parentGuid = obj.parentGuid || PlacesUtils.bookmarks.rootGuid;
: PlacesUtils.placesRootId;
this.feedURI = obj.feedURI ? obj.feedURI : ""; this.feedURI = obj.feedURI ? obj.feedURI : "";
this.index = obj.index ? obj.index : PlacesUtils.bookmarks.DEFAULT_INDEX; this.index = obj.index ? obj.index : PlacesUtils.bookmarks.DEFAULT_INDEX;
this.isFolder = obj.isFolder ? obj.isFolder : false; this.isFolder = obj.isFolder ? obj.isFolder : false;

Просмотреть файл

@ -268,17 +268,20 @@ let DataHelper = {
defaults: { defaults: {
bookmark: { bookmark: {
parent: PlacesUtils.bookmarks.unfiledBookmarksFolder, parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
uri: "http://example.com/", uri: "http://example.com/",
title: "test bookmark" title: "test bookmark"
}, },
folder: { folder: {
parent: PlacesUtils.bookmarks.unfiledBookmarksFolder, parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
title: "test folder" title: "test folder"
}, },
separator: { separator: {
parent: PlacesUtils.bookmarks.unfiledBookmarksFolder parent: PlacesUtils.bookmarks.unfiledBookmarksFolder,
parentGuid: PlacesUtils.bookmarks.unfiledGuid
} }
}, },
@ -300,7 +303,7 @@ let DataHelper = {
return { return {
isBookmark: true, isBookmark: true,
uri: dat.uri, uri: dat.uri,
parentFolder: dat.parent, parentGuid: dat.parentGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: dat.title, title: dat.title,
isInQuery: true isInQuery: true
@ -308,14 +311,14 @@ let DataHelper = {
case "separator": case "separator":
return { return {
isSeparator: true, isSeparator: true,
parentFolder: dat.parent, parentGuid: dat.parentGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
isInQuery: true isInQuery: true
}; };
case "folder": case "folder":
return { return {
isFolder: true, isFolder: true,
parentFolder: dat.parent, parentGuid: dat.parentGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: dat.title, title: dat.title,
isInQuery: true isInQuery: true

Просмотреть файл

@ -12,7 +12,7 @@ let gTestData = [
lastVisit: gNow, lastVisit: gNow,
isInQuery: true, isInQuery: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.unfiledBookmarksFolderId, parentGuid: PlacesUtils.bookmarks.unfiledGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "example1", title: "example1",
}, },
@ -22,7 +22,7 @@ let gTestData = [
lastVisit: gNow++, lastVisit: gNow++,
isInQuery: true, isInQuery: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.unfiledBookmarksFolderId, parentGuid: PlacesUtils.bookmarks.unfiledGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "example2", title: "example2",
}, },
@ -32,7 +32,7 @@ let gTestData = [
lastVisit: gNow++, lastVisit: gNow++,
isInQuery: true, isInQuery: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.unfiledBookmarksFolderId, parentGuid: PlacesUtils.bookmarks.unfiledGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "example3", title: "example3",
}, },

Просмотреть файл

@ -20,14 +20,14 @@ var testData = [
// Add a bookmark that should be in the results // Add a bookmark that should be in the results
{ isBookmark: true, { isBookmark: true,
uri: "http://bookmarked.com/", uri: "http://bookmarked.com/",
parentFolder: PlacesUtils.toolbarFolderId, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
isInQuery: true }, isInQuery: true },
// Add a bookmark that should not be in the results // Add a bookmark that should not be in the results
{ isBookmark: true, { isBookmark: true,
uri: "http://bookmarked-elsewhere.com/", uri: "http://bookmarked-elsewhere.com/",
parentFolder: PlacesUtils.bookmarksMenuFolderId, parentGuid: PlacesUtils.bookmarks.menuGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
isInQuery: false }, isInQuery: false },
@ -82,14 +82,14 @@ add_task(function test_onlyBookmarked()
//Add a bookmark that should show up //Add a bookmark that should show up
{ isBookmark: true, { isBookmark: true,
uri: "http://bookmarked2.com/", uri: "http://bookmarked2.com/",
parentFolder: PlacesUtils.toolbarFolderId, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
isInQuery: true }, isInQuery: true },
//Add a bookmark that should not show up //Add a bookmark that should not show up
{ isBookmark: true, { isBookmark: true,
uri: "http://bookmarked-elsewhere2.com/", uri: "http://bookmarked-elsewhere2.com/",
parentFolder: PlacesUtils.bookmarksMenuFolderId, parentGuid: PlacesUtils.bookmarks.menuGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
isInQuery: false } isInQuery: false }
]; ];

Просмотреть файл

@ -271,7 +271,7 @@ add_task(function test_add_visits_to_database()
// Add an unvisited bookmark in the database, it should never appear. // Add an unvisited bookmark in the database, it should never appear.
visits.push({ isBookmark: true, visits.push({ isBookmark: true,
uri: "http://unvisited.bookmark.com/", uri: "http://unvisited.bookmark.com/",
parentFolder: PlacesUtils.bookmarksMenuFolderId, parentGuid: PlacesUtils.bookmarks.menuGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "Unvisited Bookmark", title: "Unvisited Bookmark",
isInQuery: false }); isInQuery: false });

Просмотреть файл

@ -17,7 +17,7 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b", uri: "http://example.com/b",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "y", title: "y",
keyword: "b", keyword: "b",
@ -25,7 +25,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "z", title: "z",
keyword: "a", keyword: "a",
@ -33,7 +33,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "x", title: "x",
keyword: "c", keyword: "c",
@ -80,21 +80,21 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b1", uri: "http://example.com/b1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "y", title: "y",
isInQuery: true }, isInQuery: true },
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "z", title: "z",
isInQuery: true }, isInQuery: true },
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "x", title: "x",
isInQuery: true }, isInQuery: true },
@ -102,7 +102,7 @@ tests.push({
// if titles are equal, should fall back to URI // if titles are equal, should fall back to URI
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b2", uri: "http://example.com/b2",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "y", title: "y",
isInQuery: true }, isInQuery: true },
@ -157,7 +157,7 @@ tests.push({
{ isVisit: true, { isVisit: true,
isDetails: true, isDetails: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 0, index: 0,
uri: "http://example.com/c1", uri: "http://example.com/c1",
lastVisit: timeInMicroseconds - 2, lastVisit: timeInMicroseconds - 2,
@ -167,7 +167,7 @@ tests.push({
{ isVisit: true, { isVisit: true,
isDetails: true, isDetails: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 1, index: 1,
uri: "http://example.com/a", uri: "http://example.com/a",
lastVisit: timeInMicroseconds - 1, lastVisit: timeInMicroseconds - 1,
@ -177,7 +177,7 @@ tests.push({
{ isVisit: true, { isVisit: true,
isDetails: true, isDetails: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 2, index: 2,
uri: "http://example.com/b", uri: "http://example.com/b",
lastVisit: timeInMicroseconds - 3, lastVisit: timeInMicroseconds - 3,
@ -188,7 +188,7 @@ tests.push({
{ isVisit: true, { isVisit: true,
isDetails: true, isDetails: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 3, index: 3,
uri: "http://example.com/c2", uri: "http://example.com/c2",
lastVisit: timeInMicroseconds - 2, lastVisit: timeInMicroseconds - 2,
@ -199,7 +199,7 @@ tests.push({
{ isVisit: true, { isVisit: true,
isDetails: true, isDetails: true,
isBookmark: true, isBookmark: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 4, index: 4,
uri: "http://example.com/c2", uri: "http://example.com/c2",
lastVisit: timeInMicroseconds - 2, lastVisit: timeInMicroseconds - 2,
@ -258,21 +258,21 @@ tests.push({
isDetails: true, isDetails: true,
lastVisit: timeInMicroseconds, lastVisit: timeInMicroseconds,
uri: "http://example.com/b", uri: "http://example.com/b",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 0, index: 0,
title: "y", title: "y",
isInQuery: true }, isInQuery: true },
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 1, index: 1,
title: "x", title: "x",
isInQuery: true }, isInQuery: true },
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 2, index: 2,
title: "z", title: "z",
isInQuery: true }, isInQuery: true },
@ -282,14 +282,14 @@ tests.push({
isDetails: true, isDetails: true,
lastVisit: timeInMicroseconds + 1000, lastVisit: timeInMicroseconds + 1000,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 3, index: 3,
title: "x", title: "x",
isInQuery: true }, isInQuery: true },
// if no URI (e.g., node is a folder), should fall back to title // if no URI (e.g., node is a folder), should fall back to title
{ isFolder: true, { isFolder: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 4, index: 4,
title: "a", title: "a",
isInQuery: true }, isInQuery: true },
@ -299,14 +299,14 @@ tests.push({
isDetails: true, isDetails: true,
lastVisit: timeInMicroseconds + 1000, lastVisit: timeInMicroseconds + 1000,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 5, index: 5,
title: "x", title: "x",
isInQuery: true }, isInQuery: true },
// if no URI and titles are equal, should fall back to bookmark index // if no URI and titles are equal, should fall back to bookmark index
{ isFolder: true, { isFolder: true,
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 6, index: 6,
title: "a", title: "a",
isInQuery: true }, isInQuery: true },
@ -364,7 +364,7 @@ tests.push({
uri: "http://example.com/a", uri: "http://example.com/a",
lastVisit: timeInMicroseconds, lastVisit: timeInMicroseconds,
title: "z", title: "z",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 0, index: 0,
isInQuery: true }, isInQuery: true },
@ -372,7 +372,7 @@ tests.push({
uri: "http://example.com/c", uri: "http://example.com/c",
lastVisit: timeInMicroseconds, lastVisit: timeInMicroseconds,
title: "x", title: "x",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 1, index: 1,
isInQuery: true }, isInQuery: true },
@ -380,7 +380,7 @@ tests.push({
uri: "http://example.com/b1", uri: "http://example.com/b1",
lastVisit: timeInMicroseconds, lastVisit: timeInMicroseconds,
title: "y1", title: "y1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 2, index: 2,
isInQuery: true }, isInQuery: true },
@ -389,7 +389,7 @@ tests.push({
uri: "http://example.com/b2", uri: "http://example.com/b2",
lastVisit: timeInMicroseconds + 1000, lastVisit: timeInMicroseconds + 1000,
title: "y2a", title: "y2a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 3, index: 3,
isInQuery: true }, isInQuery: true },
@ -398,7 +398,7 @@ tests.push({
uri: "http://example.com/b2", uri: "http://example.com/b2",
lastVisit: timeInMicroseconds + 1000, lastVisit: timeInMicroseconds + 1000,
title: "y2b", title: "y2b",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 4, index: 4,
isInQuery: true }, isInQuery: true },
]; ];
@ -462,7 +462,7 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "z", title: "z",
keyword: "a", keyword: "a",
@ -470,7 +470,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "x", title: "x",
keyword: "c", keyword: "c",
@ -478,7 +478,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b1", uri: "http://example.com/b1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "y9", title: "y9",
keyword: "b", keyword: "b",
@ -487,7 +487,7 @@ tests.push({
// without a keyword, should fall back to title // without a keyword, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/null2", uri: "http://example.com/null2",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "null8", title: "null8",
keyword: null, keyword: null,
@ -496,7 +496,7 @@ tests.push({
// without a keyword, should fall back to title // without a keyword, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/null1", uri: "http://example.com/null1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "null9", title: "null9",
keyword: null, keyword: null,
@ -505,7 +505,7 @@ tests.push({
// if keywords are equal, should fall back to title // if keywords are equal, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b1", uri: "http://example.com/b1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "y8", title: "y8",
keyword: "b", keyword: "b",
@ -562,7 +562,7 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b1", uri: "http://example.com/b1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 0, index: 0,
title: "y1", title: "y1",
dateAdded: timeInMicroseconds - 1000, dateAdded: timeInMicroseconds - 1000,
@ -570,7 +570,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 1, index: 1,
title: "z", title: "z",
dateAdded: timeInMicroseconds - 2000, dateAdded: timeInMicroseconds - 2000,
@ -578,7 +578,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 2, index: 2,
title: "x", title: "x",
dateAdded: timeInMicroseconds, dateAdded: timeInMicroseconds,
@ -587,7 +587,7 @@ tests.push({
// if dateAddeds are equal, should fall back to title // if dateAddeds are equal, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b2", uri: "http://example.com/b2",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 3, index: 3,
title: "y2", title: "y2",
dateAdded: timeInMicroseconds - 1000, dateAdded: timeInMicroseconds - 1000,
@ -596,7 +596,7 @@ tests.push({
// if dateAddeds and titles are equal, should fall back to bookmark index // if dateAddeds and titles are equal, should fall back to bookmark index
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b3", uri: "http://example.com/b3",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 4, index: 4,
title: "y3", title: "y3",
dateAdded: timeInMicroseconds - 1000, dateAdded: timeInMicroseconds - 1000,
@ -654,7 +654,7 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b1", uri: "http://example.com/b1",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 0, index: 0,
title: "y1", title: "y1",
dateAdded: timeAddedInMicroseconds, dateAdded: timeAddedInMicroseconds,
@ -663,7 +663,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/a", uri: "http://example.com/a",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 1, index: 1,
title: "z", title: "z",
dateAdded: timeAddedInMicroseconds, dateAdded: timeAddedInMicroseconds,
@ -672,7 +672,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/c", uri: "http://example.com/c",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 2, index: 2,
title: "x", title: "x",
dateAdded: timeAddedInMicroseconds, dateAdded: timeAddedInMicroseconds,
@ -682,7 +682,7 @@ tests.push({
// if lastModifieds are equal, should fall back to title // if lastModifieds are equal, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b2", uri: "http://example.com/b2",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 3, index: 3,
title: "y2", title: "y2",
dateAdded: timeAddedInMicroseconds, dateAdded: timeAddedInMicroseconds,
@ -693,7 +693,7 @@ tests.push({
// index // index
{ isBookmark: true, { isBookmark: true,
uri: "http://example.com/b3", uri: "http://example.com/b3",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: 4, index: 4,
title: "y3", title: "y3",
dateAdded: timeAddedInMicroseconds, dateAdded: timeAddedInMicroseconds,
@ -749,7 +749,7 @@ tests.push({
this._unsortedData = [ this._unsortedData = [
{ isBookmark: true, { isBookmark: true,
uri: "http://url2.com/", uri: "http://url2.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title x", title: "title x",
isTag: true, isTag: true,
@ -758,7 +758,7 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://url1a.com/", uri: "http://url1a.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title y1", title: "title y1",
isTag: true, isTag: true,
@ -767,14 +767,14 @@ tests.push({
{ isBookmark: true, { isBookmark: true,
uri: "http://url3a.com/", uri: "http://url3a.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title w1", title: "title w1",
isInQuery: true }, isInQuery: true },
{ isBookmark: true, { isBookmark: true,
uri: "http://url0.com/", uri: "http://url0.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title z", title: "title z",
isTag: true, isTag: true,
@ -784,7 +784,7 @@ tests.push({
// if tags are equal, should fall back to title // if tags are equal, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://url1b.com/", uri: "http://url1b.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title y2", title: "title y2",
isTag: true, isTag: true,
@ -794,7 +794,7 @@ tests.push({
// if tags are equal, should fall back to title // if tags are equal, should fall back to title
{ isBookmark: true, { isBookmark: true,
uri: "http://url3b.com/", uri: "http://url3b.com/",
parentFolder: PlacesUtils.bookmarks.toolbarFolder, parentGuid: PlacesUtils.bookmarks.toolbarGuid,
index: PlacesUtils.bookmarks.DEFAULT_INDEX, index: PlacesUtils.bookmarks.DEFAULT_INDEX,
title: "title w2", title: "title w2",
isInQuery: true }, isInQuery: true },

Просмотреть файл

@ -10,6 +10,19 @@ let annosvc = PlacesUtils.annotations;
let txnManager = PlacesUtils.transactionManager; let txnManager = PlacesUtils.transactionManager;
const DESCRIPTION_ANNO = "bookmarkProperties/description"; const DESCRIPTION_ANNO = "bookmarkProperties/description";
function* promiseKeyword(keyword, href, postData) {
while (true) {
let entry = yield PlacesUtils.keywords.fetch(keyword);
if (href == null && !entry)
break;
if (entry && entry.url.href == href && entry.postData == postData) {
break;
}
yield new Promise(resolve => do_timeout(100, resolve));
}
}
// create and add bookmarks observer // create and add bookmarks observer
let observer = { let observer = {
@ -97,16 +110,14 @@ let bmStartIndex = 0;
// get bookmarks root id // get bookmarks root id
let root = PlacesUtils.bookmarksMenuFolderId; let root = PlacesUtils.bookmarksMenuFolderId;
function run_test() { add_task(function* init() {
bmsvc.addObserver(observer, false); bmsvc.addObserver(observer, false);
do_register_cleanup(function () { do_register_cleanup(function () {
bmsvc.removeObserver(observer); bmsvc.removeObserver(observer);
}); });
});
run_next_test(); add_task(function* test_create_folder_with_description() {
}
add_test(function test_create_folder_with_description() {
const TEST_FOLDERNAME = "Test creating a folder with a description"; const TEST_FOLDERNAME = "Test creating a folder with a description";
const TEST_DESCRIPTION = "this is my test description"; const TEST_DESCRIPTION = "this is my test description";
@ -145,11 +156,9 @@ add_test(function test_create_folder_with_description() {
do_check_eq(observer._itemRemovedId, folderId); do_check_eq(observer._itemRemovedId, folderId);
do_check_eq(observer._itemRemovedFolder, root); do_check_eq(observer._itemRemovedFolder, root);
do_check_eq(observer._itemRemovedIndex, bmStartIndex); do_check_eq(observer._itemRemovedIndex, bmStartIndex);
run_next_test();
}); });
add_test(function test_create_item() { add_task(function* test_create_item() {
let testURI = NetUtil.newURI("http://test_create_item.com"); let testURI = NetUtil.newURI("http://test_create_item.com");
let txn = new PlacesCreateBookmarkTransaction(testURI, root, bmStartIndex, let txn = new PlacesCreateBookmarkTransaction(testURI, root, bmStartIndex,
@ -177,11 +186,9 @@ add_test(function test_create_item() {
do_check_eq(observer._itemRemovedId, newId); do_check_eq(observer._itemRemovedId, newId);
do_check_eq(observer._itemRemovedFolder, root); do_check_eq(observer._itemRemovedFolder, root);
do_check_eq(observer._itemRemovedIndex, bmStartIndex); do_check_eq(observer._itemRemovedIndex, bmStartIndex);
run_next_test();
}); });
add_test(function test_create_item_to_folder() { add_task(function* test_create_item_to_folder() {
const TEST_FOLDERNAME = "Test creating item to a folder"; const TEST_FOLDERNAME = "Test creating item to a folder";
let testURI = NetUtil.newURI("http://test_create_item_to_folder.com"); let testURI = NetUtil.newURI("http://test_create_item_to_folder.com");
let folderId = bmsvc.createFolder(root, TEST_FOLDERNAME, bmsvc.DEFAULT_INDEX); let folderId = bmsvc.createFolder(root, TEST_FOLDERNAME, bmsvc.DEFAULT_INDEX);
@ -208,11 +215,9 @@ add_test(function test_create_item_to_folder() {
do_check_eq(observer._itemRemovedId, newBkmId); do_check_eq(observer._itemRemovedId, newBkmId);
do_check_eq(observer._itemRemovedFolder, folderId); do_check_eq(observer._itemRemovedFolder, folderId);
do_check_eq(observer._itemRemovedIndex, bmStartIndex); do_check_eq(observer._itemRemovedIndex, bmStartIndex);
run_next_test();
}); });
add_test(function test_move_items_to_folder() { add_task(function* test_move_items_to_folder() {
let testFolderId = bmsvc.createFolder(root, "Test move items", bmsvc.DEFAULT_INDEX); let testFolderId = bmsvc.createFolder(root, "Test move items", bmsvc.DEFAULT_INDEX);
let testURI = NetUtil.newURI("http://test_move_items.com"); let testURI = NetUtil.newURI("http://test_move_items.com");
let testBkmId = bmsvc.insertBookmark(testFolderId, testURI, bmsvc.DEFAULT_INDEX, "1: Test move items"); let testBkmId = bmsvc.insertBookmark(testFolderId, testURI, bmsvc.DEFAULT_INDEX, "1: Test move items");
@ -282,11 +287,9 @@ add_test(function test_move_items_to_folder() {
do_check_eq(observer._itemMovedOldIndex, 0); do_check_eq(observer._itemMovedOldIndex, 0);
do_check_eq(observer._itemMovedNewParent, testFolderId); do_check_eq(observer._itemMovedNewParent, testFolderId);
do_check_eq(observer._itemMovedNewIndex, 0); do_check_eq(observer._itemMovedNewIndex, 0);
run_next_test();
}); });
add_test(function test_remove_folder() { add_task(function* test_remove_folder() {
let testFolder = bmsvc.createFolder(root, "Test Removing a Folder", bmsvc.DEFAULT_INDEX); let testFolder = bmsvc.createFolder(root, "Test Removing a Folder", bmsvc.DEFAULT_INDEX);
let folderId = bmsvc.createFolder(testFolder, "Removed Folder", bmsvc.DEFAULT_INDEX); let folderId = bmsvc.createFolder(testFolder, "Removed Folder", bmsvc.DEFAULT_INDEX);
@ -311,25 +314,22 @@ add_test(function test_remove_folder() {
do_check_eq(observer._itemAddedId, folderId); do_check_eq(observer._itemAddedId, folderId);
do_check_eq(observer._itemAddedParent, testFolder); do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0); do_check_eq(observer._itemAddedIndex, 0);
run_next_test();
}); });
add_test(function test_remove_item_with_keyword_and_tag() { add_task(function* test_remove_item_with_tag() {
// Notice in this case the tag persists since other bookmarks have same uri. // Notice in this case the tag persists since other bookmarks have same uri.
let testFolder = bmsvc.createFolder(root, "Test removing an item with a keyword and a tag", let testFolder = bmsvc.createFolder(root, "Test removing an item with a tag",
bmsvc.DEFAULT_INDEX); bmsvc.DEFAULT_INDEX);
const KEYWORD = "test: test removing an item with a keyword and a tag"; const KEYWORD = "test: test removing an item with a tag";
const TAG_NAME = "tag-test_remove_item_with_keyword_and_tag"; const TAG_NAME = "tag-test_remove_item_with_tag";
let testURI = NetUtil.newURI("http://test_remove_item_with_keyword_and_tag.com"); let testURI = NetUtil.newURI("http://test_remove_item_with_tag.com");
let testBkmId = bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item1"); let testBkmId = bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item1");
// create bookmark for not removing tag. // create bookmark for not removing tag.
bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item2"); bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item2");
// set tag & keyword // set tag
bmsvc.setKeywordForBookmark(testBkmId, KEYWORD);
tagssvc.tagURI(testURI, [TAG_NAME]); tagssvc.tagURI(testURI, [TAG_NAME]);
let txn = new PlacesRemoveItemTransaction(testBkmId); let txn = new PlacesRemoveItemTransaction(testBkmId);
@ -338,57 +338,65 @@ add_test(function test_remove_item_with_keyword_and_tag() {
do_check_eq(observer._itemRemovedId, testBkmId); do_check_eq(observer._itemRemovedId, testBkmId);
do_check_eq(observer._itemRemovedFolder, testFolder); do_check_eq(observer._itemRemovedFolder, testFolder);
do_check_eq(observer._itemRemovedIndex, 0); do_check_eq(observer._itemRemovedIndex, 0);
do_check_eq(bmsvc.getKeywordForBookmark(testBkmId), null); do_check_eq(tagssvc.getTagsForURI(testURI), TAG_NAME);
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
txn.undoTransaction(); txn.undoTransaction();
let newbkmk2Id = observer._itemAddedId; let newbkmk2Id = observer._itemAddedId;
do_check_eq(observer._itemAddedParent, testFolder); do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0); do_check_eq(observer._itemAddedIndex, 0);
do_check_eq(bmsvc.getKeywordForBookmark(newbkmk2Id), KEYWORD);
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME); do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
txn.redoTransaction(); txn.redoTransaction();
do_check_eq(observer._itemRemovedId, newbkmk2Id); do_check_eq(observer._itemRemovedId, newbkmk2Id);
do_check_eq(observer._itemRemovedFolder, testFolder); do_check_eq(observer._itemRemovedFolder, testFolder);
do_check_eq(observer._itemRemovedIndex, 0); do_check_eq(observer._itemRemovedIndex, 0);
do_check_eq(bmsvc.getKeywordForBookmark(newbkmk2Id), null);
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME); do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
txn.undoTransaction(); txn.undoTransaction();
do_check_eq(observer._itemAddedParent, testFolder); do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0); do_check_eq(observer._itemAddedIndex, 0);
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME); do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME);
run_next_test();
}); });
add_test(function test_remove_item_with_tag() { add_task(function* test_remove_item_with_keyword() {
const TAG_NAME = "tag-test_remove_item_with_tag"; // Notice in this case the tag persists since other bookmarks have same uri.
let testURI = NetUtil.newURI("http://test_remove_item_with_tag.com/"); let testFolder = bmsvc.createFolder(root, "Test removing an item with a keyword",
let itemId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test removing an item with a tag"); bmsvc.DEFAULT_INDEX);
tagssvc.tagURI(testURI, [TAG_NAME]);
let txn = new PlacesRemoveItemTransaction(itemId); const KEYWORD = "test: test removing an item with a keyword";
const TAG_NAME = "tag-test_remove_item_with_keyword";
let testURI = NetUtil.newURI("http://test_remove_item_with_keyword.com");
let testBkmId = bmsvc.insertBookmark(testFolder, testURI, bmsvc.DEFAULT_INDEX, "test-item1");
// set keyword
yield PlacesUtils.keywords.insert({ url: testURI.spec, keyword: KEYWORD});
let txn = new PlacesRemoveItemTransaction(testBkmId);
txn.doTransaction(); txn.doTransaction();
do_check_true(tagssvc.getTagsForURI(testURI).length == 0); do_check_eq(observer._itemRemovedId, testBkmId);
do_check_eq(observer._itemRemovedFolder, testFolder);
do_check_eq(observer._itemRemovedIndex, 0);
yield promiseKeyword(KEYWORD, null);
txn.undoTransaction(); txn.undoTransaction();
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME); let newbkmk2Id = observer._itemAddedId;
do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0);
yield promiseKeyword(KEYWORD, testURI.spec);
txn.redoTransaction(); txn.redoTransaction();
do_check_true(tagssvc.getTagsForURI(testURI).length == 0); do_check_eq(observer._itemRemovedId, newbkmk2Id);
do_check_eq(observer._itemRemovedFolder, testFolder);
do_check_eq(observer._itemRemovedIndex, 0);
yield promiseKeyword(KEYWORD, null);
txn.undoTransaction(); txn.undoTransaction();
do_check_eq(tagssvc.getTagsForURI(testURI)[0], TAG_NAME); do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0);
txn.redoTransaction();
run_next_test();
}); });
add_test(function test_creating_separator() { add_task(function* test_creating_separator() {
let testFolder = bmsvc.createFolder(root, "Test creating a separator", bmsvc.DEFAULT_INDEX); let testFolder = bmsvc.createFolder(root, "Test creating a separator", bmsvc.DEFAULT_INDEX);
let txn = new PlacesCreateSeparatorTransaction(testFolder, 0); let txn = new PlacesCreateSeparatorTransaction(testFolder, 0);
@ -412,11 +420,9 @@ add_test(function test_creating_separator() {
do_check_eq(observer._itemRemovedId, newSepId); do_check_eq(observer._itemRemovedId, newSepId);
do_check_eq(observer._itemRemovedFolder, testFolder); do_check_eq(observer._itemRemovedFolder, testFolder);
do_check_eq(observer._itemRemovedIndex, 0); do_check_eq(observer._itemRemovedIndex, 0);
run_next_test();
}); });
add_test(function test_removing_separator() { add_task(function* test_removing_separator() {
let testFolder = bmsvc.createFolder(root, "Test removing a separator", bmsvc.DEFAULT_INDEX); let testFolder = bmsvc.createFolder(root, "Test removing a separator", bmsvc.DEFAULT_INDEX);
let sepId = bmsvc.insertSeparator(testFolder, 0); let sepId = bmsvc.insertSeparator(testFolder, 0);
@ -441,11 +447,9 @@ add_test(function test_removing_separator() {
do_check_eq(observer._itemAddedId, sepId); //New separator created do_check_eq(observer._itemAddedId, sepId); //New separator created
do_check_eq(observer._itemAddedParent, testFolder); do_check_eq(observer._itemAddedParent, testFolder);
do_check_eq(observer._itemAddedIndex, 0); do_check_eq(observer._itemAddedIndex, 0);
run_next_test();
}); });
add_test(function test_editing_item_title() { add_task(function* test_editing_item_title() {
const TITLE = "Test editing item title"; const TITLE = "Test editing item title";
const MOD_TITLE = "Mod: Test editing item title"; const MOD_TITLE = "Mod: Test editing item title";
let testURI = NetUtil.newURI("http://www.test_editing_item_title.com"); let testURI = NetUtil.newURI("http://www.test_editing_item_title.com");
@ -472,11 +476,9 @@ add_test(function test_editing_item_title() {
do_check_eq(observer._itemChangedId, testBkmId); do_check_eq(observer._itemChangedId, testBkmId);
do_check_eq(observer._itemChangedProperty, "title"); do_check_eq(observer._itemChangedProperty, "title");
do_check_eq(observer._itemChangedValue, TITLE); do_check_eq(observer._itemChangedValue, TITLE);
run_next_test();
}); });
add_test(function test_editing_item_uri() { add_task(function* test_editing_item_uri() {
const OLD_TEST_URI = NetUtil.newURI("http://old.test_editing_item_uri.com/"); const OLD_TEST_URI = NetUtil.newURI("http://old.test_editing_item_uri.com/");
const NEW_TEST_URI = NetUtil.newURI("http://new.test_editing_item_uri.com/"); const NEW_TEST_URI = NetUtil.newURI("http://new.test_editing_item_uri.com/");
let testBkmId = bmsvc.insertBookmark(root, OLD_TEST_URI, bmsvc.DEFAULT_INDEX, let testBkmId = bmsvc.insertBookmark(root, OLD_TEST_URI, bmsvc.DEFAULT_INDEX,
@ -512,11 +514,9 @@ add_test(function test_editing_item_uri() {
do_check_eq(observer._itemChangedValue, OLD_TEST_URI.spec); do_check_eq(observer._itemChangedValue, OLD_TEST_URI.spec);
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify(["tag"])); do_check_eq(JSON.stringify(tagssvc.getTagsForURI(OLD_TEST_URI)), JSON.stringify(["tag"]));
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify([])); do_check_eq(JSON.stringify(tagssvc.getTagsForURI(NEW_TEST_URI)), JSON.stringify([]));
run_next_test();
}); });
add_test(function test_edit_description_transaction() { add_task(function* test_edit_description_transaction() {
let testURI = NetUtil.newURI("http://test_edit_description_transaction.com"); let testURI = NetUtil.newURI("http://test_edit_description_transaction.com");
let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test edit description transaction"); let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test edit description transaction");
@ -532,11 +532,9 @@ add_test(function test_edit_description_transaction() {
txn.doTransaction(); txn.doTransaction();
do_check_eq(observer._itemChangedId, testBkmId); do_check_eq(observer._itemChangedId, testBkmId);
do_check_eq(observer._itemChangedProperty, DESCRIPTION_ANNO); do_check_eq(observer._itemChangedProperty, DESCRIPTION_ANNO);
run_next_test();
}); });
add_test(function test_edit_keyword() { add_task(function* test_edit_keyword() {
const KEYWORD = "keyword-test_edit_keyword"; const KEYWORD = "keyword-test_edit_keyword";
let testURI = NetUtil.newURI("http://test_edit_keyword.com"); let testURI = NetUtil.newURI("http://test_edit_keyword.com");
@ -553,11 +551,9 @@ add_test(function test_edit_keyword() {
do_check_eq(observer._itemChangedId, testBkmId); do_check_eq(observer._itemChangedId, testBkmId);
do_check_eq(observer._itemChangedProperty, "keyword"); do_check_eq(observer._itemChangedProperty, "keyword");
do_check_eq(observer._itemChangedValue, ""); do_check_eq(observer._itemChangedValue, "");
run_next_test();
}); });
add_test(function test_LoadInSidebar_transaction() { add_task(function* test_LoadInSidebar_transaction() {
let testURI = NetUtil.newURI("http://test_LoadInSidebar_transaction.com"); let testURI = NetUtil.newURI("http://test_LoadInSidebar_transaction.com");
let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test LoadInSidebar transaction"); let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test LoadInSidebar transaction");
@ -578,11 +574,9 @@ add_test(function test_LoadInSidebar_transaction() {
do_check_eq(observer._itemChangedId, testBkmId); do_check_eq(observer._itemChangedId, testBkmId);
do_check_eq(observer._itemChangedProperty, LOAD_IN_SIDEBAR_ANNO); do_check_eq(observer._itemChangedProperty, LOAD_IN_SIDEBAR_ANNO);
do_check_eq(observer._itemChanged_isAnnotationProperty, true); do_check_eq(observer._itemChanged_isAnnotationProperty, true);
run_next_test();
}); });
add_test(function test_generic_item_annotation() { add_task(function* test_generic_item_annotation() {
let testURI = NetUtil.newURI("http://test_generic_item_annotation.com"); let testURI = NetUtil.newURI("http://test_generic_item_annotation.com");
let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test generic item annotation"); let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, "Test generic item annotation");
@ -607,11 +601,9 @@ add_test(function test_generic_item_annotation() {
do_check_eq(observer._itemChangedId, testBkmId); do_check_eq(observer._itemChangedId, testBkmId);
do_check_eq(observer._itemChangedProperty, "testAnno/testInt"); do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
do_check_eq(observer._itemChanged_isAnnotationProperty, true); do_check_eq(observer._itemChanged_isAnnotationProperty, true);
run_next_test();
}); });
add_test(function test_editing_item_date_added() { add_task(function* test_editing_item_date_added() {
let testURI = NetUtil.newURI("http://test_editing_item_date_added.com"); let testURI = NetUtil.newURI("http://test_editing_item_date_added.com");
let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX,
"Test editing item date added"); "Test editing item date added");
@ -625,11 +617,9 @@ add_test(function test_editing_item_date_added() {
txn.undoTransaction(); txn.undoTransaction();
do_check_eq(oldAdded, bmsvc.getItemDateAdded(testBkmId)); do_check_eq(oldAdded, bmsvc.getItemDateAdded(testBkmId));
run_next_test();
}); });
add_test(function test_edit_item_last_modified() { add_task(function* test_edit_item_last_modified() {
let testURI = NetUtil.newURI("http://test_edit_item_last_modified.com"); let testURI = NetUtil.newURI("http://test_edit_item_last_modified.com");
let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX, let testBkmId = bmsvc.insertBookmark(root, testURI, bmsvc.DEFAULT_INDEX,
"Test editing item last modified"); "Test editing item last modified");
@ -643,11 +633,9 @@ add_test(function test_edit_item_last_modified() {
txn.undoTransaction(); txn.undoTransaction();
do_check_eq(oldModified, bmsvc.getItemLastModified(testBkmId)); do_check_eq(oldModified, bmsvc.getItemLastModified(testBkmId));
run_next_test();
}); });
add_test(function test_generic_page_annotation() { add_task(function* test_generic_page_annotation() {
const TEST_ANNO = "testAnno/testInt"; const TEST_ANNO = "testAnno/testInt";
let testURI = NetUtil.newURI("http://www.mozilla.org/"); let testURI = NetUtil.newURI("http://www.mozilla.org/");
PlacesTestUtils.addVisits(testURI).then(function () { PlacesTestUtils.addVisits(testURI).then(function () {
@ -666,12 +654,10 @@ add_test(function test_generic_page_annotation() {
txn.redoTransaction(); txn.redoTransaction();
do_check_true(annosvc.pageHasAnnotation(testURI, TEST_ANNO)); do_check_true(annosvc.pageHasAnnotation(testURI, TEST_ANNO));
run_next_test();
}); });
}); });
add_test(function test_sort_folder_by_name() { add_task(function* test_sort_folder_by_name() {
let testFolder = bmsvc.createFolder(root, "Test PlacesSortFolderByNameTransaction", let testFolder = bmsvc.createFolder(root, "Test PlacesSortFolderByNameTransaction",
bmsvc.DEFAULT_INDEX); bmsvc.DEFAULT_INDEX);
let testURI = NetUtil.newURI("http://test_sort_folder_by_name.com"); let testURI = NetUtil.newURI("http://test_sort_folder_by_name.com");
@ -712,52 +698,37 @@ add_test(function test_sort_folder_by_name() {
do_check_eq(0, bmsvc.getItemIndex(b1)); do_check_eq(0, bmsvc.getItemIndex(b1));
do_check_eq(1, bmsvc.getItemIndex(b2)); do_check_eq(1, bmsvc.getItemIndex(b2));
do_check_eq(2, bmsvc.getItemIndex(b3)); do_check_eq(2, bmsvc.getItemIndex(b3));
run_next_test();
}); });
add_test(function test_edit_postData() { add_task(function* test_edit_postData() {
function* promiseKeyword(keyword, href, postData) { let postData = "post-test_edit_postData";
while (true) { let testURI = NetUtil.newURI("http://test_edit_postData.com");
let entry = yield PlacesUtils.keywords.fetch(keyword);
if (entry && entry.url.href == href && entry.postData == postData) {
break;
}
yield new Promise(resolve => do_timeout(100, resolve)); let testBkm = yield PlacesUtils.bookmarks.insert({
} parentGuid: PlacesUtils.bookmarks.menuGuid,
} url: "http://test_edit_postData.com",
title: "Test edit Post Data"
});
Task.spawn(function* () { yield PlacesUtils.keywords.insert({
let postData = "post-test_edit_postData"; keyword: "kw",
let testURI = NetUtil.newURI("http://test_edit_postData.com"); url: "http://test_edit_postData.com"
});
let testBkm = yield PlacesUtils.bookmarks.insert({ let testBkmId = yield PlacesUtils.promiseItemId(testBkm.guid);
parentGuid: PlacesUtils.bookmarks.menuGuid, let txn = new PlacesEditBookmarkPostDataTransaction(testBkmId, postData);
url: "http://test_edit_postData.com",
title: "Test edit Post Data"
});
yield PlacesUtils.keywords.insert({ txn.doTransaction();
keyword: "kw", yield promiseKeyword("kw", testURI.spec, postData);
url: "http://test_edit_postData.com"
});
let testBkmId = yield PlacesUtils.promiseItemId(testBkm.guid); txn.undoTransaction();
let txn = new PlacesEditBookmarkPostDataTransaction(testBkmId, postData); entry = yield PlacesUtils.keywords.fetch("kw");
Assert.equal(entry.url.href, testURI.spec);
txn.doTransaction(); // We don't allow anymore to set a null post data.
yield promiseKeyword("kw", testURI.spec, postData); //Assert.equal(null, post_data);
txn.undoTransaction();
entry = yield PlacesUtils.keywords.fetch("kw");
Assert.equal(entry.url.href, testURI.spec);
// We don't allow anymore to set a null post data.
//Assert.equal(null, post_data);
}).then(run_next_test);
}); });
add_test(function test_tagURI_untagURI() { add_task(function* test_tagURI_untagURI() {
const TAG_1 = "tag-test_tagURI_untagURI-bar"; const TAG_1 = "tag-test_tagURI_untagURI-bar";
const TAG_2 = "tag-test_tagURI_untagURI-foo"; const TAG_2 = "tag-test_tagURI_untagURI-foo";
let tagURI = NetUtil.newURI("http://test_tagURI_untagURI.com"); let tagURI = NetUtil.newURI("http://test_tagURI_untagURI.com");
@ -785,11 +756,9 @@ add_test(function test_tagURI_untagURI() {
untagTxn.redoTransaction(); untagTxn.redoTransaction();
do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2])); do_check_eq(JSON.stringify(tagssvc.getTagsForURI(tagURI)), JSON.stringify([TAG_2]));
run_next_test();
}); });
add_test(function test_aggregate_removeItem_Txn() { add_task(function* test_aggregate_removeItem_Txn() {
let testFolder = bmsvc.createFolder(root, "Test aggregate removeItem transaction", bmsvc.DEFAULT_INDEX); let testFolder = bmsvc.createFolder(root, "Test aggregate removeItem transaction", bmsvc.DEFAULT_INDEX);
const TEST_URL = "http://test_aggregate_removeitem_txn.com/"; const TEST_URL = "http://test_aggregate_removeitem_txn.com/";
@ -877,11 +846,9 @@ add_test(function test_aggregate_removeItem_Txn() {
// Check last added back item id. // Check last added back item id.
// Notice items are restored in reverse order. // Notice items are restored in reverse order.
do_check_eq(observer._itemAddedId, newBkmk1Id); do_check_eq(observer._itemAddedId, newBkmk1Id);
run_next_test();
}); });
add_test(function test_create_item_with_childTxn() { add_task(function* test_create_item_with_childTxn() {
let testFolder = bmsvc.createFolder(root, "Test creating an item with childTxns", bmsvc.DEFAULT_INDEX); let testFolder = bmsvc.createFolder(root, "Test creating an item with childTxns", bmsvc.DEFAULT_INDEX);
const BOOKMARK_TITLE = "parent item"; const BOOKMARK_TITLE = "parent item";
@ -931,11 +898,9 @@ add_test(function test_create_item_with_childTxn() {
catch (ex) { catch (ex) {
do_throw("Setting a child transaction in a createItem transaction did throw: " + ex); do_throw("Setting a child transaction in a createItem transaction did throw: " + ex);
} }
run_next_test();
}); });
add_test(function test_create_folder_with_child_itemTxn() { add_task(function* test_create_folder_with_child_itemTxn() {
let childURI = NetUtil.newURI("http://test_create_folder_with_child_itemTxn.com"); let childURI = NetUtil.newURI("http://test_create_folder_with_child_itemTxn.com");
let childItemTxn = new PlacesCreateBookmarkTransaction(childURI, root, let childItemTxn = new PlacesCreateBookmarkTransaction(childURI, root,
bmStartIndex, "childItem"); bmStartIndex, "childItem");
@ -963,6 +928,4 @@ add_test(function test_create_folder_with_child_itemTxn() {
catch (ex) { catch (ex) {
do_throw("Setting a child item transaction in a createFolder transaction did throw: " + ex); do_throw("Setting a child item transaction in a createFolder transaction did throw: " + ex);
} }
run_next_test();
}); });

Просмотреть файл

@ -1166,30 +1166,32 @@ tests.push({
]); ]);
}, },
asyncCheck: function(aCallback) { check: function () {
let stmt = mDBConn.createAsyncStatement( return new Promise(resolve => {
"SELECT h.url FROM moz_places h WHERE h.hidden = 1" let stmt = mDBConn.createAsyncStatement(
); "SELECT h.url FROM moz_places h WHERE h.hidden = 1"
stmt.executeAsync({ );
_count: 0, stmt.executeAsync({
handleResult: function(aResultSet) { _count: 0,
for (let row; (row = aResultSet.getNextRow());) { handleResult: function(aResultSet) {
let url = row.getResultByIndex(0); for (let row; (row = aResultSet.getNextRow());) {
do_check_true(/redirecting/.test(url)); let url = row.getResultByIndex(0);
this._count++; do_check_true(/redirecting/.test(url));
this._count++;
}
},
handleError: function(aError) {
},
handleCompletion: function(aReason) {
dump_table("moz_places");
dump_table("moz_historyvisits");
do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
do_check_eq(this._count, 2);
resolve();
} }
}, });
handleError: function(aError) { stmt.finalize();
},
handleCompletion: function(aReason) {
dump_table("moz_places");
dump_table("moz_historyvisits");
do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
do_check_eq(this._count, 2);
aCallback();
}
}); });
stmt.finalize();
} }
}); });
@ -1205,7 +1207,7 @@ tests.push({
_bookmarkId: null, _bookmarkId: null,
_separatorId: null, _separatorId: null,
setup: function() { setup: function* () {
// use valid api calls to create a bunch of items // use valid api calls to create a bunch of items
yield PlacesTestUtils.addVisits([ yield PlacesTestUtils.addVisits([
{ uri: this._uri1 }, { uri: this._uri1 },
@ -1224,36 +1226,35 @@ tests.push({
ts.tagURI(this._uri1, ["testtag"]); ts.tagURI(this._uri1, ["testtag"]);
fs.setAndFetchFaviconForPage(this._uri2, SMALLPNG_DATA_URI, false, fs.setAndFetchFaviconForPage(this._uri2, SMALLPNG_DATA_URI, false,
PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE); PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE);
bs.setKeywordForBookmark(this._bookmarkId, "testkeyword"); yield PlacesUtils.keywords.insert({ url: this._uri1.spec, keyword: "testkeyword" });
as.setPageAnnotation(this._uri2, "anno", "anno", 0, as.EXPIRE_NEVER); as.setPageAnnotation(this._uri2, "anno", "anno", 0, as.EXPIRE_NEVER);
as.setItemAnnotation(this._bookmarkId, "anno", "anno", 0, as.EXPIRE_NEVER); as.setItemAnnotation(this._bookmarkId, "anno", "anno", 0, as.EXPIRE_NEVER);
}, },
asyncCheck: function (aCallback) { check: Task.async(function* () {
// Check that all items are correct // Check that all items are correct
PlacesUtils.asyncHistory.isURIVisited(this._uri1, function(aURI, aIsVisited) { let isVisited = yield promiseIsURIVisited(this._uri1);
do_check_true(aIsVisited); do_check_true(isVisited);
PlacesUtils.asyncHistory.isURIVisited(this._uri2, function(aURI, aIsVisited) { isVisited = yield promiseIsURIVisited(this._uri2);
do_check_true(aIsVisited); do_check_true(isVisited);
do_check_eq(bs.getBookmarkURI(this._bookmarkId).spec, this._uri1.spec); do_check_eq(bs.getBookmarkURI(this._bookmarkId).spec, this._uri1.spec);
do_check_eq(bs.getItemIndex(this._folderId), 0); do_check_eq(bs.getItemIndex(this._folderId), 0);
do_check_eq(bs.getItemType(this._folderId), bs.TYPE_FOLDER);
do_check_eq(bs.getItemType(this._separatorId), bs.TYPE_SEPARATOR);
do_check_eq(bs.getItemType(this._folderId), bs.TYPE_FOLDER); do_check_eq(ts.getTagsForURI(this._uri1).length, 1);
do_check_eq(bs.getItemType(this._separatorId), bs.TYPE_SEPARATOR); do_check_eq((yield PlacesUtils.keywords.fetch({ url: this._uri1.spec })).keyword, "testkeyword");
do_check_eq(as.getPageAnnotation(this._uri2, "anno"), "anno");
do_check_eq(as.getItemAnnotation(this._bookmarkId, "anno"), "anno");
do_check_eq(ts.getTagsForURI(this._uri1).length, 1); yield new Promise(resolve => {
do_check_eq(bs.getKeywordForBookmark(this._bookmarkId), "testkeyword"); fs.getFaviconURLForPage(this._uri2, aFaviconURI => {
do_check_eq(as.getPageAnnotation(this._uri2, "anno"), "anno"); do_check_true(aFaviconURI.equals(SMALLPNG_DATA_URI));
do_check_eq(as.getItemAnnotation(this._bookmarkId, "anno"), "anno"); resolve();
});
fs.getFaviconURLForPage(this._uri2, function (aFaviconURI) { });
do_check_true(aFaviconURI.equals(SMALLPNG_DATA_URI)); })
aCallback();
});
}.bind(this));
}.bind(this));
}
}); });
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -1290,13 +1291,7 @@ add_task(function test_preventive_maintenance()
// Check the lastMaintenance time has been saved. // Check the lastMaintenance time has been saved.
do_check_neq(Services.prefs.getIntPref("places.database.lastMaintenance"), null); do_check_neq(Services.prefs.getIntPref("places.database.lastMaintenance"), null);
if (test.asyncCheck) { yield test.check();
let deferred = Promise.defer();
test.asyncCheck(deferred.resolve);
yield deferred.promise;
} else {
test.check();
}
cleanDatabase(); cleanDatabase();
} }

Просмотреть файл

@ -147,9 +147,9 @@ function* compareToNode(aItem, aNode, aIsRootItem, aExcludedGuids = []) {
let itemURI = uri(aNode.uri); let itemURI = uri(aNode.uri);
compare_prop_to_value("charset", compare_prop_to_value("charset",
yield PlacesUtils.getCharsetForURI(itemURI)); yield PlacesUtils.getCharsetForURI(itemURI));
compare_prop_to_value("keyword",
PlacesUtils.bookmarks let entry = yield PlacesUtils.keywords.fetch({ url: aNode.uri });
.getKeywordForBookmark(aNode.itemId)); compare_prop_to_value("keyword", entry ? entry.keyword : null);
if ("title" in aItem) if ("title" in aItem)
compare_prop("title"); compare_prop("title");
@ -251,7 +251,3 @@ add_task(function* () {
do_check_eq(guidsPassedToExcludeCallback.size, 4); do_check_eq(guidsPassedToExcludeCallback.size, 4);
do_check_eq(placesRootWithoutTheMenu.children.length, 2); do_check_eq(placesRootWithoutTheMenu.children.length, 2);
}); });
function run_test() {
run_next_test();
}

Просмотреть файл

@ -86,8 +86,8 @@ add_task(function test() {
do_print("Sort by keyword asc"); do_print("Sort by keyword asc");
result.sortingMode = NHQO.SORT_BY_KEYWORD_ASCENDING; result.sortingMode = NHQO.SORT_BY_KEYWORD_ASCENDING;
checkOrder(id3, id2, id1); // no keywords set - falling back to title sort checkOrder(id3, id2, id1); // no keywords set - falling back to title sort
PlacesUtils.bookmarks.setKeywordForBookmark(id1, "a"); yield PlacesUtils.keywords.insert({ url: uri1.spec, keyword: "a" });
PlacesUtils.bookmarks.setKeywordForBookmark(id2, "z"); yield PlacesUtils.keywords.insert({ url: uri2.spec, keyword: "z" });
checkOrder(id3, id1, id2); checkOrder(id3, id1, id2);
// XXXtodo: test history sortings (visit count, visit date) // XXXtodo: test history sortings (visit count, visit date)

Просмотреть файл

@ -42,7 +42,7 @@ add_task(function test_execute()
PlacesUtils.bookmarks.DEFAULT_INDEX, PlacesUtils.bookmarks.DEFAULT_INDEX,
"moz test"); "moz test");
PlacesUtils.tagging.tagURI(uri, ["tag"]); PlacesUtils.tagging.tagURI(uri, ["tag"]);
PlacesUtils.bookmarks.setKeywordForBookmark(itemId, "keyword"); yield PlacesUtils.keywords.insert({ url: uri.spec, keyword: "keyword"});
// Set a large annotation. // Set a large annotation.
let content = ""; let content = "";

Просмотреть файл

@ -14,6 +14,9 @@ const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
const { promiseInvoke } = devtools.require("devtools/async-utils"); const { promiseInvoke } = devtools.require("devtools/async-utils");
const Services = devtools.require("Services"); const Services = devtools.require("Services");
// Always log packets when running tests. runxpcshelltests.py will throw
// the output away anyway, unless you give it the --verbose flag.
Services.prefs.setBoolPref("devtools.debugger.log", true);
// Enable remote debugging for the relevant tests. // Enable remote debugging for the relevant tests.
Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true); Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true);

Просмотреть файл

@ -660,10 +660,8 @@ function getCanStageUpdates() {
// For Gonk, the updater will remount the /system partition to move staged // For Gonk, the updater will remount the /system partition to move staged
// files into place. // files into place.
if (AppConstants.platform == "gonk") { if (AppConstants.platform == "gonk") {
if (getPref("getBoolPref", PREF_APP_UPDATE_SERVICE_ENABLED, false)) { LOG("getCanStageUpdates - able to stage updates because this is gonk");
LOG("getCanStageUpdates - able to stage updates because this is gonk");
return true; return true;
}
} }
if (!hasUpdateMutex()) { if (!hasUpdateMutex()) {

Просмотреть файл

@ -83,7 +83,7 @@ support-files = chrome_context_menus_win.xul
[test_plugin_input_event.html] [test_plugin_input_event.html]
skip-if = toolkit != "windows" skip-if = toolkit != "windows"
[test_mouse_scroll.xul] [test_mouse_scroll.xul]
skip-if = true skip-if = toolkit != "windows"
support-files = window_mouse_scroll_win.html support-files = window_mouse_scroll_win.html
# Privacy relevant # Privacy relevant

Просмотреть файл

@ -1297,11 +1297,6 @@ void nsWindow::SetThemeRegion()
void nsWindow::ConfigureAPZCTreeManager() void nsWindow::ConfigureAPZCTreeManager()
{ {
// We currently only enable APZ for E10s windows.
if (!mozilla::BrowserTabsRemoteAutostart() || !mRequireOffMainThreadCompositing) {
return;
}
nsBaseWidget::ConfigureAPZCTreeManager(); nsBaseWidget::ConfigureAPZCTreeManager();
// When APZ is enabled, we can actually enable raw touch events because we // When APZ is enabled, we can actually enable raw touch events because we

Просмотреть файл

@ -2,4 +2,3 @@
skip-if = buildapp == 'b2g' skip-if = buildapp == 'b2g'
[test_hiddenPrivateWindow.xul] [test_hiddenPrivateWindow.xul]
skip-if = toolkit == "windows"