Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2014-11-21 13:00:50 +01:00
commit 6e7313843d
23 changed files with 815 additions and 67 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a47dd04f8f66e42fd331711140f2c3e2fed0767d"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a47dd04f8f66e42fd331711140f2c3e2fed0767d"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "830d094e31350d07d6354deafbd58a19b2ac0236",
"revision": "dc9a51bd4d985bcb30c9a4413bdb5084f0f500ea",
"repo_path": "integration/gaia-central"
}

View File

@ -17,11 +17,11 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d695e7cdcd162e779e15594054931c84dec34a95"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="25388c6bce932657ebf93adedf31881bfaf88c15"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6a8f8bd05043e7b8f8e26ad390c82021b995ee4d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ce96da28ea23c3d6804d13dc00d886cdb797134"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -96,8 +96,8 @@ browser.jar:
content/browser/loop/shared/sounds/connected.ogg (content/shared/sounds/connected.ogg)
content/browser/loop/shared/sounds/terminated.ogg (content/shared/sounds/terminated.ogg)
content/browser/loop/shared/sounds/room-joined.ogg (content/shared/sounds/room-joined.ogg)
content/browser/loop/shared/sounds/room-joined-in.org (content/shared/sounds/room-joined-in.ogg)
content/browser/loop/shared/sounds/room-left.org (content/shared/sounds/room-left.ogg)
content/browser/loop/shared/sounds/room-joined-in.ogg (content/shared/sounds/room-joined-in.ogg)
content/browser/loop/shared/sounds/room-left.ogg (content/shared/sounds/room-left.ogg)
content/browser/loop/shared/sounds/failure.ogg (content/shared/sounds/failure.ogg)
# Partner SDK assets

View File

@ -65,6 +65,7 @@ ROBOCOP_FILES := \
$(wildcard $(TESTPATH)/*.mp4) \
$(wildcard $(TESTPATH)/*.webm) \
$(wildcard $(TESTPATH)/*.swf) \
$(wildcard $(TESTPATH)/reader_mode_pages) \
$(NULL)
ROBOCOP_DEST = $(DEPTH)/_tests/testing/mochitest/tests/robocop/

View File

@ -599,13 +599,14 @@ Nfc.prototype = {
*/
receiveMessage: function receiveMessage(message) {
let isRFAPI = message.name == "NFC:ChangeRFState";
if (!isRFAPI) {
if (this.rfState != NFC.NFC_RF_STATE_DISCOVERY) {
let isSendFile = message.name == "NFC:SendFile";
if (!isRFAPI && (this.rfState != NFC.NFC_RF_STATE_DISCOVERY)) {
debug("NFC is not enabled. current rfState:" + this.rfState);
this.sendNfcErrorResponse(message, NFC.NFC_GECKO_ERROR_NOT_ENABLED);
return null;
}
if (!isRFAPI && !isSendFile) {
// Update the current sessionId before sending to the NFC service.
message.data.sessionId = SessionHelper.getId(message.data.sessionToken);
}

View File

@ -19,6 +19,7 @@ qemu = true
[test_incoming_hold_resume.js]
[test_outgoing_hold_resume.js]
[test_incoming_already_connected.js]
disabled = Bug 1098193
[test_incoming_answer_remote_hangup.js]
[test_incoming_connecting_hangup.js]
[test_incoming_connecting_remote_hangup.js]
@ -50,20 +51,31 @@ disabled = Bug 821958
[test_audiomanager_phonestate.js]
[test_outgoing_answer_radio_off.js]
[test_conference_two_calls.js]
disabled = Bug 1098193
[test_conference_add_error.js]
disabled = Bug 1098193
[test_conference_remove_error.js]
disabled = Bug 1098193
[test_conference_two_hangup_all.js]
disabled = Bug 1098193
[test_conference_two_hangup_one.js]
disabled = Bug 1098193
[test_conference_two_hold_resume.js]
disabled = Bug 1098193
[test_conference_two_remove_one.js]
disabled = Bug 1098193
[test_conference_three_hangup_one.js]
disabled = Bug 1098193
[test_conference_three_remove_one.js]
disabled = Bug 1098193
[test_conference_add_twice_error.js]
disabled = Bug 1098193
[test_outgoing_when_two_calls_on_line.js]
[test_call_presentation.js]
[test_temporary_clir.js]
[test_outgoing_error_state.js]
[test_outgoing_auto_hold.js]
disabled = Bug 1098193
[test_mmi.js]
[test_mmi_change_pin.js]
[test_mmi_call_forwarding.js]

View File

@ -121,6 +121,7 @@ static const char sPrintOptionsContractID[] =
#include <stdio.h>
#include "mozilla/dom/Element.h"
#include "mozilla/Telemetry.h"
using namespace mozilla;
using namespace mozilla::dom;
@ -1199,6 +1200,7 @@ nsDocumentViewer::PermitUnloadInternal(bool aCallerClosesWindow,
nsAutoSyncOperation sync(mDocument);
mInPermitUnloadPrompt = true;
mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_COUNT, 1);
rv = prompt->ConfirmEx(title, message, buttonFlags,
leaveLabel, stayLabel, nullptr, nullptr,
&dummy, &buttonPressed);
@ -1213,12 +1215,15 @@ nsDocumentViewer::PermitUnloadInternal(bool aCallerClosesWindow,
// XXX: Are there other cases where prompts can abort? Is it ok to
// prevent unloading the page in those cases?
if (NS_FAILED(rv)) {
mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION, 2);
*aPermitUnload = false;
return NS_OK;
}
// Button 0 == leave, button 1 == stay
*aPermitUnload = (buttonPressed == 0);
mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION,
(*aPermitUnload ? 1 : 0));
// If the user decided to go ahead, make sure not to prompt the user again
// by toggling the internal prompting bool to false:
if (*aPermitUnload) {

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,373 @@
<!DOCTYPE html>
<html lang="en-US" dir="ltr" id="developer-mozilla-org" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#">
<head>
<title>Building XULRunner | MDN</title>
<meta charset="utf-8">
<meta name="robots" content="index, follow">
<link rel="home" href="https://developer.mozilla.org/en-US/">
<link rel="copyright" href="Build_Instructions.html#copyright">
<link rel="shortcut icon" href="../../media/img/favicon.ico">
<!--[if !IE 6]><!-->
<link rel="stylesheet" media="screen,projection,tv" href="../../media/css/mdn-min.css%3Fbuild=f424781.css" />
<link rel="stylesheet" media="screen,projection,tv" href="../../media/css/wiki-min.css%3Fbuild=f424781.css" />
<!--<![endif]-->
<!--[if IE]><link rel="stylesheet" type="text/css" media="all" href="//developer.mozilla.org/media/css/mdn-ie.css"><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" media="all" href="//developer.mozilla.org/media/css/mdn-ie7.css"><![endif]-->
<!--[if lte IE 6]><link rel="stylesheet" type="text/css" media="all" href="//developer.mozilla.org/media/css/mdn-ie6.css"><![endif]-->
<link rel="stylesheet" type="text/css" media="print" href="../../media/css/mdn-print.css">
<link rel="stylesheet" href="../../../www.mozilla.org/tabzilla/media/css/tabzilla.css">
<link rel="stylesheet" media="print" href="../../media/css/wiki-print-min.css%3Fbuild=f424781.css" />
<link rel="stylesheet" type="text/css"
href="../../en-US/docs/Template:CustomCSS%3Fraw=1.css" />
<!--[if IE]>
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<script src="//developer.mozilla.org/media/js/html5.js"></script>
<![endif]-->
<link rel="alternate" type="application/json" href="https://developer.mozilla.org/en-US/docs/XULRunner/Build_Instructions$json" />
<link rel="canonical" href="Build_Instructions.html" />
<meta property="og:title" content="Building XULRunner"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="https://developer.mozilla.org/media/img/mdn-logo-sm.png"/>
<meta property="og:site_name" content="Mozilla Developer Network"/>
<meta property="og:description" content="XULRunner is built using basically the same process as Firefox or other applications. Please read and follow the general Build Documentation for instructions on how to get sources and set up build prerequisites."/>
<meta name="description" content="XULRunner is built using basically the same process as Firefox or other applications. Please read and follow the general Build Documentation for instructions on how to get sources and set up build prerequisites." />
</head>
<body id="" class="html-ltr document" role="document">
<!--[if lte IE 8]>
<noscript><div class="global-notice">
<p><strong>Warning:</strong> The Mozilla Developer Network website employs emerging web standards that may not be fully supported in some versions of MicroSoft Internet Explorer. You can improve your experience of this website by enabling JavaScript.</p>
</div></noscript>
<![endif]-->
<header id="masthead" class="minor">
<div class="wrap">
<ul id="nav-access">
<li><a href="Build_Instructions.html#language">Select language</a></li>
<li><a href="Build_Instructions.html#q">Skip to search</a></li>
<li><a href="Build_Instructions.html#content">Skip to main content</a></li>
</ul>
<div id="branding">
<div id="logo"><a href="https://developer.mozilla.org/en-US/"><img src="../../media/img/mdn-logo-sm.png" alt="Mozilla Developer Network" title="Mozilla Developer Network" width="62" height="71"> Mozilla Developer Network</a></div>
</div>
<nav id="nav">
<ul id="nav-main" role="menubar">
<li id="nav-main-topics" class="menu" role="menuitem"><a href="Build_Instructions.html#nav-sub-topics" class="toggle" aria-haspopup="true" aria-labelledby="nav-main-topics" title="Explore other parts of MDN">Topics</a>
<ul id="nav-sub-topics" class="sub-menu" aria-hidden="true">
<li id="nav-sub-web"><a href="https://developer.mozilla.org/en-US/web">Web</a></li>
<li id="nav-sub-apps"><a href="https://developer.mozilla.org/en-US/apps">Apps</a></li>
<li id="nav-sub-mobile"><a href="https://developer.mozilla.org/en-US/mobile">Mobile</a></li>
<li id="nav-sub-addons"><a href="https://developer.mozilla.org/en-US/addons">Add-ons</a></li>
<li id="nav-sub-mozilla"><a href="https://developer.mozilla.org/en-US/mozilla">Mozilla</a></li>
</ul>
</li>
<li id="nav-main-docs" class="menu" role="menuitem">
<a href="https://developer.mozilla.org/en-US/docs" class="docs toggle" aria-haspopup="true" aria-labelledby="nav-main-docs">Docs</a>
<div id="nav-sub-docs" class="sub-menu" aria-hidden="true">
<ul>
<li>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/HTML">HTML</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/DOM">DOM</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Using_HTML5_audio_and_video_in_Firefox">Video</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Using_HTML5_audio_and_video_in_Firefox">Audio</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/SVG">SVG</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/WebGL">WebGL</a></li>
</ul>
</li>
<li>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/HTML/HTML5">HTML5</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/WebSockets">WebSockets</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache">Offline Cache</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/DOM/Storage">Local Storage</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/IndexedDB">IndexedDB</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications">File API</a></li>
</ul>
</li>
<li>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS">CSS</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_gradients">Gradients</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_transforms">Transforms</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_transitions">Transitions</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS/Using_CSS_animations">Animations</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/CSS/Media_queries">Media Queries</a></li>
</ul>
</li>
<li>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/JavaScript">JavaScript</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/AJAX">AJAX</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/HTML/Canvas">Canvas</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/Using_geolocation">Geolocation</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/DragDrop/Drag_and_Drop">Drag &amp; Drop</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers">Web Workers</a></li>
</ul>
</li>
</ul>
<p><a href="https://developer.mozilla.org/en-US/docs">More docs&hellip;</a></p>
</div>
</li>
<li id="nav-main-demos" role="menuitem"><a href="https://developer.mozilla.org/en-US/demos/" class="demos">Demos</a></li>
<li id="nav-main-learning" role="menuitem"><a href="https://developer.mozilla.org/en-US/learn" class="learning">Learning</a></li>
<li id="nav-main-community" class="menu" role="menuitem"><a href="Build_Instructions.html#nav-sub-community" class="community toggle" aria-haspopup="true" aria-labelledby="nav-main-community">Community</a>
<ul id="nav-sub-community" class="sub-menu">
<li><a href="https://developer.mozilla.org/en-US/events">Events</a></li>
<li><a href="https://developer.mozilla.org/en-US/discussions">Discussions</a></li>
<li><a href="https://developer.mozilla.org/en-US/promote">Promote</a></li>
</ul>
</li>
</ul>
</nav>
<ul class="user-state signed-out">
<li class="user-signin menu">
<form class="browserid" action="https://developer.mozilla.org/en-US/users/browserid_verify" method="POST"><div style='display:none;'><input type='hidden' id='csrfmiddlewaretoken' name='csrfmiddlewaretoken' value='c92fde167c4768ad483a05412bede68c' /></div>
<input id="next" name="next" type="hidden" value="/en-US/docs/XULRunner/Build_Instructions"/>
<input required="required" type="hidden" name="assertion" id="id_assertion" />
<a href="Build_Instructions.html#" target="_blank" class="browserid-signin toggle" aria-haspopup="true" title="Sign in with Persona">Sign in</a>
<div class="browserid-info sub-menu" aria-hidden="true">
<h3>What's this?</h3> <p>MDN has switched to <a href="https://persona.org/" target="_blank" rel="external">Persona</a>, a safe and simple way to sign in with just your e-mail address. <a href="http://identity.mozilla.com/post/12950196039/deploying-browserid-at-mozilla" rel="external">Learn more about why Mozilla is using Persona</a>.</p> <p><strong>Returning members:</strong> sign in with Persona and you'll be connected to your MDN profile (all your information is still here).</p> <p><strong>New members:</strong> sign in with Persona first, then you'll be able to set up your new MDN profile.</p> <p><a href="Build_Instructions.html#" target="_blank" class="browserid-signin" title="Sign in with Persona">Sign in</a></p>
</div>
</form>
</li>
</ul>
<form id="site-search" method="get" action="http://www.google.com/search"
data-url="/en-US/search">
<p>
<input type="text" role="search" placeholder="Search MDN" id="q" name="q" value="">
<noscript><button type="submit">Search</button></noscript>
</p>
<input type="hidden" name="sitesearch" value="developer.mozilla.org">
<div id="site-search-gg"></div>
</form>
<a href="http://www.mozilla.org/" id="tabzilla">mozilla</a>
</div>
</header>
<!-- top toolbar -->
<section id="nav-toolbar"><div><div class="wrap">
<!-- right floated navigation -->
<nav id="tool-menus" role="navigation">
<ul id="tools">
<li class="menu">
<a href="Build_Instructions.html#page-tools" class="toggle">This page</a>
<ul id="page-tools" class="sub-menu">
<li class="page-print"> <a href="Build_Instructions.html#" onclick="return window.print();" title="Print page">Print page</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/new?parent=15078">New sub-page</a></li>
</ul>
</li>
<li class="menu">
<a href="Build_Instructions.html#" class="toggle">Languages</a>
<ul id="translations">
<li><a rel="internal" href="https://developer.mozilla.org/ja/docs/XULRunner/Build_Instructions" title="Building XULRunner">日本語</a></li>
<li><a href="https://developer.mozilla.org/en-US/docs/XULRunner/Build_Instructions$locales">Add translation</a></li>
</ul>
</li>
</ul>
</nav>
<!-- left crumb navigation -->
<nav class="crumbs" role="navigation">
<ol>
<li class="crumb"><a href="https://developer.mozilla.org/en-US/docs/en">MDN</a></li>
<li class="crumb"><a href="https://developer.mozilla.org/en-US/docs/XULRunner">XULRunner</a></li>
<li class="crumb">Building XULRunner</li>
</ol>
</nav>
</div></div></section>
<section id="content">
<div class="wrap">
<div id="content-main" class="full">
<article class="article" role="main"
data-current-revision="129041"
data-refresh-message="Your changes were merged. However, something else has been edited, so this page will be refreshed to reflect the changes."
data-cancel-edit-message="Abort editing in progress? Your unsaved changes will be discarded.">
<header id="article-head">
<div class="title">
<h1 class="page-title">Building XULRunner</h1>
</div>
<ul id="page-buttons">
<li class="page-history"><a href="https://developer.mozilla.org/en-US/docs/XULRunner/Build_Instructions$history">History</a></li>
<li class="page-edit"><a href="https://developer.mozilla.org/en-US/docs/XULRunner/Build_Instructions$edit">Edit</a></li>
</ul>
</header>
<div id="wikiArticle" class="page-content boxed">
<div id="article-nav">
<div class="page-toc">
<h2>Table of Contents</h2>
<ol>
<code></code><li><ol><li><a href="Build_Instructions.html#CVS_tags_and_XULRunner_versions" rel="internal">CVS tags and XULRunner versions</a><li><a href="Build_Instructions.html#Fetching_Sources_from_Mercurial" rel="internal">Fetching Sources from Mercurial</a></ol></li>
</ol>
</div>
<ul class="page-anchors">
<li class="anchor-tags">
<a href="Build_Instructions.html#page-tags">Tags</a>
</li>
<li class="anchor-files">
<span title="This document has no attachments">Files</span>
</li>
</ul>
</div>
<p> </p>
<p><a href="https://developer.mozilla.org/en/XULRunner" title="en/XULRunner">XULRunner</a> is built using basically the same process as Firefox or other applications. Please read and follow the general <a href="https://developer.mozilla.org/En/Developer_Guide/Build_Instructions" title="En/Developer_Guide/Build_Instructions">Build Documentation</a> for instructions on how to get sources and set up build prerequisites.</p>
<p>By default, XULRunner is built with <a href="https://developer.mozilla.org/en/JavaXPCOM" title="en/JavaXPCOM">JavaXPCOM</a> support; the build system must be able to find an appropriate JDK on the system; see the instructions on <a href="https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Building_JavaXPCOM" title="En/Developer_Guide/Build_Instructions/Building_JavaXPCOM">Building JavaXPCOM</a> for more details. If you do not want to build JavaXPCOM support, specify <code>--disable-javaxpcom</code> in your configuration.</p>
<p>On Mac, XULRunner requires Mac OS X 10.3 or higher and XCode 1.5 or higher to build properly. The runtime requirement is Mac OS X 10.2.</p>
<p>A basic minimal <a href="https://developer.mozilla.org/en/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File" title="en/Configuring_Build_Options#Using_a_.mozconfig_Configuration_File">mozconfig</a> which will build a release configuration of XULRunner is:</p>
<pre class="eval">mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_OBJDIR=@topsrcdir@/obj-xulrunner
ac_add_options --enable-application=xulrunner
#Uncomment the following line if you don't want to build JavaXPCOM:
#ac_add_options --disable-javaxpcom
</pre>
<h3 id="CVS_tags_and_XULRunner_versions">CVS tags and XULRunner versions</h3>
<p>Older XULRunner releases where tagged in CVS with (for instance XULRUNNER_1_8_0_5_RELEASE ) up to version 1.8.0.5</p>
<p>The CVS repository does not have specific tags for XULRunner anymore. Instead a XULRunner build is a just special build made from the Firefox/Mozilla tree, using the same tag as a Firefox build. There is a convention where a certain XULRunner version maps to a certain tag in the CVS.</p>
<p>For instance XULRunner 1.8.1.3, the corresponding tag is CVS is : FIREFOX_2_0_0_3_RELEASE</p>
<p>To find out how those Firefox tags and XULRunner version maps, check out the file mozilla/config/milestone.txt .</p>
<p>You can also check the User Agent string in Firefox Help/About menu to get the mapping from a certain binary Firefox version to the corresponding XULRunner version. For instance, in Firefox 2.0.0.9 you will get :</p>
<pre class="eval">Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
</pre>
<p>Therefore the XULRunner version for this Firefox version is : 1.8.1.9</p>
<h3 id="Fetching_Sources_from_Mercurial">Fetching Sources from Mercurial</h3>
<p>As with all other Mozilla products, one would fetch recent sources from Mercurial. For example, to build XULRunner with the top of the tree:</p>
<pre>hg clone http://hg.mozilla.org/mozilla-central/ src
cd src
echo ". \$topsrcdir/xulrunner/config/mozconfig" &gt; .mozconfig
make -f client.mk build
</pre>
<p><span>Interwiki Language Links</span></p>
<p></p>
</div>
<section class="page-meta">
<section id="page-tags">
<h2>Tags (4)</h2>
<div id="deki-page-tags">
<ul class="tags tagit ui-widget ui-widget-content">
<li class="tagit-choice ui-widget-content ui-state-default">
<a class="text tagit-label" href="https://developer.mozilla.org/en-US/docs/tag/Developing%20Mozilla">Developing Mozilla</a>
</li>
<li class="tagit-choice ui-widget-content ui-state-default">
<a class="text tagit-label" href="https://developer.mozilla.org/en-US/docs/tag/XUL">XUL</a>
</li>
<li class="tagit-choice ui-widget-content ui-state-default">
<a class="text tagit-label" href="https://developer.mozilla.org/en-US/docs/tag/XULRunner">XULRunner</a>
</li>
<li class="tagit-choice ui-widget-content ui-state-default">
<a class="text tagit-label" href="https://developer.mozilla.org/en-US/docs/tag/Build%20documentation">Build documentation</a>
</li>
</ul>
</div>
</section>
<section id="doc-contributors">
Contributors to this page: <a href="https://developer.mozilla.org/en-US/profiles/Kray2">Kray2</a>, <a href="https://developer.mozilla.org/en-US/profiles/Taken">Taken</a>, <a href="https://developer.mozilla.org/en-US/profiles/Kozawa">Kozawa</a>, <a href="https://developer.mozilla.org/en-US/profiles/Benjamin%20Smedberg">Benjamin Smedberg</a>, <a href="https://developer.mozilla.org/en-US/profiles/Nickolay">Nickolay</a>, <a href="https://developer.mozilla.org/en-US/profiles/NickolayBot">NickolayBot</a>, <a href="https://developer.mozilla.org/en-US/profiles/Pombredanne">Pombredanne</a>
<br />
Last updated by:
<a href="https://developer.mozilla.org/en-US/profiles/Taken">Taken</a>,
<time datetime="2009-10-08T15:16:43-07:00">Oct 8, 2009 3:16:43 PM</time>
</section>
</section>
</article>
<form id="wiki-page-edit" class="editing" method="post" action="https://developer.mozilla.org/en-US/docs/XULRunner/Build_Instructions$edit"><div style='display:none;'><input type='hidden' name='csrfmiddlewaretoken' value='c92fde167c4768ad483a05412bede68c' /></div>
<input type="hidden" name="form" id="form" value="rev" />
<input type="hidden" name="content" id="content" value="" />
</form>
</div>
</div>
</section>
<section id="footbar">
<div class="wrap">
<p>
What do you think of the new MDN? Please <a href="http://mdn.uservoice.com/forums/51389-mdn-website-feedback-http-developer-mozilla-org">share your feedback</a> with us. <a id="dev-mdc-link" href="https://lists.mozilla.org/listinfo/dev-mdc">Join our mailing list</a> to discuss ways to help create great documentation. </p>
</div>
</section>
<footer id="site-info" class="footer" role="contentinfo">
<div class="wrap">
<div id="legal">
<img src="../../media/img/mdn-logo-tiny.png" alt="" width="42" height="48">
<p id="copyright">&copy; 2005 - 2012 Mozilla Developer Network and individual contributors</p>
<p>
Content is available under <a href="https://developer.mozilla.org/en-US/docs/Project:Copyrights">these licenses</a> &bull; <a href="https://developer.mozilla.org/en-US/docs/Project:About">About MDN</a> &bull;
<a href="http://www.mozilla.org/en-US/privacy">Privacy Policy</a> &bull;
<a href="https://developer.mozilla.org/discussions">Help</a></p>
</div>
<ul class="user-state signed-out">
<li class="user-signin menu">
<form class="browserid" action="https://developer.mozilla.org/en-US/users/browserid_verify" method="POST"><div style='display:none;'><input type='hidden' name='csrfmiddlewaretoken' value='c92fde167c4768ad483a05412bede68c' /></div>
<input id="next" name="next" type="hidden" value="/en-US/docs/XULRunner/Build_Instructions"/>
<input required="required" type="hidden" name="assertion" id="id_assertion" />
<a href="Build_Instructions.html#" target="_blank" class="browserid-signin toggle" aria-haspopup="true" title="Sign in with Persona">Sign in</a>
<div class="browserid-info sub-menu" aria-hidden="true">
<h3>What's this?</h3> <p>MDN has switched to <a href="https://persona.org/" target="_blank" rel="external">Persona</a>, a safe and simple way to sign in with just your e-mail address. <a href="http://identity.mozilla.com/post/12950196039/deploying-browserid-at-mozilla" rel="external">Learn more about why Mozilla is using Persona</a>.</p> <p><strong>Returning members:</strong> sign in with Persona and you'll be connected to your MDN profile (all your information is still here).</p> <p><strong>New members:</strong> sign in with Persona first, then you'll be able to set up your new MDN profile.</p> <p><a href="Build_Instructions.html#" target="_blank" class="browserid-signin" title="Sign in with Persona">Sign in</a></p>
</div>
</form>
</li>
</ul>
<form class="languages go" method="get" action="https://developer.mozilla.org/en-US/docs">
<label for="language">Other languages:</label>
<select id="language" class="wiki-l10n" name="next" dir="ltr">
<option value="/en-US/docs/XULRunner/Build_Instructions" selected>
English (US)
</option>
<option value="/ja/docs/XULRunner/Build_Instructions">
日本語
</option> </select>
<noscript><button type="submit">Go</button></noscript>
</form>
</div>
</footer>
<script src="../../en-US/jsi18n/build:f424781"></script>
<script src="../../../www.google.com/jsapi" type="text/javascript"></script>
<script src="../../../login.persona.org/include.js" type="text/javascript" async></script>
<script src="../../../www.mozilla.org/tabzilla/media/js/tabzilla.js" async></script>
<script src="../../media/js/mdn-min.js%3Fbuild=f424781"></script>
<script src="../../media/js/wiki-min.js%3Fbuild=f424781"></script>
<script type="text/javascript">
//<![CDATA[
var _tag=new WebTrends();
_tag.dcsGetId();
//]]>>
</script>
<script type="text/javascript">
//<![CDATA[
_tag.dcsCollect();
//]]>>
</script>
<noscript>
<div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="../../../statse.webtrendslive.com/dcs8yrjuavz5bdaun34r2o8bi_8o8x/njs.gif%3Fdcsuri=%252Fnojavascript&amp;WT.js=No&amp;WT.tv=8.6.2"/></div>
</noscript>
</body>
</html>

View File

@ -5,62 +5,87 @@
const { utils: Cu } = Components;
Cu.import("resource://gre/modules/osfile.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
// Values from robocop_article.html
const ARTICLE = {
url: "http://mochi.test:8888/tests/robocop/robocop_article.html",
let Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader;
const URL_PREFIX = "http://mochi.test:8888/tests/robocop/reader_mode_pages/";
let TEST_PAGES = [
{
url: URL_PREFIX + "basic_article.html",
expected: {
title: "Article title",
byline: "by Jane Doe",
excerpt: "This is the article description.",
length: 1931,
content: "Lorem ipsum..." // This test doesn't actually compare content strings
};
const ARTICLE_URI = Services.io.newURI(ARTICLE.url, null, null);
length: 1931
}
},
{
url: URL_PREFIX + "addons.mozilla.org/en-US/firefox/index.html",
expected: null
},
{
url: URL_PREFIX + "developer.mozilla.org/en/XULRunner/Build_Instructions.html",
expected: {
title: "Building XULRunner | MDN",
byline: null,
excerpt: "XULRunner is built using basically the same process as Firefox or other applications. Please read and follow the general Build Documentation for instructions on how to get sources and set up build prerequisites.",
length: 2300
}
},
];
add_task(function* test_article_not_found() {
let Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader;
let article = yield Reader.getArticleFromCache(ARTICLE_URI);
let uri = Services.io.newURI(TEST_PAGES[0].url, null, null);
let article = yield Reader.getArticleFromCache(uri);
do_check_eq(article, null);
});
add_task(function* test_store_article() {
let Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader;
// Create an article object to store in the cache.
yield Reader.storeArticleInCache({
url: TEST_PAGES[0].url,
content: "Lorem ipsum",
title: TEST_PAGES[0].expected.title,
byline: TEST_PAGES[0].expected.byline,
excerpt: TEST_PAGES[0].expected.excerpt,
length: TEST_PAGES[0].expected.length
});
yield Reader.storeArticleInCache(ARTICLE);
let article = yield Reader.getArticleFromCache(ARTICLE_URI);
checkArticle(article);
let uri = Services.io.newURI(TEST_PAGES[0].url, null, null);
let article = yield Reader.getArticleFromCache(uri);
checkArticle(article, TEST_PAGES[0]);
});
add_task(function* test_remove_article() {
let Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader;
yield Reader.removeArticleFromCache(ARTICLE_URI);
let article = yield Reader.getArticleFromCache(ARTICLE_URI);
let uri = Services.io.newURI(TEST_PAGES[0].url, null, null);
yield Reader.removeArticleFromCache(uri);
let article = yield Reader.getArticleFromCache(uri);
do_check_eq(article, null);
});
add_task(function* test_parse_article() {
let Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader;
let article = yield Reader._downloadAndParseDocument(ARTICLE.url);
checkArticle(article);
add_task(function* test_parse_articles() {
for (let testcase of TEST_PAGES) {
let article = yield Reader._downloadAndParseDocument(testcase.url);
checkArticle(article, testcase);
}
});
function checkArticle(article) {
function checkArticle(article, testcase) {
if (testcase.expected == null) {
do_check_eq(article, null);
return;
}
do_check_neq(article, null);
do_check_neq(article.content, null);
do_check_eq(article.url, ARTICLE.url);
do_check_eq(article.title, ARTICLE.title);
do_check_eq(article.byline, ARTICLE.byline);
do_check_eq(article.excerpt, ARTICLE.excerpt);
do_check_eq(article.length, ARTICLE.length);
do_check_eq(!!article.content, true); // A bit of a hack to avoid spamming the test log.
do_check_eq(article.url, testcase.url);
do_check_eq(article.title, testcase.expected.title);
do_check_eq(article.byline, testcase.expected.byline);
do_check_eq(article.excerpt, testcase.expected.excerpt);
do_check_eq(article.length, testcase.expected.length);
}
run_next_test();

View File

@ -199,7 +199,7 @@ Readability.prototype = {
// In some cases a body element can't be found (if the HTML is
// totally hosed for example) so we create a new body node and
// append it to the document.
if (doc.body === null) {
if (!doc.body) {
let body = doc.createElement("body");
try {

View File

@ -6868,5 +6868,16 @@
"expires_in_version": "40",
"kind": "boolean",
"description": "Whether the e10s pref was set but it was blocked from running due to blacklisted conditions"
},
"ONBEFOREUNLOAD_PROMPT_ACTION" : {
"expires_in_version": "45",
"kind": "enumerated",
"n_values": 3,
"description": "What button a user clicked in an onbeforeunload prompt. (Stay on Page = 0, Leave Page = 1, prompt aborted = 2)"
},
"ONBEFOREUNLOAD_PROMPT_COUNT" : {
"expires_in_version": "45",
"kind": "count",
"description": "How many onbeforeunload prompts has the user encountered in their session?"
}
}