From 4de46e8113001f2251d5a251c6b748510c77ff4d Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 9 Jul 2013 09:55:08 +0200 Subject: [PATCH 01/42] Bug 884840: Added DBusReplyHandler, r=qdot Handler functions for DBus replies sometimes need several data fields or need to keep state over replies for multiple messages. The DBus API itself only allows for a single pointer to user data. The class DBusReplyHandler is a base class for implementing DBus reply- message handlers. Users of DBus can inherit from this class to implement message-specific handlers. --HG-- extra : rebase_source : 91c5f6e8d365922fd3b52fbaf502052f86274f16 --- ipc/dbus/DBusUtils.cpp | 10 ++++++++++ ipc/dbus/DBusUtils.h | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ipc/dbus/DBusUtils.cpp b/ipc/dbus/DBusUtils.cpp index 80701010b3ab..0f119234c14c 100644 --- a/ipc/dbus/DBusUtils.cpp +++ b/ipc/dbus/DBusUtils.cpp @@ -647,5 +647,15 @@ int dbus_returns_uint32(DBusMessage *reply) return ret; } +void DBusReplyHandler::Callback(DBusMessage* aReply, void* aData) +{ + MOZ_ASSERT(aData); + + nsRefPtr handler = + already_AddRefed(static_cast(aData)); + + handler->Handle(aReply); +} + } } diff --git a/ipc/dbus/DBusUtils.h b/ipc/dbus/DBusUtils.h index a1ec0ebadb1a..b3f0f018ce68 100644 --- a/ipc/dbus/DBusUtils.h +++ b/ipc/dbus/DBusUtils.h @@ -20,6 +20,7 @@ #define mozilla_ipc_dbus_dbusutils_h__ #include +#include "mozilla/RefPtr.h" #include "mozilla/Scoped.h" // LOGE and free a D-Bus error @@ -50,8 +51,45 @@ private: DBusMessage* mMsg; }; -typedef void (*DBusCallback)(DBusMessage *, void *); +/** + * DBusReplyHandler represents a handler for DBus reply messages. Inherit + * from this class and implement the Handle method. The method Callback + * should be passed to the DBus send function, with the class instance as + * user-data argument. + */ +class DBusReplyHandler : public mozilla::RefCounted +{ +public: + virtual ~DBusReplyHandler() { + } + /** + * Implements a call-back function for DBus. The supplied value for + * aData must be a pointer to an instance of DBusReplyHandler. + */ + static void Callback(DBusMessage* aReply, void* aData); + + /** + * Call-back method for handling the reply message from DBus. + */ + virtual void Handle(DBusMessage* aReply) = 0; + +protected: + DBusReplyHandler() + { + } + + DBusReplyHandler(const DBusReplyHandler& aHandler) + { + } + + DBusReplyHandler& operator = (const DBusReplyHandler& aRhs) + { + return *this; + } +}; + +typedef void (*DBusCallback)(DBusMessage *, void *); void log_and_free_dbus_error(DBusError* err, const char* function, From a96bc3f7be0f0b39fae7a69504f59c1daadb4b9e Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 9 Jul 2013 09:56:14 +0200 Subject: [PATCH 02/42] Bug 884840: Reimplement GetServiceChannel without Bluetooth command thread, r=echou The method BluetoothDBusService::GetServiceChannel currently blocks the Bluetooth command thread while waiting for a DBus message, before it dispatches a runnable to the main thread. With this patch, the DBus message is processed asyncronously, and the runnable gets dispatched from the DBus reply handler. --HG-- extra : rebase_source : 24519b7dd8d59fcbbf78436092610c8db195f6a2 --- dom/bluetooth/linux/BluetoothDBusService.cpp | 126 ++++++++++--------- ipc/dbus/DBusUtils.cpp | 1 - 2 files changed, 66 insertions(+), 61 deletions(-) diff --git a/dom/bluetooth/linux/BluetoothDBusService.cpp b/dom/bluetooth/linux/BluetoothDBusService.cpp index 3e1cc3cd8ed9..260a079bb8b0 100644 --- a/dom/bluetooth/linux/BluetoothDBusService.cpp +++ b/dom/bluetooth/linux/BluetoothDBusService.cpp @@ -2094,36 +2094,6 @@ BluetoothDBusService::GetDevicePath(const nsAString& aAdapterPath, return true; } -static int -GetDeviceServiceChannel(const nsAString& aObjectPath, - const nsAString& aPattern, - int aAttributeId) -{ - // This is a blocking call, should not be run on main thread. - MOZ_ASSERT(!NS_IsMainThread()); - -#ifdef MOZ_WIDGET_GONK - // GetServiceAttributeValue only exists in android's bluez dbus binding - // implementation - nsCString tempPattern = NS_ConvertUTF16toUTF8(aPattern); - const char* pattern = tempPattern.get(); - - DBusMessage *reply = - dbus_func_args(gThreadConnection->GetConnection(), - NS_ConvertUTF16toUTF8(aObjectPath).get(), - DBUS_DEVICE_IFACE, "GetServiceAttributeValue", - DBUS_TYPE_STRING, &pattern, - DBUS_TYPE_UINT16, &aAttributeId, - DBUS_TYPE_INVALID); - - return reply ? dbus_returns_int32(reply) : -1; -#else - // FIXME/Bug 793977 qdot: Just return something for desktop, until we have a - // parser for the GetServiceAttributes xml block - return 1; -#endif -} - // static bool BluetoothDBusService::RemoveReservedServicesInternal( @@ -2589,8 +2559,7 @@ public: mDeviceAddress = GetAddressFromObjectPath(aObjectPath); } - nsresult - Run() + NS_IMETHOD Run() { MOZ_ASSERT(NS_IsMainThread()); @@ -2606,55 +2575,92 @@ private: BluetoothProfileManagerBase* mManager; }; -class GetServiceChannelRunnable : public nsRunnable +class OnGetServiceChannelReplyHandler : public DBusReplyHandler { public: - GetServiceChannelRunnable(const nsAString& aObjectPath, - const nsAString& aServiceUuid, - BluetoothProfileManagerBase* aManager) - : mObjectPath(aObjectPath), - mServiceUuid(aServiceUuid), - mManager(aManager) + OnGetServiceChannelReplyHandler(const nsAString& aObjectPath, + const nsAString& aServiceUUID, + BluetoothProfileManagerBase* aBluetoothProfileManager) + : mObjectPath(aObjectPath), + mServiceUUID(aServiceUUID), + mBluetoothProfileManager(aBluetoothProfileManager) { - MOZ_ASSERT(!aObjectPath.IsEmpty()); - MOZ_ASSERT(!aServiceUuid.IsEmpty()); - MOZ_ASSERT(aManager); + MOZ_ASSERT(mBluetoothProfileManager); } - nsresult - Run() + void Handle(DBusMessage* aReply) { - MOZ_ASSERT(!NS_IsMainThread()); + MOZ_ASSERT(!NS_IsMainThread()); // DBus thread - int channel = GetDeviceServiceChannel(mObjectPath, mServiceUuid, 0x0004); - nsRefPtr r(new OnGetServiceChannelRunnable(mObjectPath, - mServiceUuid, - channel, - mManager)); - NS_DispatchToMainThread(r); - return NS_OK; + // The default channel is an invalid value of -1. We + // update it if we have received a correct reply. Both + // cases, valid and invalid channel numbers, are handled + // in BluetoothProfileManagerBase::OnGetServiceChannel. + + int channel = -1; + + if (aReply && (dbus_message_get_type(aReply) != DBUS_MESSAGE_TYPE_ERROR)) { + channel = dbus_returns_int32(aReply); + } + + nsRefPtr r = new OnGetServiceChannelRunnable(mObjectPath, + mServiceUUID, + channel, + mBluetoothProfileManager); + nsresult rv = NS_DispatchToMainThread(r); + NS_ENSURE_SUCCESS_VOID(rv); } private: nsString mObjectPath; - nsString mServiceUuid; - BluetoothProfileManagerBase* mManager; + nsString mServiceUUID; + BluetoothProfileManagerBase* mBluetoothProfileManager; }; nsresult BluetoothDBusService::GetServiceChannel(const nsAString& aDeviceAddress, - const nsAString& aServiceUuid, + const nsAString& aServiceUUID, BluetoothProfileManagerBase* aManager) { MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(mBluetoothCommandThread); nsString objectPath(GetObjectPathFromAddress(sAdapterPath, aDeviceAddress)); - nsRefPtr r(new GetServiceChannelRunnable(objectPath, - aServiceUuid, - aManager)); - mBluetoothCommandThread->Dispatch(r, NS_DISPATCH_NORMAL); +#ifdef MOZ_WIDGET_GONK + static const int sProtocolDescriptorList = 0x0004; + + // GetServiceAttributeValue only exists in android's bluez dbus binding + // implementation + nsCString serviceUUID = NS_ConvertUTF16toUTF8(aServiceUUID); + const char* cstrServiceUUID = serviceUUID.get(); + + nsRefPtr handler = + new OnGetServiceChannelReplyHandler(objectPath, aServiceUUID, aManager); + + bool success = dbus_func_args_async(mConnection, -1, + OnGetServiceChannelReplyHandler::Callback, handler, + NS_ConvertUTF16toUTF8(objectPath).get(), + DBUS_DEVICE_IFACE, "GetServiceAttributeValue", + DBUS_TYPE_STRING, &cstrServiceUUID, + DBUS_TYPE_UINT16, &sProtocolDescriptorList, + DBUS_TYPE_INVALID); + NS_ENSURE_TRUE(success, NS_ERROR_FAILURE); + + handler.forget(); +#else + // FIXME/Bug 793977 qdot: Just set something for desktop, until we have a + // parser for the GetServiceAttributes xml block + // + // Even though we are on the main thread already, we need to dispatch a + // runnable here. OnGetServiceChannel needs mRunnable to be set, which + // happens after GetServiceChannel returns. + nsRefPtr r = new OnGetServiceChannelRunnable(objectPath, + aServiceUUID, + 1, + aManager); + nsresult rv = NS_DispatchToMainThread(r); + NS_ENSURE_SUCCESS_VOID(rv); +#endif return NS_OK; } diff --git a/ipc/dbus/DBusUtils.cpp b/ipc/dbus/DBusUtils.cpp index 0f119234c14c..962de6eb1e9b 100644 --- a/ipc/dbus/DBusUtils.cpp +++ b/ipc/dbus/DBusUtils.cpp @@ -627,7 +627,6 @@ int dbus_returns_int32(DBusMessage *reply) LOG_AND_FREE_DBUS_ERROR_WITH_MSG(&err, reply); } - dbus_message_unref(reply); return ret; } From ca79e496a13aa6c30b9a878a452d51b351973113 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 01:25:23 -0700 Subject: [PATCH 03/42] Bumping gaia.json for 4 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/1f91f91647f7 Author: Salvador de la Puente González Desc: Merge pull request #10809 from lodr/bug-889635-avoid-startup-error Bug 889635 - Avoid startup error r=arcturus ======== https://hg.mozilla.org/integration/gaia-central/rev/247724ca9e31 Author: lodr Desc: Bug 889635 - Avoid startup error ======== https://hg.mozilla.org/integration/gaia-central/rev/89c54e45afdc Author: Salvador de la Puente González Desc: Merge pull request #10829 from lodr/bug-842924-l10n-issue Bug 842924 - Avoid l10n issues by providing wider selects r=arcturus ======== https://hg.mozilla.org/integration/gaia-central/rev/c8540e809112 Author: lodr Desc: Bug 842924 - Avoid l10n issues by providing wider selects --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 34a3105fc308..ce3919717b80 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "58d73404571f7619b478116dfec8faced97be13d", + "revision": "1f91f91647f7fb36be00d2791a6c9f34c777a5fe", "repo_path": "/integration/gaia-central" } From 37b401e2494bfc514b5a319377732e364cc34259 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 02:10:30 -0700 Subject: [PATCH 04/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/eeb604fca314 Author: gasolin Desc: Merge pull request #10778 from gasolin/master-881141 Bug 881141 - hdpi/xhdpi resolution assets and layout for Usage app, r=salva ======== https://hg.mozilla.org/integration/gaia-central/rev/89c376aa6e4e Author: gasolin Desc: Bug 881141 - hdpi/xhdpi resolution assets and layout for Usage app --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index ce3919717b80..b0f9a21f6f27 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "1f91f91647f7fb36be00d2791a6c9f34c777a5fe", + "revision": "eeb604fca314e5c8e4b42133db0d4cd10cadb198", "repo_path": "/integration/gaia-central" } From 1cc49cd3e37751cdfdaf14e62e68abd99e35bccc Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 03:15:27 -0700 Subject: [PATCH 05/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/68ff795e16c1 Author: Francisco Borja Salguero Castellano Desc: Merge pull request #10772 from rwldrn/890053 Bug 890053 - [MMS][SMS] Regression. Recipients pull down pushes input behind keyboard ======== https://hg.mozilla.org/integration/gaia-central/rev/2b9a69c905ee Author: Rick Waldron Desc: Bug 890053 - [MMS][SMS] Regression. Recipients pull down pushes input behind keyboard - broken display: https://www.dropbox.com/sh/pirp25nqtaqcktr/pfFsPQPG6n#f:1.jpg - fixed display: https://www.dropbox.com/sh/pirp25nqtaqcktr/pfFsPQPG6n#f:2.jpg https://bugzilla.mozilla.org/show_bug.cgi?id=890053 Signed-off-by: Rick Waldron --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b0f9a21f6f27..5dcb3ae1d67a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "eeb604fca314e5c8e4b42133db0d4cd10cadb198", + "revision": "68ff795e16c166dd5c11ef21efabb4bf30e33c0a", "repo_path": "/integration/gaia-central" } From 96a46d11027d5e14ed7b05d828ed02e17447945c Mon Sep 17 00:00:00 2001 From: Shelly Lin Date: Tue, 9 Jul 2013 10:37:33 +0800 Subject: [PATCH 06/42] Bug 811636 - Close the child FD in the parent asap in order to detect when the child closes its FD. r=dhylands --- ipc/chromium/src/chrome/common/ipc_channel.h | 4 ++++ ipc/chromium/src/chrome/common/ipc_channel_posix.cc | 12 ++++++++++++ ipc/chromium/src/chrome/common/ipc_channel_posix.h | 1 + ipc/glue/GeckoChildProcessHost.cpp | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/ipc/chromium/src/chrome/common/ipc_channel.h b/ipc/chromium/src/chrome/common/ipc_channel.h index 448b5cfade47..bc61fd38ba24 100644 --- a/ipc/chromium/src/chrome/common/ipc_channel.h +++ b/ipc/chromium/src/chrome/common/ipc_channel.h @@ -113,6 +113,10 @@ class Channel : public Message::Sender { // Return the server side of the socketpair. int GetServerFileDescriptor() const; + + // Close the client side of the socketpair. + void CloseClientFileDescriptor(); + #elif defined(OS_WIN) // Return the server pipe handle. void* GetServerPipeHandle() const; diff --git a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc index 9820a16df206..e427165bca9d 100644 --- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -779,6 +779,14 @@ void Channel::ChannelImpl::GetClientFileDescriptorMapping(int *src_fd, *dest_fd = kClientChannelFd; } +void Channel::ChannelImpl::CloseClientFileDescriptor() { + if (client_pipe_ != -1) { + Singleton()->Remove(pipe_name_); + HANDLE_EINTR(close(client_pipe_)); + client_pipe_ = -1; + } +} + // Called by libevent when we can read from th pipe without blocking. void Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int fd) { bool send_server_hello_msg = false; @@ -944,4 +952,8 @@ int Channel::GetServerFileDescriptor() const { return channel_impl_->GetServerFileDescriptor(); } +void Channel::CloseClientFileDescriptor() { + channel_impl_->CloseClientFileDescriptor(); +} + } // namespace IPC diff --git a/ipc/chromium/src/chrome/common/ipc_channel_posix.h b/ipc/chromium/src/chrome/common/ipc_channel_posix.h index 7994ceeee5e4..a96750631e36 100644 --- a/ipc/chromium/src/chrome/common/ipc_channel_posix.h +++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -40,6 +40,7 @@ class Channel::ChannelImpl : public MessageLoopForIO::Watcher { DCHECK(mode_ == MODE_SERVER); return pipe_; } + void CloseClientFileDescriptor(); private: void Init(Mode mode, Listener* listener); diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp index 9e319079bd4f..9addf4f697cb 100644 --- a/ipc/glue/GeckoChildProcessHost.cpp +++ b/ipc/glue/GeckoChildProcessHost.cpp @@ -656,6 +656,11 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector& aExt #endif false, &process, arch); + // We're in the parent and the child was launched. Close the child FD in the + // parent as soon as possible, which will allow the parent to detect when the + // child closes its FD (either due to normal exit or due to crash). + GetChannel()->CloseClientFileDescriptor(); + #ifdef MOZ_WIDGET_COCOA // Wait for the child process to send us its 'task_t' data. const int kTimeoutMs = 10000; From 6024fcafc050dce6b69f7cbd35bf63b36a6c6ef2 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Tue, 9 Jul 2013 14:37:47 +0800 Subject: [PATCH 07/42] Bug 865347 - Add functions to manipulate fake volumes to test SD card insert/remove. r=dhylands --- dom/ipc/ContentParent.cpp | 32 +++++++++++++++++++ dom/ipc/ContentParent.h | 4 +++ dom/ipc/PContent.ipdl | 4 +++ dom/system/gonk/nsIVolume.idl | 5 ++- dom/system/gonk/nsIVolumeService.idl | 6 +++- dom/system/gonk/nsVolume.cpp | 37 ++++++++++++++++++++- dom/system/gonk/nsVolume.h | 11 +++++-- dom/system/gonk/nsVolumeService.cpp | 48 ++++++++++++++++++++++++++-- dom/system/gonk/nsVolumeService.h | 2 +- 9 files changed, 141 insertions(+), 8 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 80ee26ea184c..a30583240720 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2572,5 +2572,37 @@ ContentParent::RecvSystemMessageHandled() return true; } +bool +ContentParent::RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) +{ +#ifdef MOZ_WIDGET_GONK + nsresult rv; + nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); + if (vs) { + vs->CreateFakeVolume(fsName, mountPoint); + } + return true; +#else + NS_WARNING("ContentParent::RecvCreateFakeVolume shouldn't be called when MOZ_WIDGET_GONK is not defined"); + return false; +#endif +} + +bool +ContentParent::RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) +{ +#ifdef MOZ_WIDGET_GONK + nsresult rv; + nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); + if (vs) { + vs->SetFakeVolumeState(fsName, fsState); + } + return true; +#else + NS_WARNING("ContentParent::RecvSetFakeVolumeState shouldn't be called when MOZ_WIDGET_GONK is not defined"); + return false; +#endif +} + } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index ee5d43abd256..abdaa21c3b74 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -416,6 +416,10 @@ private: virtual bool RecvSystemMessageHandled() MOZ_OVERRIDE; + virtual bool RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) MOZ_OVERRIDE; + + virtual bool RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) MOZ_OVERRIDE; + virtual void ProcessingError(Result what) MOZ_OVERRIDE; GeckoChildProcessHost* mSubprocess; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 788424509b1f..01a3566c3e78 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -515,6 +515,10 @@ parent: // Notify the parent that the child has finished handling a system message. async SystemMessageHandled(); + // called by the child (test code only) to propagate volume changes to the parent + async CreateFakeVolume(nsString fsName, nsString mountPoint); + async SetFakeVolumeState(nsString fsName, int32_t fsState); + both: AsyncMessage(nsString aMessage, ClonedMessageData aData); }; diff --git a/dom/system/gonk/nsIVolume.idl b/dom/system/gonk/nsIVolume.idl index f413189f1681..c7170fbb04ba 100644 --- a/dom/system/gonk/nsIVolume.idl +++ b/dom/system/gonk/nsIVolume.idl @@ -5,7 +5,7 @@ #include "nsISupports.idl" #include "nsIVolumeStat.idl" -[scriptable, uuid(1134f267-7b81-42f2-b64a-6edb91286576)] +[scriptable, uuid(4b5bd562-bd05-4658-ab0f-f668a9e25fb5)] interface nsIVolume : nsISupports { // These MUST match the states from android's system/vold/Volume.h header @@ -49,6 +49,9 @@ interface nsIVolume : nsISupports readonly attribute boolean isMountLocked; nsIVolumeStat getStats(); + + // Whether this is a fake volume. + readonly attribute boolean isFake; }; %{C++ diff --git a/dom/system/gonk/nsIVolumeService.idl b/dom/system/gonk/nsIVolumeService.idl index bf943d14482b..33a3f4636857 100644 --- a/dom/system/gonk/nsIVolumeService.idl +++ b/dom/system/gonk/nsIVolumeService.idl @@ -12,7 +12,7 @@ %} [ref] native nsStringTArrayRef(nsTArray); -[scriptable, uuid(7c179fb7-67a0-43a3-9337-294e0360b858)] +[scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] interface nsIVolumeService : nsISupports { nsIVolume getVolumeByName(in DOMString volName); @@ -24,6 +24,10 @@ interface nsIVolumeService : nsISupports nsIVolumeMountLock createMountLock(in DOMString volName); [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); + + /* for test case only to simulate sdcard insertion/removal */ + void createFakeVolume(in DOMString name, in DOMString path); + void SetFakeVolumeState(in DOMString name, in long state); }; %{C++ diff --git a/dom/system/gonk/nsVolume.cpp b/dom/system/gonk/nsVolume.cpp index 58c3a51ace74..e1318a6b49e4 100644 --- a/dom/system/gonk/nsVolume.cpp +++ b/dom/system/gonk/nsVolume.cpp @@ -50,7 +50,8 @@ nsVolume::nsVolume(const Volume* aVolume) mMountPoint(NS_ConvertUTF8toUTF16(aVolume->MountPoint())), mState(aVolume->State()), mMountGeneration(aVolume->MountGeneration()), - mMountLocked(aVolume->IsMountLocked()) + mMountLocked(aVolume->IsMountLocked()), + mIsFake(false) { } @@ -85,6 +86,13 @@ bool nsVolume::Equals(nsIVolume* aVolume) if (mMountLocked != volIsMountLocked) { return false; } + + bool isFake; + aVolume->GetIsFake(&isFake); + if (mIsFake != isFake) { + return false; + } + return true; } @@ -136,6 +144,12 @@ NS_IMETHODIMP nsVolume::GetStats(nsIVolumeStat **aResult) return NS_OK; } +NS_IMETHODIMP nsVolume::GetIsFake(bool *aIsFake) +{ + *aIsFake = mIsFake; + return NS_OK; +} + void nsVolume::LogState() const { @@ -156,6 +170,7 @@ void nsVolume::Set(nsIVolume* aVolume) aVolume->GetName(mName); aVolume->GetMountPoint(mMountPoint); aVolume->GetState(&mState); + aVolume->GetIsFake(&mIsFake); int32_t volMountGeneration; aVolume->GetMountGeneration(&volMountGeneration); @@ -222,5 +237,25 @@ nsVolume::UpdateMountLock(bool aMountLocked) MountGeneration(), aMountLocked)); } +void +nsVolume::SetState(int32_t aState) +{ + static int32_t sMountGeneration = 0; + + MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default); + MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(IsFake()); + + if (aState == mState) { + return; + } + + if (aState == nsIVolume::STATE_MOUNTED) { + mMountGeneration = ++sMountGeneration; + } + + mState = aState; +} + } // system } // mozilla diff --git a/dom/system/gonk/nsVolume.h b/dom/system/gonk/nsVolume.h index 3d04f7932e9b..61bdd3479cb4 100644 --- a/dom/system/gonk/nsVolume.h +++ b/dom/system/gonk/nsVolume.h @@ -32,7 +32,8 @@ public: mMountPoint(aMountPoint), mState(aState), mMountGeneration(aMountGeneration), - mMountLocked(false) + mMountLocked(false), + mIsFake(false) { } @@ -42,7 +43,8 @@ public: : mName(aName), mState(STATE_INIT), mMountGeneration(-1), - mMountLocked(true) // Needs to agree with Volume::Volume + mMountLocked(true), // Needs to agree with Volume::Volume + mIsFake(false) { } @@ -72,11 +74,16 @@ private: void UpdateMountLock(const nsAString& aMountLockState); void UpdateMountLock(bool aMountLocked); + bool IsFake() const { return mIsFake; } + void SetIsFake(bool aIsFake) { mIsFake = aIsFake; } + void SetState(int32_t aState); + nsString mName; nsString mMountPoint; int32_t mState; int32_t mMountGeneration; bool mMountLocked; + bool mIsFake; }; } // system diff --git a/dom/system/gonk/nsVolumeService.cpp b/dom/system/gonk/nsVolumeService.cpp index 7e43dafb0cb3..39606c3700ba 100644 --- a/dom/system/gonk/nsVolumeService.cpp +++ b/dom/system/gonk/nsVolumeService.cpp @@ -326,7 +326,7 @@ nsVolumeService::FindVolumeByName(const nsAString& aName) //static already_AddRefed -nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName) +nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake /*= false*/) { MonitorAutoLock autoLock(mArrayMonitor); @@ -337,6 +337,7 @@ nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName) } // Volume not found - add a new one vol = new nsVolume(aName); + vol->SetIsFake(aIsFake); mVolumeArray.AppendElement(vol); return vol.forget(); } @@ -348,11 +349,19 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) nsString volName; aVolume->GetName(volName); - nsRefPtr vol = CreateOrFindVolumeByName(volName); + bool aIsFake; + aVolume->GetIsFake(&aIsFake); + nsRefPtr vol = CreateOrFindVolumeByName(volName, aIsFake); if (vol->Equals(aVolume)) { // Nothing has really changed. Don't bother telling anybody. return; } + + if (!vol->IsFake() && aIsFake) { + // Prevent an incoming fake volume from overriding an existing real volume. + return; + } + vol->Set(aVolume); nsCOMPtr obs = GetObserverService(); if (!obs) { @@ -362,6 +371,41 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) obs->NotifyObservers(vol, NS_VOLUME_STATE_CHANGED, stateStr.get()); } +NS_IMETHODIMP +nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path) +{ + if (XRE_GetProcessType() == GeckoProcessType_Default) { + nsRefPtr vol = new nsVolume(name, path, nsIVolume::STATE_INIT, -1); + vol->SetIsFake(true); + UpdateVolume(vol.get()); + return NS_OK; + } + + ContentChild::GetSingleton()->SendCreateFakeVolume(nsString(name), nsString(path)); + return NS_OK; +} + +NS_IMETHODIMP +nsVolumeService::SetFakeVolumeState(const nsAString& name, int32_t state) +{ + if (XRE_GetProcessType() == GeckoProcessType_Default) { + nsRefPtr vol; + { + MonitorAutoLock autoLock(mArrayMonitor); + vol = FindVolumeByName(name); + } + if (!vol || !vol->IsFake()) { + return NS_ERROR_NOT_AVAILABLE; + } + vol->SetState(state); + UpdateVolume(vol.get()); + return NS_OK; + } + + ContentChild::GetSingleton()->SendSetFakeVolumeState(nsString(name), state); + return NS_OK; +} + /*************************************************************************** * The UpdateVolumeRunnable creates an nsVolume and updates the main thread * data structure while running on the main thread. diff --git a/dom/system/gonk/nsVolumeService.h b/dom/system/gonk/nsVolumeService.h index 34eb710cf0a0..e537d99dd75e 100644 --- a/dom/system/gonk/nsVolumeService.h +++ b/dom/system/gonk/nsVolumeService.h @@ -50,7 +50,7 @@ private: const nsAString& aMountLockState); already_AddRefed FindVolumeByMountLockName(const nsAString& aMountLockName); already_AddRefed FindVolumeByName(const nsAString& aName); - already_AddRefed CreateOrFindVolumeByName(const nsAString& aName); + already_AddRefed CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake = false); Monitor mArrayMonitor; nsVolume::Array mVolumeArray; From ca2d8e1545aa9504b1412e4813e8aa6581636d32 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Thu, 4 Jul 2013 14:47:26 +0800 Subject: [PATCH 08/42] Bug 865347 - Add a test case to test new functions. r=dhylands --- dom/system/gonk/tests/marionette/manifest.ini | 1 + .../gonk/tests/marionette/test_fakevolume.js | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 dom/system/gonk/tests/marionette/test_fakevolume.js diff --git a/dom/system/gonk/tests/marionette/manifest.ini b/dom/system/gonk/tests/marionette/manifest.ini index 0499a55955ed..a0a50c70bc93 100644 --- a/dom/system/gonk/tests/marionette/manifest.ini +++ b/dom/system/gonk/tests/marionette/manifest.ini @@ -6,3 +6,4 @@ qemu = true [test_geolocation.js] disabled = Bug 808783 [test_get_voicemailInfo.js] +[test_fakevolume.js] diff --git a/dom/system/gonk/tests/marionette/test_fakevolume.js b/dom/system/gonk/tests/marionette/test_fakevolume.js new file mode 100644 index 000000000000..5ac84d92ab24 --- /dev/null +++ b/dom/system/gonk/tests/marionette/test_fakevolume.js @@ -0,0 +1,29 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +MARIONETTE_TIMEOUT = 10000; + +let Cc = SpecialPowers.Cc; +let Ci = SpecialPowers.Ci; + +let volumeService = Cc["@mozilla.org/telephony/volume-service;1"].getService(Ci.nsIVolumeService); +ok(volumeService, "Should have volume service"); + +let volName = "fake"; +let mountPoint = "/data/fake/storage"; +volumeService.createFakeVolume(volName, mountPoint); + +let vol = volumeService.getVolumeByName(volName); +ok(vol, "volume shouldn't be null"); + +is(volName, vol.name, "name"); +is(mountPoint, vol.mountPoint, "moutnPoint"); +is(Ci.nsIVolume.STATE_INIT, vol.state, "state"); + + +let oldMountGen = vol.mountGeneration; +volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED); +is(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state"); +ok(vol.mountGeneration > oldMountGen, "mount generation should be incremented"); + +finish(); From 39934db315cbab011bd73a448229bf852f4ac82d Mon Sep 17 00:00:00 2001 From: Dale Harvey Date: Tue, 9 Jul 2013 08:57:26 -0400 Subject: [PATCH 09/42] Bug 885349 - Add flag to context menu to detect audio being played in video elements. r=jlebar --- .../BrowserElementChildPreload.js | 14 ++-- dom/browser-element/mochitest/Makefile.in | 2 + .../browserElement_ContextmenuEvents.js | 69 ++++++++++++++++++- 3 files changed, 79 insertions(+), 6 deletions(-) diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index a802cceb9434..c2c395246ca6 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -583,14 +583,18 @@ BrowserElementChild.prototype = { _getSystemCtxMenuData: function(elem) { if ((elem instanceof Ci.nsIDOMHTMLAnchorElement && elem.href) || (elem instanceof Ci.nsIDOMHTMLAreaElement && elem.href)) { - return elem.href; + return {uri: elem.href}; } if (elem instanceof Ci.nsIImageLoadingContent && elem.currentURI) { - return elem.currentURI.spec; + return {uri: elem.currentURI.spec}; } - if ((elem instanceof Ci.nsIDOMHTMLMediaElement) || - (elem instanceof Ci.nsIDOMHTMLImageElement)) { - return elem.currentSrc || elem.src; + if (elem instanceof Ci.nsIDOMHTMLImageElement) { + return {uri: elem.src}; + } + if (elem instanceof Ci.nsIDOMHTMLMediaElement) { + let hasVideo = !(elem.readyState >= elem.HAVE_METADATA && + (elem.videoWidth == 0 || elem.videoHeight == 0)); + return {uri: elem.currentSrc || elem.src, hasVideo: hasVideo}; } return false; }, diff --git a/dom/browser-element/mochitest/Makefile.in b/dom/browser-element/mochitest/Makefile.in index 35452915dd8c..81ffa6389b78 100644 --- a/dom/browser-element/mochitest/Makefile.in +++ b/dom/browser-element/mochitest/Makefile.in @@ -16,6 +16,8 @@ include $(DEPTH)/config/autoconf.mk # process. Default is OOP. MOCHITEST_FILES = \ + $(topsrcdir)/browser/base/content/test/audio.ogg \ + $(topsrcdir)/content/media/test/short-video.ogv \ file_empty_script.js \ file_empty.html \ file_focus.html \ diff --git a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js index 68041e787a0a..2c6ff7941af7 100644 --- a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js +++ b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js @@ -4,6 +4,9 @@ SimpleTest.waitForExplicitFinish(); browserElementTestHelpers.setEnabledPref(true); browserElementTestHelpers.addPermission(); +let audioUrl = '/tests/dom/browser-element/mochitest/audio.ogg'; +let videoUrl = '/tests/dom/browser-element/mochitest/short-video.ogv'; + function runTests() { createIframe(function onIframeLoaded() { checkEmptyContextMenu(); @@ -114,17 +117,68 @@ function checkCallbackWithoutPreventDefault() { checkContextMenuCallbackForId(detail, id, function onCallbackFired(label) { is(label, null, 'Callback label should be null'); - SimpleTest.finish(); + checkImageContextMenu(); }); }, /* ignorePreventDefault */ true); } +function checkImageContextMenu() { + sendContextMenuTo('#menu3-trigger', function onContextMenu(detail) { + var target = detail.systemTargets[0]; + is(target.nodeName, 'IMG', 'Reports correct nodeName'); + is(target.data.uri, 'example.png', 'Reports correct uri'); + + checkVideoContextMenu(); + }, /* ignorePreventDefault */ true); +} + +function checkVideoContextMenu() { + sendContextMenuTo('#menu4-trigger', function onContextMenu(detail) { + var target = detail.systemTargets[0]; + is(target.nodeName, 'VIDEO', 'Reports correct nodeName'); + is(target.data.uri, videoUrl, 'Reports uri correctly in data'); + is(target.data.hasVideo, true, 'Video data in video tag does "hasVideo"'); + + checkAudioContextMenu(); + }, /* ignorePreventDefault */ true); +} + +function checkAudioContextMenu() { + sendContextMenuTo('#menu6-trigger', function onContextMenu(detail) { + var target = detail.systemTargets[0]; + is(target.nodeName, 'AUDIO', 'Reports correct nodeName'); + is(target.data.uri, audioUrl, 'Reports uri correctly in data'); + + checkAudioinVideoContextMenu(); + }, /* ignorePreventDefault */ true); +} + +function checkAudioinVideoContextMenu() { + sendSrcTo('#menu5-trigger', audioUrl, function onSrcSet() { + sendContextMenuTo('#menu5-trigger', function onContextMenu(detail) { + var target = detail.systemTargets[0]; + is(target.nodeName, 'VIDEO', 'Reports correct nodeName'); + is(target.data.uri, audioUrl, 'Reports uri correctly in data'); + is(target.data.hasVideo, false, 'Audio data in video tag reports no "hasVideo"'); + + SimpleTest.finish(); + }, /* ignorePreventDefault */ true); + }); +} /* Helpers */ var mm = null; var previousContextMenuDetail = null; var currentContextMenuDetail = null; +function sendSrcTo(selector, src, callback) { + mm.sendAsyncMessage('setsrc', { 'selector': selector, 'src': src }); + mm.addMessageListener('test:srcset', function onSrcSet(msg) { + mm.removeMessageListener('test:srcset', onSrcSet); + callback(); + }); +} + function sendContextMenuTo(selector, callback, ignorePreventDefault) { iframe.addEventListener('mozbrowsercontextmenu', function oncontextmenu(e) { iframe.removeEventListener(e.type, oncontextmenu); @@ -178,6 +232,10 @@ function createIframe(callback) { '' + '' + '' + + '' + + '' + + '' + + '' + ''; document.body.appendChild(iframe); @@ -191,6 +249,15 @@ function createIframe(callback) { document.querySelector(msg.data.selector).dispatchEvent(evt); }); + addMessageListener('setsrc', function onContextMenu(msg) { + var wrappedTarget = content.document.querySelector(msg.data.selector); + var target = XPCNativeWrapper.unwrap(wrappedTarget); + target.addEventListener('loadedmetadata', function() { + sendAsyncMessage('test:srcset'); + }); + target.src = msg.data.src; + }); + addMessageListener('browser-element-api:call', function onCallback(msg) { if (msg.data.msg_name != 'fire-ctx-callback') return; From 5c9f52adb2df239677d229256e397790013d0c19 Mon Sep 17 00:00:00 2001 From: "Antonio M. Amaya" Date: Wed, 3 Jul 2013 13:20:06 +0200 Subject: [PATCH 10/42] Bug 888926 - Avoid sending the system-messages-open-app message if the target app has already been notified. r=gene, r=fabrice --- dom/messages/SystemMessageInternal.js | 50 ++++++++++++++++++--------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/dom/messages/SystemMessageInternal.js b/dom/messages/SystemMessageInternal.js index e849e615998a..5c531c3f40f0 100644 --- a/dom/messages/SystemMessageInternal.js +++ b/dom/messages/SystemMessageInternal.js @@ -47,6 +47,11 @@ function debug(aMsg) { // dump("-- SystemMessageInternal " + Date.now() + " : " + aMsg + "\n"); } + +const MSG_SENT_SUCCESS = 0; +const MSG_SENT_FAILURE_PERM_DENIED = 1; +const MSG_SENT_FAILURE_APP_NOT_RUNNING = 2; + // Implementation of the component used by internal users. function SystemMessageInternal() { @@ -158,13 +163,16 @@ SystemMessageInternal.prototype = { debug("Sending " + aType + " " + JSON.stringify(aMessage) + " for " + aPageURI.spec + " @ " + aManifestURI.spec); + let result = this._sendMessageCommon(aType, + aMessage, + messageID, + aPageURI.spec, + aManifestURI.spec); + debug("Returned status of sending message: " + result); + // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (!this._sendMessageCommon(aType, - aMessage, - messageID, - aPageURI.spec, - aManifestURI.spec)) { + if (result === MSG_SENT_FAILURE_PERM_DENIED) { return; } @@ -173,8 +181,10 @@ SystemMessageInternal.prototype = { // Queue this message in the corresponding pages. this._queueMessage(page, aMessage, messageID); - // Open app pages to handle their pending messages. - this._openAppPage(page, aMessage); + if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { + // Don't open the page again if we already sent the message to it. + this._openAppPage(page, aMessage); + } } }, @@ -196,21 +206,27 @@ SystemMessageInternal.prototype = { // Find pages that registered an handler for this type. this._pages.forEach(function(aPage) { if (aPage.type == aType) { + let result = this._sendMessageCommon(aType, + aMessage, + messageID, + aPage.uri, + aPage.manifest); + debug("Returned status of sending message: " + result); + + // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (!this._sendMessageCommon(aType, - aMessage, - messageID, - aPage.uri, - aPage.manifest)) { + if (result === MSG_SENT_FAILURE_PERM_DENIED) { return; } // Queue this message in the corresponding pages. this._queueMessage(aPage, aMessage, messageID); - // Open app pages to handle their pending messages. - this._openAppPage(aPage, aMessage); + if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { + // Open app pages to handle their pending messages. + this._openAppPage(aPage, aMessage); + } } }, this); }, @@ -525,7 +541,7 @@ SystemMessageInternal.prototype = { .isSystemMessagePermittedToSend(aType, aPageURI, aManifestURI)) { - return false; + return MSG_SENT_FAILURE_PERM_DENIED; } let appPageIsRunning = false; @@ -571,9 +587,11 @@ SystemMessageInternal.prototype = { // message when the page finishes handling the system message with other // pending messages. At that point, we'll release the lock we acquired. this._acquireCpuWakeLock(pageKey); + return MSG_SENT_FAILURE_APP_NOT_RUNNING; + } else { + return MSG_SENT_SUCCESS; } - return true; }, classID: Components.ID("{70589ca5-91ac-4b9e-b839-d6a88167d714}"), From f0f30baa1f1d5849fdc68b5458f1c0c90f90c0a0 Mon Sep 17 00:00:00 2001 From: David Clarke Date: Tue, 9 Jul 2013 08:57:26 -0400 Subject: [PATCH 11/42] Bug 889602 - Set ProfD directory within b2g. r=dhylands --- b2g/components/DirectoryProvider.js | 7 +++++++ testing/mochitest/b2g.json | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/b2g/components/DirectoryProvider.js b/b2g/components/DirectoryProvider.js index 866dae3fdcec..1e4167666d6e 100644 --- a/b2g/components/DirectoryProvider.js +++ b/b2g/components/DirectoryProvider.js @@ -61,6 +61,13 @@ DirectoryProvider.prototype = { persistent.value = true; return file; } + if (prop == "ProfD") { + let file = Cc["@mozilla.org/file/local;1"] + .createInstance(Ci.nsILocalFile); + file.initWithPath(LOCAL_DIR+"/tests/profile"); + persistent.value = true; + return file; + } if (prop == "coreAppsDir") { let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile) file.initWithPath("/system/b2g"); diff --git a/testing/mochitest/b2g.json b/testing/mochitest/b2g.json index 4363d7a9f0b9..1ae13a353c05 100644 --- a/testing/mochitest/b2g.json +++ b/testing/mochitest/b2g.json @@ -53,10 +53,6 @@ "content/events/test/test_continuous_wheel_events.html":"", "content/events/test/test_dom_wheel_event.html":"", "content/html/content/test/forms/test_input_file_picker.html":"", - "content/html/content/test/forms/test_max_attribute.html":"", - "content/html/content/test/forms/test_min_attribute.html":"", - "content/html/content/test/forms/test_required_attribute.html":"", - "content/html/content/test/forms/test_step_attribute.html":"", "content/html/content/test/forms/test_validation.html":"", "content/html/content/test/test_bug209275.xhtml":"", "content/html/content/test/test_bug430351.html":"", @@ -64,8 +60,6 @@ "content/html/content/test/test_bug481335.xhtml":"", "content/html/content/test/test_bug523771.html":"", "content/html/content/test/test_bug561636.html":"", - "content/html/content/test/test_bug590353-2.html":"", - "content/html/content/test/test_bug598643.html":"", "content/html/content/test/test_bug612730.html":"", "content/html/content/test/test_bug613113.html":"", "content/html/content/test/test_bug615833.html":"", @@ -102,7 +96,6 @@ "content/base/test/test_bug166235.html":"", "content/base/test/test_bug326337.html":"", "content/base/test/test_bug330925.xhtml":"", - "content/base/test/test_bug403852.html":"", "content/base/test/test_bug419527.xhtml":"", "content/base/test/test_bug422403-1.html":"", "content/base/test/test_bug422537.html":"", @@ -122,7 +115,6 @@ "content/base/test/test_child_process_shutdown_message.html":"", "content/base/test/test_copypaste.html":"", "content/base/test/test_csp_redirects.html":"", - "content/base/test/test_fileapi.html":"", "content/base/test/test_fileapi_slice.html":"", "content/base/test/test_messagemanager_assertpermission.html":"", "content/base/test/test_mixed_content_blocker.html":"", From e95fd5118348084aa337a28c2f644fef140ecdd1 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 9 Jul 2013 10:06:54 -0400 Subject: [PATCH 12/42] Backed out changeset 9b2114c04762 (bug 885349) for timeouts in the new test. --- .../BrowserElementChildPreload.js | 14 ++-- dom/browser-element/mochitest/Makefile.in | 2 - .../browserElement_ContextmenuEvents.js | 69 +------------------ 3 files changed, 6 insertions(+), 79 deletions(-) diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index c2c395246ca6..a802cceb9434 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -583,18 +583,14 @@ BrowserElementChild.prototype = { _getSystemCtxMenuData: function(elem) { if ((elem instanceof Ci.nsIDOMHTMLAnchorElement && elem.href) || (elem instanceof Ci.nsIDOMHTMLAreaElement && elem.href)) { - return {uri: elem.href}; + return elem.href; } if (elem instanceof Ci.nsIImageLoadingContent && elem.currentURI) { - return {uri: elem.currentURI.spec}; + return elem.currentURI.spec; } - if (elem instanceof Ci.nsIDOMHTMLImageElement) { - return {uri: elem.src}; - } - if (elem instanceof Ci.nsIDOMHTMLMediaElement) { - let hasVideo = !(elem.readyState >= elem.HAVE_METADATA && - (elem.videoWidth == 0 || elem.videoHeight == 0)); - return {uri: elem.currentSrc || elem.src, hasVideo: hasVideo}; + if ((elem instanceof Ci.nsIDOMHTMLMediaElement) || + (elem instanceof Ci.nsIDOMHTMLImageElement)) { + return elem.currentSrc || elem.src; } return false; }, diff --git a/dom/browser-element/mochitest/Makefile.in b/dom/browser-element/mochitest/Makefile.in index 81ffa6389b78..35452915dd8c 100644 --- a/dom/browser-element/mochitest/Makefile.in +++ b/dom/browser-element/mochitest/Makefile.in @@ -16,8 +16,6 @@ include $(DEPTH)/config/autoconf.mk # process. Default is OOP. MOCHITEST_FILES = \ - $(topsrcdir)/browser/base/content/test/audio.ogg \ - $(topsrcdir)/content/media/test/short-video.ogv \ file_empty_script.js \ file_empty.html \ file_focus.html \ diff --git a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js index 2c6ff7941af7..68041e787a0a 100644 --- a/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js +++ b/dom/browser-element/mochitest/browserElement_ContextmenuEvents.js @@ -4,9 +4,6 @@ SimpleTest.waitForExplicitFinish(); browserElementTestHelpers.setEnabledPref(true); browserElementTestHelpers.addPermission(); -let audioUrl = '/tests/dom/browser-element/mochitest/audio.ogg'; -let videoUrl = '/tests/dom/browser-element/mochitest/short-video.ogv'; - function runTests() { createIframe(function onIframeLoaded() { checkEmptyContextMenu(); @@ -117,68 +114,17 @@ function checkCallbackWithoutPreventDefault() { checkContextMenuCallbackForId(detail, id, function onCallbackFired(label) { is(label, null, 'Callback label should be null'); - checkImageContextMenu(); + SimpleTest.finish(); }); }, /* ignorePreventDefault */ true); } -function checkImageContextMenu() { - sendContextMenuTo('#menu3-trigger', function onContextMenu(detail) { - var target = detail.systemTargets[0]; - is(target.nodeName, 'IMG', 'Reports correct nodeName'); - is(target.data.uri, 'example.png', 'Reports correct uri'); - - checkVideoContextMenu(); - }, /* ignorePreventDefault */ true); -} - -function checkVideoContextMenu() { - sendContextMenuTo('#menu4-trigger', function onContextMenu(detail) { - var target = detail.systemTargets[0]; - is(target.nodeName, 'VIDEO', 'Reports correct nodeName'); - is(target.data.uri, videoUrl, 'Reports uri correctly in data'); - is(target.data.hasVideo, true, 'Video data in video tag does "hasVideo"'); - - checkAudioContextMenu(); - }, /* ignorePreventDefault */ true); -} - -function checkAudioContextMenu() { - sendContextMenuTo('#menu6-trigger', function onContextMenu(detail) { - var target = detail.systemTargets[0]; - is(target.nodeName, 'AUDIO', 'Reports correct nodeName'); - is(target.data.uri, audioUrl, 'Reports uri correctly in data'); - - checkAudioinVideoContextMenu(); - }, /* ignorePreventDefault */ true); -} - -function checkAudioinVideoContextMenu() { - sendSrcTo('#menu5-trigger', audioUrl, function onSrcSet() { - sendContextMenuTo('#menu5-trigger', function onContextMenu(detail) { - var target = detail.systemTargets[0]; - is(target.nodeName, 'VIDEO', 'Reports correct nodeName'); - is(target.data.uri, audioUrl, 'Reports uri correctly in data'); - is(target.data.hasVideo, false, 'Audio data in video tag reports no "hasVideo"'); - - SimpleTest.finish(); - }, /* ignorePreventDefault */ true); - }); -} /* Helpers */ var mm = null; var previousContextMenuDetail = null; var currentContextMenuDetail = null; -function sendSrcTo(selector, src, callback) { - mm.sendAsyncMessage('setsrc', { 'selector': selector, 'src': src }); - mm.addMessageListener('test:srcset', function onSrcSet(msg) { - mm.removeMessageListener('test:srcset', onSrcSet); - callback(); - }); -} - function sendContextMenuTo(selector, callback, ignorePreventDefault) { iframe.addEventListener('mozbrowsercontextmenu', function oncontextmenu(e) { iframe.removeEventListener(e.type, oncontextmenu); @@ -232,10 +178,6 @@ function createIframe(callback) { '' + '' + '' + - '' + - '' + - '' + - '' + ''; document.body.appendChild(iframe); @@ -249,15 +191,6 @@ function createIframe(callback) { document.querySelector(msg.data.selector).dispatchEvent(evt); }); - addMessageListener('setsrc', function onContextMenu(msg) { - var wrappedTarget = content.document.querySelector(msg.data.selector); - var target = XPCNativeWrapper.unwrap(wrappedTarget); - target.addEventListener('loadedmetadata', function() { - sendAsyncMessage('test:srcset'); - }); - target.src = msg.data.src; - }); - addMessageListener('browser-element-api:call', function onCallback(msg) { if (msg.data.msg_name != 'fire-ctx-callback') return; From 86b5023ccf083c8e45069beca9004fbcdc0ee06e Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 9 Jul 2013 16:06:05 +0200 Subject: [PATCH 13/42] Bug 875710: Added getCardLockRetryCount to nsIIccProvider, r=vyang, sr=mounir This patch adds getCardLockRetryCount to nsIIccProvider and its implementations. This method allows callers to query the number of remaining tries for unlocking a SIM-card lock. Supported locks are 'pin', 'puk', 'pin2', 'puk2', 'nck', 'cck', and 'spck'. The call returns a DOM request that returns the retry count in its success handler, or signals an appropriate error. Reading the retry count is an optional feature and may not be supported for all lock types. In this case the DOM request receives and error with the name GECKO_ERROR_NOT_SUPPORTED. For an invalid lock type, the error name is GECKO_ERROR_GENERIC_FAILURE. getCardLockRetryCount replaces retryCount in nsIDOMMobileConnection, which is now deprecated. --HG-- extra : rebase_source : d1d11612f836652dca85f7c701f09e7af962e3b7 --- dom/icc/interfaces/nsIDOMIccManager.idl | 16 ++++++++++- dom/icc/interfaces/nsIIccProvider.idl | 3 +- dom/icc/src/IccManager.cpp | 10 +++++++ dom/system/gonk/RILContentHelper.js | 37 +++++++++++++++++++++++++ dom/system/gonk/RadioInterfaceLayer.js | 17 ++++++++++++ dom/system/gonk/ril_worker.js | 30 ++++++++++++++++++++ 6 files changed, 111 insertions(+), 2 deletions(-) diff --git a/dom/icc/interfaces/nsIDOMIccManager.idl b/dom/icc/interfaces/nsIDOMIccManager.idl index ab218426ab7a..e5f7f4a11636 100644 --- a/dom/icc/interfaces/nsIDOMIccManager.idl +++ b/dom/icc/interfaces/nsIDOMIccManager.idl @@ -9,7 +9,7 @@ interface nsIDOMEventListener; interface nsIDOMDOMRequest; interface nsIDOMContact; -[scriptable, builtinclass, uuid(d21b7070-c2bc-11e2-8b8b-0800200c9a66)] +[scriptable, builtinclass, uuid(5f405112-4da9-4d4d-942c-4da3cb7928e1)] interface nsIDOMMozIccManager : nsIDOMEventTarget { /** @@ -432,6 +432,20 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget */ [implicit_jscontext] attribute jsval onicccardlockerror; + /** + * Retrieve the number of remaining tries for unlocking the card. + * + * @param lockType + * Identifies the lock type, e.g. "pin" for the PIN lock, "puk" for + * the PUK lock. + * + * @return a DOM Request. + * If the lock type is "pin", or "puk", the request's result will be + * an object containing the number of retries for the specified + * lock. For any other lock type, the result is undefined. + */ + nsIDOMDOMRequest getCardLockRetryCount(in DOMString lockType); + // UICC Phonebook Interfaces. /** diff --git a/dom/icc/interfaces/nsIIccProvider.idl b/dom/icc/interfaces/nsIIccProvider.idl index d01e191be802..6b6b00fd62b3 100644 --- a/dom/icc/interfaces/nsIIccProvider.idl +++ b/dom/icc/interfaces/nsIIccProvider.idl @@ -21,7 +21,7 @@ interface nsIIccListener : nsISupports /** * XPCOM component (in the content process) that provides the ICC information. */ -[scriptable, uuid(77487bf0-c2be-11e2-8b8b-0800200c9a66)] +[scriptable, uuid(7131dfbe-9a2c-434d-b6b8-3eebf491ce1a)] interface nsIIccProvider : nsISupports { /** @@ -57,6 +57,7 @@ interface nsIIccProvider : nsISupports nsIDOMDOMRequest getCardLockState(in nsIDOMWindow window, in DOMString lockType); nsIDOMDOMRequest unlockCardLock(in nsIDOMWindow window, in jsval info); nsIDOMDOMRequest setCardLock(in nsIDOMWindow window, in jsval info); + nsIDOMDOMRequest getCardLockRetryCount(in nsIDOMWindow window, in DOMString lockType); /** * Phonebook interfaces. diff --git a/dom/icc/src/IccManager.cpp b/dom/icc/src/IccManager.cpp index 734008ea4c9a..5a0dd8eaadaa 100644 --- a/dom/icc/src/IccManager.cpp +++ b/dom/icc/src/IccManager.cpp @@ -170,6 +170,16 @@ IccManager::UnlockCardLock(const JS::Value& aInfo, nsIDOMDOMRequest** aDomReques return mProvider->UnlockCardLock(GetOwner(), aInfo, aDomRequest); } +NS_IMETHODIMP +IccManager::GetCardLockRetryCount(const nsAString& aLockType, nsIDOMDOMRequest** aDomRequest) +{ + if (!mProvider) { + return NS_ERROR_FAILURE; + } + + return mProvider->GetCardLockRetryCount(GetOwner(), aLockType, aDomRequest); +} + NS_IMETHODIMP IccManager::IccOpenChannel(const nsAString& aAid, nsIDOMDOMRequest** aRequest) { diff --git a/dom/system/gonk/RILContentHelper.js b/dom/system/gonk/RILContentHelper.js index 5e2bbc6cd5d6..70bde10fedfe 100644 --- a/dom/system/gonk/RILContentHelper.js +++ b/dom/system/gonk/RILContentHelper.js @@ -79,6 +79,7 @@ const RIL_IPC_MSG_NAMES = [ "RIL:VoicemailInfoChanged", "RIL:CallError", "RIL:CardLockResult", + "RIL:CardLockRetryCount", "RIL:USSDReceived", "RIL:SendMMI:Return:OK", "RIL:SendMMI:Return:KO", @@ -123,6 +124,17 @@ MobileIccCardLockResult.prototype = { success: 'r'} }; +function MobileIccCardLockRetryCount(options) { + this.lockType = options.lockType; + this.retryCount = options.retryCount; + this.success = options.success; +} +MobileIccCardLockRetryCount.prototype = { + __exposedProps__ : {lockType: 'r', + retryCount: 'r', + success: 'r'} +}; + function MobileICCInfo() {} MobileICCInfo.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozMobileICCInfo]), @@ -650,6 +662,23 @@ RILContentHelper.prototype = { return request; }, + getCardLockRetryCount: function getCardLockRetryCount(window, lockType) { + if (window == null) { + throw Components.Exception("Can't get window object", + Cr.NS_ERROR_UNEXPECTED); + } + let request = Services.DOMRequest.createRequest(window); + let requestId = this.getRequestId(request); + cpmm.sendAsyncMessage("RIL:GetCardLockRetryCount", { + clientId: 0, + data: { + lockType: lockType, + requestId: requestId + } + }); + return request; + }, + sendMMI: function sendMMI(window, mmi) { // We need to save the global window to get the proper MMIError // constructor once we get the reply from the parent process. @@ -1378,6 +1407,14 @@ RILContentHelper.prototype = { this.fireRequestError(msg.json.requestId, msg.json.errorMsg); } break; + case "RIL:CardLockRetryCount": + if (msg.json.success) { + let result = new MobileIccCardLockRetryCount(msg.json); + this.fireRequestSuccess(msg.json.requestId, result); + } else { + this.fireRequestError(msg.json.requestId, msg.json.errorMsg); + } + break; case "RIL:USSDReceived": { let data = msg.json.data; this._deliverEvent("_mobileConnectionListeners", diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index cb24a3f29b86..3e52a7bb842a 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -115,6 +115,7 @@ const RIL_IPC_ICCMANAGER_MSG_NAMES = [ "RIL:GetCardLockState", "RIL:UnlockCardLock", "RIL:SetCardLock", + "RIL:GetCardLockRetryCount", "RIL:IccOpenChannel", "RIL:IccExchangeAPDU", "RIL:IccCloseChannel", @@ -826,6 +827,10 @@ RadioInterface.prototype = { gMessageManager.saveRequestTarget(msg); this.setCardLock(msg.json.data); break; + case "RIL:GetCardLockRetryCount": + gMessageManager.saveRequestTarget(msg); + this.getCardLockRetryCount(msg.json.data); + break; case "RIL:SendMMI": gMessageManager.saveRequestTarget(msg); this.sendMMI(msg.json.data); @@ -1025,6 +1030,9 @@ RadioInterface.prototype = { case "iccUnlockCardLock": this.handleIccCardLockResult(message); break; + case "iccGetCardLockRetryCount": + this.handleIccCardLockRetryCount(message); + break; case "icccontacts": this.handleReadIccContacts(message); break; @@ -2107,6 +2115,10 @@ RadioInterface.prototype = { gMessageManager.sendRequestResults("RIL:CardLockResult", message); }, + handleIccCardLockRetryCount: function handleIccCardLockRetryCount(message) { + gMessageManager.sendRequestResults("RIL:CardLockRetryCount", message); + }, + handleUSSDReceived: function handleUSSDReceived(ussd) { if (DEBUG) this.debug("handleUSSDReceived " + JSON.stringify(ussd)); gSystemMessenger.broadcastMessage("ussd-received", ussd); @@ -3333,6 +3345,11 @@ RadioInterface.prototype = { this.worker.postMessage(message); }, + getCardLockRetryCount: function getCardLockRetryCount(message) { + message.rilMessageType = "iccGetCardLockRetryCount"; + this.worker.postMessage(message); + }, + readIccContacts: function readIccContacts(message) { message.rilMessageType = "readICCContacts"; this.worker.postMessage(message); diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 69a85e4b567d..64478477ffaa 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -1196,6 +1196,36 @@ let RIL = { this.queryICCFacilityLock(options); }, + /** + * Helper function for fetching the number of unlock retries of ICC locks. + */ + iccGetCardLockRetryCount: function iccGetCardLockRetryCount(options) { + switch (options.lockType) { + case "pin": + case "puk": + case "pin2": + case "puk2": + case "nck": + case "cck": + case "spck": + options.errorMsg = GECKO_ERROR_REQUEST_NOT_SUPPORTED; + options.success = false; + this.sendDOMMessage(options); + return; + default: + options.errorMsg = GECKO_ERROR_GENERIC_FAILURE; + options.success = false; + this.sendDOMMessage(options); + return; + } + + // TODO: We currently don't have a way for + // reading the retry count. See bug 868896. + options.retryCount = 0; + options.success = true; + this.sendDOMMessage(options); + }, + /** * Query ICC facility lock. * From 87b5f80b6fdbbfdcce748d010d24ce529c6576ef Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 9 Jul 2013 16:06:45 +0200 Subject: [PATCH 14/42] Bug 875710: Added marionette tests for getCardLockRetryCount, r=vyang The marionette tests for getCardLockRetryCount test retrieving the retry count for 'pin', 'puk', and an invalid lock type. The former two must return success or 'NotSupportedError', the latter may only return 'IllegalAccessError'. * * * fix mar --HG-- extra : rebase_source : 509cd74e783eaf8d77be8b37c7143f3043d69b28 --- .../tests/marionette/test_icc_card_lock.js | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/dom/icc/tests/marionette/test_icc_card_lock.js b/dom/icc/tests/marionette/test_icc_card_lock.js index 561229d55c49..51d0ef3544ad 100644 --- a/dom/icc/tests/marionette/test_icc_card_lock.js +++ b/dom/icc/tests/marionette/test_icc_card_lock.js @@ -90,10 +90,80 @@ function testPinChangeSuccess() { }; } +/* Read PIN-lock retry count */ +function testPinCardLockRetryCount() { + let request = icc.getCardLockRetryCount('pin'); + + ok(request instanceof DOMRequest, + 'request instanceof ' + request.constructor); + + request.onsuccess = function onsuccess() { + is(request.result.lockType, 'pin', + 'lockType is ' + request.result.lockType); + ok(request.result.retryCount >= 0, + 'retryCount is ' + request.result.retryCount); + runNextTest(); + }; + request.onerror = function onerror() { + // The operation is optional any might not be supported for all + // all locks. In this case, we generate 'NotSupportedError' for + // the valid lock types. + is(request.error.name, 'RequestNotSupported', + 'error name is ' + request.error.name); + runNextTest(); + }; +} + +/* Read PUK-lock retry count */ +function testPukCardLockRetryCount() { + let request = icc.getCardLockRetryCount('puk'); + + ok(request instanceof DOMRequest, + 'request instanceof ' + request.constructor); + + request.onsuccess = function onsuccess() { + is(request.result.lockType, 'puk', + 'lockType is ' + request.result.lockType); + ok(request.result.retryCount >= 0, + 'retryCount is ' + request.result.retryCount); + runNextTest(); + }; + request.onerror = function onerror() { + // The operation is optional any might not be supported for all + // all locks. In this case, we generate 'NotSupportedError' for + // the valid lock types. + is(request.error.name, 'RequestNotSupported', + 'error name is ' + request.error.name); + runNextTest(); + }; +} + +/* Read lock retry count for an invalid entries */ +function testInvalidCardLockRetryCount() { + let request = icc.getCardLockRetryCount('invalid-lock-type'); + + ok(request instanceof DOMRequest, + 'request instanceof ' + request.constructor); + + request.onsuccess = function onsuccess() { + ok(false, + 'request should never return success for an invalid lock type'); + runNextTest(); + }; + request.onerror = function onerror() { + is(request.error.name, 'GenericFailure', + 'error name is ' + request.error.name); + runNextTest(); + }; +} + let tests = [ testPinChangeFailed, testPinChangeFailedNotification, testPinChangeSuccess, + testPinCardLockRetryCount, + testPukCardLockRetryCount, + testInvalidCardLockRetryCount ]; function runNextTest() { From 5a42ee8cf0dbc7e30f62fcb9ca779d3d99d10b85 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 08:05:23 -0700 Subject: [PATCH 15/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/02b607cf7882 Author: Francisco Jordano Desc: Merge pull request #10844 from arcturus/bug-890342 Bug 890342 - [SMS] LinkHelper regression: misrecognized links ======== https://hg.mozilla.org/integration/gaia-central/rev/a37d3007e1a1 Author: Francisco Jordano Desc: Bug 890342 - [SMS] LinkHelper regression: misrecognized links --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5dcb3ae1d67a..4135eaaf9deb 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "68ff795e16c166dd5c11ef21efabb4bf30e33c0a", + "revision": "02b607cf78829a3d691c694723e69565dffb350b", "repo_path": "/integration/gaia-central" } From 10230b93e8e67f1f3e362ad06ad6758855c9ee94 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 08:35:23 -0700 Subject: [PATCH 16/42] Bumping gaia.json for 1 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/95ada003fd61 Author: Rick Waldron Desc: Bug 890989 - [sms] we should not split the phone numbers on spaces r=julienw https://bugzilla.mozilla.org/show_bug.cgi?id=890989 Signed-off-by: Rick Waldron --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 4135eaaf9deb..558f9ff5deef 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "02b607cf78829a3d691c694723e69565dffb350b", + "revision": "95ada003fd6135162538bb2f0d61e2aab869bd9b", "repo_path": "/integration/gaia-central" } From 81e71fa474d69a8e53f5787b806d6ed30440b5b0 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 9 Jul 2013 12:28:03 -0400 Subject: [PATCH 17/42] Backed out changeset 24484841e7bc (bug 888926) on suspicion of causing Marionette timeouts. --- dom/messages/SystemMessageInternal.js | 50 +++++++++------------------ 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/dom/messages/SystemMessageInternal.js b/dom/messages/SystemMessageInternal.js index 5c531c3f40f0..e849e615998a 100644 --- a/dom/messages/SystemMessageInternal.js +++ b/dom/messages/SystemMessageInternal.js @@ -47,11 +47,6 @@ function debug(aMsg) { // dump("-- SystemMessageInternal " + Date.now() + " : " + aMsg + "\n"); } - -const MSG_SENT_SUCCESS = 0; -const MSG_SENT_FAILURE_PERM_DENIED = 1; -const MSG_SENT_FAILURE_APP_NOT_RUNNING = 2; - // Implementation of the component used by internal users. function SystemMessageInternal() { @@ -163,16 +158,13 @@ SystemMessageInternal.prototype = { debug("Sending " + aType + " " + JSON.stringify(aMessage) + " for " + aPageURI.spec + " @ " + aManifestURI.spec); - let result = this._sendMessageCommon(aType, - aMessage, - messageID, - aPageURI.spec, - aManifestURI.spec); - debug("Returned status of sending message: " + result); - // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (result === MSG_SENT_FAILURE_PERM_DENIED) { + if (!this._sendMessageCommon(aType, + aMessage, + messageID, + aPageURI.spec, + aManifestURI.spec)) { return; } @@ -181,10 +173,8 @@ SystemMessageInternal.prototype = { // Queue this message in the corresponding pages. this._queueMessage(page, aMessage, messageID); - if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { - // Don't open the page again if we already sent the message to it. - this._openAppPage(page, aMessage); - } + // Open app pages to handle their pending messages. + this._openAppPage(page, aMessage); } }, @@ -206,27 +196,21 @@ SystemMessageInternal.prototype = { // Find pages that registered an handler for this type. this._pages.forEach(function(aPage) { if (aPage.type == aType) { - let result = this._sendMessageCommon(aType, - aMessage, - messageID, - aPage.uri, - aPage.manifest); - debug("Returned status of sending message: " + result); - - // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (result === MSG_SENT_FAILURE_PERM_DENIED) { + if (!this._sendMessageCommon(aType, + aMessage, + messageID, + aPage.uri, + aPage.manifest)) { return; } // Queue this message in the corresponding pages. this._queueMessage(aPage, aMessage, messageID); - if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { - // Open app pages to handle their pending messages. - this._openAppPage(aPage, aMessage); - } + // Open app pages to handle their pending messages. + this._openAppPage(aPage, aMessage); } }, this); }, @@ -541,7 +525,7 @@ SystemMessageInternal.prototype = { .isSystemMessagePermittedToSend(aType, aPageURI, aManifestURI)) { - return MSG_SENT_FAILURE_PERM_DENIED; + return false; } let appPageIsRunning = false; @@ -587,11 +571,9 @@ SystemMessageInternal.prototype = { // message when the page finishes handling the system message with other // pending messages. At that point, we'll release the lock we acquired. this._acquireCpuWakeLock(pageKey); - return MSG_SENT_FAILURE_APP_NOT_RUNNING; - } else { - return MSG_SENT_SUCCESS; } + return true; }, classID: Components.ID("{70589ca5-91ac-4b9e-b839-d6a88167d714}"), From a053a1052261dea45a5885c5e06048e62be9d1e6 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 09:30:29 -0700 Subject: [PATCH 18/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/cec2f675e2c2 Author: Kevin Grandon Desc: Merge pull request #10857 from crh0716/891042 Bug 891042 - Add a mock for mozIccManager ======== https://hg.mozilla.org/integration/gaia-central/rev/ee8354d7ae50 Author: crh0716 Desc: Bug 891042 - Add a mock for mozIccManager --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 558f9ff5deef..bb66afc9ffee 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "95ada003fd6135162538bb2f0d61e2aab869bd9b", + "revision": "cec2f675e2c29c68edc1823879257b14fdcb39b1", "repo_path": "/integration/gaia-central" } From 9b915d58a3bc5a53c0d20ebe5daae8f2d0c93d92 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 10:15:25 -0700 Subject: [PATCH 19/42] Bumping gaia.json for 2 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/7cb565d70183 Author: You-Sheng Yang Desc: Merge pull request #10854 from vicamo/bugzilla/891233/deprecate-mozSms-in-cost-control Bug 891233 - [Cost Control] use navigator.mozMobileMessage instead. r=sa... ======== https://hg.mozilla.org/integration/gaia-central/rev/3f9ba6561939 Author: You-Sheng Yang (楊有勝) Desc: Bug 891233 - [Cost Control] use navigator.mozMobileMessage instead. r=salva --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index bb66afc9ffee..2414aeb2a1db 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "cec2f675e2c29c68edc1823879257b14fdcb39b1", + "revision": "7cb565d70183bd3101237cd04972c70981dce655", "repo_path": "/integration/gaia-central" } From e52028de682b0083dcdd786b5801fd7aa272c8b9 Mon Sep 17 00:00:00 2001 From: "Antonio M. Amaya" Date: Wed, 3 Jul 2013 13:20:06 +0200 Subject: [PATCH 20/42] Bug 888926 - Avoid sending the system-messages-open-app message if the target app has already been notified. r=gene, r=fabrice --- dom/messages/SystemMessageInternal.js | 50 ++++++++++++++++++--------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/dom/messages/SystemMessageInternal.js b/dom/messages/SystemMessageInternal.js index e849e615998a..5c531c3f40f0 100644 --- a/dom/messages/SystemMessageInternal.js +++ b/dom/messages/SystemMessageInternal.js @@ -47,6 +47,11 @@ function debug(aMsg) { // dump("-- SystemMessageInternal " + Date.now() + " : " + aMsg + "\n"); } + +const MSG_SENT_SUCCESS = 0; +const MSG_SENT_FAILURE_PERM_DENIED = 1; +const MSG_SENT_FAILURE_APP_NOT_RUNNING = 2; + // Implementation of the component used by internal users. function SystemMessageInternal() { @@ -158,13 +163,16 @@ SystemMessageInternal.prototype = { debug("Sending " + aType + " " + JSON.stringify(aMessage) + " for " + aPageURI.spec + " @ " + aManifestURI.spec); + let result = this._sendMessageCommon(aType, + aMessage, + messageID, + aPageURI.spec, + aManifestURI.spec); + debug("Returned status of sending message: " + result); + // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (!this._sendMessageCommon(aType, - aMessage, - messageID, - aPageURI.spec, - aManifestURI.spec)) { + if (result === MSG_SENT_FAILURE_PERM_DENIED) { return; } @@ -173,8 +181,10 @@ SystemMessageInternal.prototype = { // Queue this message in the corresponding pages. this._queueMessage(page, aMessage, messageID); - // Open app pages to handle their pending messages. - this._openAppPage(page, aMessage); + if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { + // Don't open the page again if we already sent the message to it. + this._openAppPage(page, aMessage); + } } }, @@ -196,21 +206,27 @@ SystemMessageInternal.prototype = { // Find pages that registered an handler for this type. this._pages.forEach(function(aPage) { if (aPage.type == aType) { + let result = this._sendMessageCommon(aType, + aMessage, + messageID, + aPage.uri, + aPage.manifest); + debug("Returned status of sending message: " + result); + + // Don't need to open the pages and queue the system message // which was not allowed to be sent. - if (!this._sendMessageCommon(aType, - aMessage, - messageID, - aPage.uri, - aPage.manifest)) { + if (result === MSG_SENT_FAILURE_PERM_DENIED) { return; } // Queue this message in the corresponding pages. this._queueMessage(aPage, aMessage, messageID); - // Open app pages to handle their pending messages. - this._openAppPage(aPage, aMessage); + if (result === MSG_SENT_FAILURE_APP_NOT_RUNNING) { + // Open app pages to handle their pending messages. + this._openAppPage(aPage, aMessage); + } } }, this); }, @@ -525,7 +541,7 @@ SystemMessageInternal.prototype = { .isSystemMessagePermittedToSend(aType, aPageURI, aManifestURI)) { - return false; + return MSG_SENT_FAILURE_PERM_DENIED; } let appPageIsRunning = false; @@ -571,9 +587,11 @@ SystemMessageInternal.prototype = { // message when the page finishes handling the system message with other // pending messages. At that point, we'll release the lock we acquired. this._acquireCpuWakeLock(pageKey); + return MSG_SENT_FAILURE_APP_NOT_RUNNING; + } else { + return MSG_SENT_SUCCESS; } - return true; }, classID: Components.ID("{70589ca5-91ac-4b9e-b839-d6a88167d714}"), From 12785ceb9b6bdecfe4010d8105cdb3ff7b76e0d7 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 9 Jul 2013 14:21:02 -0400 Subject: [PATCH 21/42] Backed out changesets d76274933db8 and dd3cedcdbe2b (bug 865347) to see if it fixes the Marionette timeouts. --- dom/ipc/ContentParent.cpp | 32 ------------- dom/ipc/ContentParent.h | 4 -- dom/ipc/PContent.ipdl | 4 -- dom/system/gonk/nsIVolume.idl | 5 +- dom/system/gonk/nsIVolumeService.idl | 6 +-- dom/system/gonk/nsVolume.cpp | 37 +------------- dom/system/gonk/nsVolume.h | 11 +---- dom/system/gonk/nsVolumeService.cpp | 48 +------------------ dom/system/gonk/nsVolumeService.h | 2 +- dom/system/gonk/tests/marionette/manifest.ini | 1 - .../gonk/tests/marionette/test_fakevolume.js | 29 ----------- 11 files changed, 8 insertions(+), 171 deletions(-) delete mode 100644 dom/system/gonk/tests/marionette/test_fakevolume.js diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index a30583240720..80ee26ea184c 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2572,37 +2572,5 @@ ContentParent::RecvSystemMessageHandled() return true; } -bool -ContentParent::RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) -{ -#ifdef MOZ_WIDGET_GONK - nsresult rv; - nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); - if (vs) { - vs->CreateFakeVolume(fsName, mountPoint); - } - return true; -#else - NS_WARNING("ContentParent::RecvCreateFakeVolume shouldn't be called when MOZ_WIDGET_GONK is not defined"); - return false; -#endif -} - -bool -ContentParent::RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) -{ -#ifdef MOZ_WIDGET_GONK - nsresult rv; - nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); - if (vs) { - vs->SetFakeVolumeState(fsName, fsState); - } - return true; -#else - NS_WARNING("ContentParent::RecvSetFakeVolumeState shouldn't be called when MOZ_WIDGET_GONK is not defined"); - return false; -#endif -} - } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index abdaa21c3b74..ee5d43abd256 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -416,10 +416,6 @@ private: virtual bool RecvSystemMessageHandled() MOZ_OVERRIDE; - virtual bool RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) MOZ_OVERRIDE; - - virtual bool RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) MOZ_OVERRIDE; - virtual void ProcessingError(Result what) MOZ_OVERRIDE; GeckoChildProcessHost* mSubprocess; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 01a3566c3e78..788424509b1f 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -515,10 +515,6 @@ parent: // Notify the parent that the child has finished handling a system message. async SystemMessageHandled(); - // called by the child (test code only) to propagate volume changes to the parent - async CreateFakeVolume(nsString fsName, nsString mountPoint); - async SetFakeVolumeState(nsString fsName, int32_t fsState); - both: AsyncMessage(nsString aMessage, ClonedMessageData aData); }; diff --git a/dom/system/gonk/nsIVolume.idl b/dom/system/gonk/nsIVolume.idl index c7170fbb04ba..f413189f1681 100644 --- a/dom/system/gonk/nsIVolume.idl +++ b/dom/system/gonk/nsIVolume.idl @@ -5,7 +5,7 @@ #include "nsISupports.idl" #include "nsIVolumeStat.idl" -[scriptable, uuid(4b5bd562-bd05-4658-ab0f-f668a9e25fb5)] +[scriptable, uuid(1134f267-7b81-42f2-b64a-6edb91286576)] interface nsIVolume : nsISupports { // These MUST match the states from android's system/vold/Volume.h header @@ -49,9 +49,6 @@ interface nsIVolume : nsISupports readonly attribute boolean isMountLocked; nsIVolumeStat getStats(); - - // Whether this is a fake volume. - readonly attribute boolean isFake; }; %{C++ diff --git a/dom/system/gonk/nsIVolumeService.idl b/dom/system/gonk/nsIVolumeService.idl index 33a3f4636857..bf943d14482b 100644 --- a/dom/system/gonk/nsIVolumeService.idl +++ b/dom/system/gonk/nsIVolumeService.idl @@ -12,7 +12,7 @@ %} [ref] native nsStringTArrayRef(nsTArray); -[scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] +[scriptable, uuid(7c179fb7-67a0-43a3-9337-294e0360b858)] interface nsIVolumeService : nsISupports { nsIVolume getVolumeByName(in DOMString volName); @@ -24,10 +24,6 @@ interface nsIVolumeService : nsISupports nsIVolumeMountLock createMountLock(in DOMString volName); [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); - - /* for test case only to simulate sdcard insertion/removal */ - void createFakeVolume(in DOMString name, in DOMString path); - void SetFakeVolumeState(in DOMString name, in long state); }; %{C++ diff --git a/dom/system/gonk/nsVolume.cpp b/dom/system/gonk/nsVolume.cpp index e1318a6b49e4..58c3a51ace74 100644 --- a/dom/system/gonk/nsVolume.cpp +++ b/dom/system/gonk/nsVolume.cpp @@ -50,8 +50,7 @@ nsVolume::nsVolume(const Volume* aVolume) mMountPoint(NS_ConvertUTF8toUTF16(aVolume->MountPoint())), mState(aVolume->State()), mMountGeneration(aVolume->MountGeneration()), - mMountLocked(aVolume->IsMountLocked()), - mIsFake(false) + mMountLocked(aVolume->IsMountLocked()) { } @@ -86,13 +85,6 @@ bool nsVolume::Equals(nsIVolume* aVolume) if (mMountLocked != volIsMountLocked) { return false; } - - bool isFake; - aVolume->GetIsFake(&isFake); - if (mIsFake != isFake) { - return false; - } - return true; } @@ -144,12 +136,6 @@ NS_IMETHODIMP nsVolume::GetStats(nsIVolumeStat **aResult) return NS_OK; } -NS_IMETHODIMP nsVolume::GetIsFake(bool *aIsFake) -{ - *aIsFake = mIsFake; - return NS_OK; -} - void nsVolume::LogState() const { @@ -170,7 +156,6 @@ void nsVolume::Set(nsIVolume* aVolume) aVolume->GetName(mName); aVolume->GetMountPoint(mMountPoint); aVolume->GetState(&mState); - aVolume->GetIsFake(&mIsFake); int32_t volMountGeneration; aVolume->GetMountGeneration(&volMountGeneration); @@ -237,25 +222,5 @@ nsVolume::UpdateMountLock(bool aMountLocked) MountGeneration(), aMountLocked)); } -void -nsVolume::SetState(int32_t aState) -{ - static int32_t sMountGeneration = 0; - - MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default); - MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(IsFake()); - - if (aState == mState) { - return; - } - - if (aState == nsIVolume::STATE_MOUNTED) { - mMountGeneration = ++sMountGeneration; - } - - mState = aState; -} - } // system } // mozilla diff --git a/dom/system/gonk/nsVolume.h b/dom/system/gonk/nsVolume.h index 61bdd3479cb4..3d04f7932e9b 100644 --- a/dom/system/gonk/nsVolume.h +++ b/dom/system/gonk/nsVolume.h @@ -32,8 +32,7 @@ public: mMountPoint(aMountPoint), mState(aState), mMountGeneration(aMountGeneration), - mMountLocked(false), - mIsFake(false) + mMountLocked(false) { } @@ -43,8 +42,7 @@ public: : mName(aName), mState(STATE_INIT), mMountGeneration(-1), - mMountLocked(true), // Needs to agree with Volume::Volume - mIsFake(false) + mMountLocked(true) // Needs to agree with Volume::Volume { } @@ -74,16 +72,11 @@ private: void UpdateMountLock(const nsAString& aMountLockState); void UpdateMountLock(bool aMountLocked); - bool IsFake() const { return mIsFake; } - void SetIsFake(bool aIsFake) { mIsFake = aIsFake; } - void SetState(int32_t aState); - nsString mName; nsString mMountPoint; int32_t mState; int32_t mMountGeneration; bool mMountLocked; - bool mIsFake; }; } // system diff --git a/dom/system/gonk/nsVolumeService.cpp b/dom/system/gonk/nsVolumeService.cpp index 39606c3700ba..7e43dafb0cb3 100644 --- a/dom/system/gonk/nsVolumeService.cpp +++ b/dom/system/gonk/nsVolumeService.cpp @@ -326,7 +326,7 @@ nsVolumeService::FindVolumeByName(const nsAString& aName) //static already_AddRefed -nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake /*= false*/) +nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName) { MonitorAutoLock autoLock(mArrayMonitor); @@ -337,7 +337,6 @@ nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake / } // Volume not found - add a new one vol = new nsVolume(aName); - vol->SetIsFake(aIsFake); mVolumeArray.AppendElement(vol); return vol.forget(); } @@ -349,19 +348,11 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) nsString volName; aVolume->GetName(volName); - bool aIsFake; - aVolume->GetIsFake(&aIsFake); - nsRefPtr vol = CreateOrFindVolumeByName(volName, aIsFake); + nsRefPtr vol = CreateOrFindVolumeByName(volName); if (vol->Equals(aVolume)) { // Nothing has really changed. Don't bother telling anybody. return; } - - if (!vol->IsFake() && aIsFake) { - // Prevent an incoming fake volume from overriding an existing real volume. - return; - } - vol->Set(aVolume); nsCOMPtr obs = GetObserverService(); if (!obs) { @@ -371,41 +362,6 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) obs->NotifyObservers(vol, NS_VOLUME_STATE_CHANGED, stateStr.get()); } -NS_IMETHODIMP -nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path) -{ - if (XRE_GetProcessType() == GeckoProcessType_Default) { - nsRefPtr vol = new nsVolume(name, path, nsIVolume::STATE_INIT, -1); - vol->SetIsFake(true); - UpdateVolume(vol.get()); - return NS_OK; - } - - ContentChild::GetSingleton()->SendCreateFakeVolume(nsString(name), nsString(path)); - return NS_OK; -} - -NS_IMETHODIMP -nsVolumeService::SetFakeVolumeState(const nsAString& name, int32_t state) -{ - if (XRE_GetProcessType() == GeckoProcessType_Default) { - nsRefPtr vol; - { - MonitorAutoLock autoLock(mArrayMonitor); - vol = FindVolumeByName(name); - } - if (!vol || !vol->IsFake()) { - return NS_ERROR_NOT_AVAILABLE; - } - vol->SetState(state); - UpdateVolume(vol.get()); - return NS_OK; - } - - ContentChild::GetSingleton()->SendSetFakeVolumeState(nsString(name), state); - return NS_OK; -} - /*************************************************************************** * The UpdateVolumeRunnable creates an nsVolume and updates the main thread * data structure while running on the main thread. diff --git a/dom/system/gonk/nsVolumeService.h b/dom/system/gonk/nsVolumeService.h index e537d99dd75e..34eb710cf0a0 100644 --- a/dom/system/gonk/nsVolumeService.h +++ b/dom/system/gonk/nsVolumeService.h @@ -50,7 +50,7 @@ private: const nsAString& aMountLockState); already_AddRefed FindVolumeByMountLockName(const nsAString& aMountLockName); already_AddRefed FindVolumeByName(const nsAString& aName); - already_AddRefed CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake = false); + already_AddRefed CreateOrFindVolumeByName(const nsAString& aName); Monitor mArrayMonitor; nsVolume::Array mVolumeArray; diff --git a/dom/system/gonk/tests/marionette/manifest.ini b/dom/system/gonk/tests/marionette/manifest.ini index a0a50c70bc93..0499a55955ed 100644 --- a/dom/system/gonk/tests/marionette/manifest.ini +++ b/dom/system/gonk/tests/marionette/manifest.ini @@ -6,4 +6,3 @@ qemu = true [test_geolocation.js] disabled = Bug 808783 [test_get_voicemailInfo.js] -[test_fakevolume.js] diff --git a/dom/system/gonk/tests/marionette/test_fakevolume.js b/dom/system/gonk/tests/marionette/test_fakevolume.js deleted file mode 100644 index 5ac84d92ab24..000000000000 --- a/dom/system/gonk/tests/marionette/test_fakevolume.js +++ /dev/null @@ -1,29 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ */ - -MARIONETTE_TIMEOUT = 10000; - -let Cc = SpecialPowers.Cc; -let Ci = SpecialPowers.Ci; - -let volumeService = Cc["@mozilla.org/telephony/volume-service;1"].getService(Ci.nsIVolumeService); -ok(volumeService, "Should have volume service"); - -let volName = "fake"; -let mountPoint = "/data/fake/storage"; -volumeService.createFakeVolume(volName, mountPoint); - -let vol = volumeService.getVolumeByName(volName); -ok(vol, "volume shouldn't be null"); - -is(volName, vol.name, "name"); -is(mountPoint, vol.mountPoint, "moutnPoint"); -is(Ci.nsIVolume.STATE_INIT, vol.state, "state"); - - -let oldMountGen = vol.mountGeneration; -volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED); -is(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state"); -ok(vol.mountGeneration > oldMountGen, "mount generation should be incremented"); - -finish(); From 1d6572690c9809ea4b81f4dfe6bb5a53069885a3 Mon Sep 17 00:00:00 2001 From: Tapas Kundu Date: Tue, 9 Jul 2013 11:51:09 -0700 Subject: [PATCH 22/42] Bug 890541 - (gonk-jb) Call setInteractive() when display is enabled/disable r=mwu --- widget/gonk/libdisplay/GonkDisplayJB.cpp | 16 ++++++++++++++-- widget/gonk/libdisplay/GonkDisplayJB.h | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/widget/gonk/libdisplay/GonkDisplayJB.cpp b/widget/gonk/libdisplay/GonkDisplayJB.cpp index ca146a2cb804..968fc5404e6a 100644 --- a/widget/gonk/libdisplay/GonkDisplayJB.cpp +++ b/widget/gonk/libdisplay/GonkDisplayJB.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include "GraphicBufferAlloc.h" @@ -36,6 +37,7 @@ GonkDisplayJB::GonkDisplayJB() , mHwc(nullptr) , mFBDevice(nullptr) , mEnabledCallback(nullptr) + , mPowerModule(nullptr) { int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &mFBModule); ALOGW_IF(err, "%s module not found", GRALLOC_HARDWARE_MODULE_ID); @@ -82,6 +84,12 @@ GonkDisplayJB::GonkDisplayJB() surfaceformat = HAL_PIXEL_FORMAT_RGBA_8888; } + err = hw_get_module(POWER_HARDWARE_MODULE_ID, + (hw_module_t const**)&mPowerModule); + if (!err) + mPowerModule->init(mPowerModule); + ALOGW_IF(err, "Couldn't load %s module (%s)", POWER_HARDWARE_MODULE_ID, strerror(-err)); + mAlloc = new GraphicBufferAlloc(); mFBSurface = new FramebufferSurface(0, mWidth, mHeight, surfaceformat, mAlloc); @@ -115,8 +123,10 @@ GonkDisplayJB::GetNativeWindow() void GonkDisplayJB::SetEnabled(bool enabled) { - if (enabled) + if (enabled) { autosuspend_disable(); + mPowerModule->setInteractive(mPowerModule, true); + } if (mHwc) mHwc->blank(mHwc, HWC_DISPLAY_PRIMARY, !enabled); @@ -126,8 +136,10 @@ GonkDisplayJB::SetEnabled(bool enabled) if (mEnabledCallback) mEnabledCallback(enabled); - if (!enabled) + if (!enabled) { autosuspend_enable(); + mPowerModule->setInteractive(mPowerModule, false); + } } void diff --git a/widget/gonk/libdisplay/GonkDisplayJB.h b/widget/gonk/libdisplay/GonkDisplayJB.h index 51494805be18..e2ad00b7ca02 100644 --- a/widget/gonk/libdisplay/GonkDisplayJB.h +++ b/widget/gonk/libdisplay/GonkDisplayJB.h @@ -19,6 +19,7 @@ #include "GonkDisplay.h" #include "FramebufferSurface.h" #include "hardware/hwcomposer.h" +#include "hardware/power.h" #include "utils/RefBase.h" namespace mozilla { @@ -49,6 +50,7 @@ private: hw_module_t const* mFBModule; hwc_composer_device_1_t* mHwc; framebuffer_device_t* mFBDevice; + power_module_t* mPowerModule; android::sp mFBSurface; android::sp mSTClient; android::sp mAlloc; From ce066e521ad5f0a6c82bc975b0478a624de237ee Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Tue, 9 Jul 2013 16:27:58 -0400 Subject: [PATCH 23/42] Bug 888552 - Use SET ps command to configure power save mode, r=vchang --- dom/wifi/WifiWorker.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index 6426523e40af..f020e73e6ea1 100644 --- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -507,10 +507,14 @@ var WifiManager = (function() { }); } - function setPowerModeCommand(mode, callback) { + function setPowerModeCommandICS(mode, callback) { doBooleanCommand("DRIVER POWERMODE " + (mode === "AUTO" ? 0 : 1), "OK", callback); } + function setPowerModeCommandJB(mode, callback) { + doBooleanCommand("SET ps " + (mode === "AUTO" ? 1 : 0), "OK", callback); + } + function getPowerModeCommand(callback) { doStringCommand("DRIVER GETPOWER", function(reply) { if (reply) @@ -1508,7 +1512,9 @@ var WifiManager = (function() { manager.wpsPbc = wpsPbcCommand; manager.wpsPin = wpsPinCommand; manager.wpsCancel = wpsCancelCommand; - manager.setPowerMode = setPowerModeCommand; + manager.setPowerMode = (sdkVersion >= 16) + ? setPowerModeCommandJB + : setPowerModeCommandICS; manager.setSuspendOptimizations = setSuspendOptimizationsCommand; manager.setStaticIpMode = setStaticIpMode; manager.getRssiApprox = getRssiApproxCommand; From 485b8bde11971e306f542fb7b3734db31e4efeaa Mon Sep 17 00:00:00 2001 From: JW Wang Date: Tue, 9 Jul 2013 14:37:47 +0800 Subject: [PATCH 24/42] Bug 865347 - Add functions to manipulate fake volumes to test SD card insert/remove. r=dhylands --- dom/ipc/ContentParent.cpp | 32 +++++++++++++++++++ dom/ipc/ContentParent.h | 4 +++ dom/ipc/PContent.ipdl | 4 +++ dom/system/gonk/nsIVolume.idl | 5 ++- dom/system/gonk/nsIVolumeService.idl | 6 +++- dom/system/gonk/nsVolume.cpp | 37 ++++++++++++++++++++- dom/system/gonk/nsVolume.h | 11 +++++-- dom/system/gonk/nsVolumeService.cpp | 48 ++++++++++++++++++++++++++-- dom/system/gonk/nsVolumeService.h | 2 +- 9 files changed, 141 insertions(+), 8 deletions(-) diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 80ee26ea184c..a30583240720 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -2572,5 +2572,37 @@ ContentParent::RecvSystemMessageHandled() return true; } +bool +ContentParent::RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) +{ +#ifdef MOZ_WIDGET_GONK + nsresult rv; + nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); + if (vs) { + vs->CreateFakeVolume(fsName, mountPoint); + } + return true; +#else + NS_WARNING("ContentParent::RecvCreateFakeVolume shouldn't be called when MOZ_WIDGET_GONK is not defined"); + return false; +#endif +} + +bool +ContentParent::RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) +{ +#ifdef MOZ_WIDGET_GONK + nsresult rv; + nsCOMPtr vs = do_GetService(NS_VOLUMESERVICE_CONTRACTID, &rv); + if (vs) { + vs->SetFakeVolumeState(fsName, fsState); + } + return true; +#else + NS_WARNING("ContentParent::RecvSetFakeVolumeState shouldn't be called when MOZ_WIDGET_GONK is not defined"); + return false; +#endif +} + } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index ee5d43abd256..abdaa21c3b74 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -416,6 +416,10 @@ private: virtual bool RecvSystemMessageHandled() MOZ_OVERRIDE; + virtual bool RecvCreateFakeVolume(const nsString& fsName, const nsString& mountPoint) MOZ_OVERRIDE; + + virtual bool RecvSetFakeVolumeState(const nsString& fsName, const int32_t& fsState) MOZ_OVERRIDE; + virtual void ProcessingError(Result what) MOZ_OVERRIDE; GeckoChildProcessHost* mSubprocess; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 788424509b1f..01a3566c3e78 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -515,6 +515,10 @@ parent: // Notify the parent that the child has finished handling a system message. async SystemMessageHandled(); + // called by the child (test code only) to propagate volume changes to the parent + async CreateFakeVolume(nsString fsName, nsString mountPoint); + async SetFakeVolumeState(nsString fsName, int32_t fsState); + both: AsyncMessage(nsString aMessage, ClonedMessageData aData); }; diff --git a/dom/system/gonk/nsIVolume.idl b/dom/system/gonk/nsIVolume.idl index f413189f1681..c7170fbb04ba 100644 --- a/dom/system/gonk/nsIVolume.idl +++ b/dom/system/gonk/nsIVolume.idl @@ -5,7 +5,7 @@ #include "nsISupports.idl" #include "nsIVolumeStat.idl" -[scriptable, uuid(1134f267-7b81-42f2-b64a-6edb91286576)] +[scriptable, uuid(4b5bd562-bd05-4658-ab0f-f668a9e25fb5)] interface nsIVolume : nsISupports { // These MUST match the states from android's system/vold/Volume.h header @@ -49,6 +49,9 @@ interface nsIVolume : nsISupports readonly attribute boolean isMountLocked; nsIVolumeStat getStats(); + + // Whether this is a fake volume. + readonly attribute boolean isFake; }; %{C++ diff --git a/dom/system/gonk/nsIVolumeService.idl b/dom/system/gonk/nsIVolumeService.idl index bf943d14482b..33a3f4636857 100644 --- a/dom/system/gonk/nsIVolumeService.idl +++ b/dom/system/gonk/nsIVolumeService.idl @@ -12,7 +12,7 @@ %} [ref] native nsStringTArrayRef(nsTArray); -[scriptable, uuid(7c179fb7-67a0-43a3-9337-294e0360b858)] +[scriptable, uuid(a3b110cd-74f2-43cb-84c6-2a87713f2774)] interface nsIVolumeService : nsISupports { nsIVolume getVolumeByName(in DOMString volName); @@ -24,6 +24,10 @@ interface nsIVolumeService : nsISupports nsIVolumeMountLock createMountLock(in DOMString volName); [noscript] void getVolumeNames(in nsStringTArrayRef aVolNames); + + /* for test case only to simulate sdcard insertion/removal */ + void createFakeVolume(in DOMString name, in DOMString path); + void SetFakeVolumeState(in DOMString name, in long state); }; %{C++ diff --git a/dom/system/gonk/nsVolume.cpp b/dom/system/gonk/nsVolume.cpp index 58c3a51ace74..e1318a6b49e4 100644 --- a/dom/system/gonk/nsVolume.cpp +++ b/dom/system/gonk/nsVolume.cpp @@ -50,7 +50,8 @@ nsVolume::nsVolume(const Volume* aVolume) mMountPoint(NS_ConvertUTF8toUTF16(aVolume->MountPoint())), mState(aVolume->State()), mMountGeneration(aVolume->MountGeneration()), - mMountLocked(aVolume->IsMountLocked()) + mMountLocked(aVolume->IsMountLocked()), + mIsFake(false) { } @@ -85,6 +86,13 @@ bool nsVolume::Equals(nsIVolume* aVolume) if (mMountLocked != volIsMountLocked) { return false; } + + bool isFake; + aVolume->GetIsFake(&isFake); + if (mIsFake != isFake) { + return false; + } + return true; } @@ -136,6 +144,12 @@ NS_IMETHODIMP nsVolume::GetStats(nsIVolumeStat **aResult) return NS_OK; } +NS_IMETHODIMP nsVolume::GetIsFake(bool *aIsFake) +{ + *aIsFake = mIsFake; + return NS_OK; +} + void nsVolume::LogState() const { @@ -156,6 +170,7 @@ void nsVolume::Set(nsIVolume* aVolume) aVolume->GetName(mName); aVolume->GetMountPoint(mMountPoint); aVolume->GetState(&mState); + aVolume->GetIsFake(&mIsFake); int32_t volMountGeneration; aVolume->GetMountGeneration(&volMountGeneration); @@ -222,5 +237,25 @@ nsVolume::UpdateMountLock(bool aMountLocked) MountGeneration(), aMountLocked)); } +void +nsVolume::SetState(int32_t aState) +{ + static int32_t sMountGeneration = 0; + + MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default); + MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(IsFake()); + + if (aState == mState) { + return; + } + + if (aState == nsIVolume::STATE_MOUNTED) { + mMountGeneration = ++sMountGeneration; + } + + mState = aState; +} + } // system } // mozilla diff --git a/dom/system/gonk/nsVolume.h b/dom/system/gonk/nsVolume.h index 3d04f7932e9b..61bdd3479cb4 100644 --- a/dom/system/gonk/nsVolume.h +++ b/dom/system/gonk/nsVolume.h @@ -32,7 +32,8 @@ public: mMountPoint(aMountPoint), mState(aState), mMountGeneration(aMountGeneration), - mMountLocked(false) + mMountLocked(false), + mIsFake(false) { } @@ -42,7 +43,8 @@ public: : mName(aName), mState(STATE_INIT), mMountGeneration(-1), - mMountLocked(true) // Needs to agree with Volume::Volume + mMountLocked(true), // Needs to agree with Volume::Volume + mIsFake(false) { } @@ -72,11 +74,16 @@ private: void UpdateMountLock(const nsAString& aMountLockState); void UpdateMountLock(bool aMountLocked); + bool IsFake() const { return mIsFake; } + void SetIsFake(bool aIsFake) { mIsFake = aIsFake; } + void SetState(int32_t aState); + nsString mName; nsString mMountPoint; int32_t mState; int32_t mMountGeneration; bool mMountLocked; + bool mIsFake; }; } // system diff --git a/dom/system/gonk/nsVolumeService.cpp b/dom/system/gonk/nsVolumeService.cpp index 7e43dafb0cb3..39606c3700ba 100644 --- a/dom/system/gonk/nsVolumeService.cpp +++ b/dom/system/gonk/nsVolumeService.cpp @@ -326,7 +326,7 @@ nsVolumeService::FindVolumeByName(const nsAString& aName) //static already_AddRefed -nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName) +nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake /*= false*/) { MonitorAutoLock autoLock(mArrayMonitor); @@ -337,6 +337,7 @@ nsVolumeService::CreateOrFindVolumeByName(const nsAString& aName) } // Volume not found - add a new one vol = new nsVolume(aName); + vol->SetIsFake(aIsFake); mVolumeArray.AppendElement(vol); return vol.forget(); } @@ -348,11 +349,19 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) nsString volName; aVolume->GetName(volName); - nsRefPtr vol = CreateOrFindVolumeByName(volName); + bool aIsFake; + aVolume->GetIsFake(&aIsFake); + nsRefPtr vol = CreateOrFindVolumeByName(volName, aIsFake); if (vol->Equals(aVolume)) { // Nothing has really changed. Don't bother telling anybody. return; } + + if (!vol->IsFake() && aIsFake) { + // Prevent an incoming fake volume from overriding an existing real volume. + return; + } + vol->Set(aVolume); nsCOMPtr obs = GetObserverService(); if (!obs) { @@ -362,6 +371,41 @@ nsVolumeService::UpdateVolume(nsIVolume* aVolume) obs->NotifyObservers(vol, NS_VOLUME_STATE_CHANGED, stateStr.get()); } +NS_IMETHODIMP +nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path) +{ + if (XRE_GetProcessType() == GeckoProcessType_Default) { + nsRefPtr vol = new nsVolume(name, path, nsIVolume::STATE_INIT, -1); + vol->SetIsFake(true); + UpdateVolume(vol.get()); + return NS_OK; + } + + ContentChild::GetSingleton()->SendCreateFakeVolume(nsString(name), nsString(path)); + return NS_OK; +} + +NS_IMETHODIMP +nsVolumeService::SetFakeVolumeState(const nsAString& name, int32_t state) +{ + if (XRE_GetProcessType() == GeckoProcessType_Default) { + nsRefPtr vol; + { + MonitorAutoLock autoLock(mArrayMonitor); + vol = FindVolumeByName(name); + } + if (!vol || !vol->IsFake()) { + return NS_ERROR_NOT_AVAILABLE; + } + vol->SetState(state); + UpdateVolume(vol.get()); + return NS_OK; + } + + ContentChild::GetSingleton()->SendSetFakeVolumeState(nsString(name), state); + return NS_OK; +} + /*************************************************************************** * The UpdateVolumeRunnable creates an nsVolume and updates the main thread * data structure while running on the main thread. diff --git a/dom/system/gonk/nsVolumeService.h b/dom/system/gonk/nsVolumeService.h index 34eb710cf0a0..e537d99dd75e 100644 --- a/dom/system/gonk/nsVolumeService.h +++ b/dom/system/gonk/nsVolumeService.h @@ -50,7 +50,7 @@ private: const nsAString& aMountLockState); already_AddRefed FindVolumeByMountLockName(const nsAString& aMountLockName); already_AddRefed FindVolumeByName(const nsAString& aName); - already_AddRefed CreateOrFindVolumeByName(const nsAString& aName); + already_AddRefed CreateOrFindVolumeByName(const nsAString& aName, bool aIsFake = false); Monitor mArrayMonitor; nsVolume::Array mVolumeArray; From 7b388cd25816fd6e9bc92eee48a0008db48e6485 Mon Sep 17 00:00:00 2001 From: JW Wang Date: Thu, 4 Jul 2013 14:47:26 +0800 Subject: [PATCH 25/42] Bug 865347 - Add a test case to test new functions. r=dhylands --- dom/system/gonk/tests/marionette/manifest.ini | 1 + .../gonk/tests/marionette/test_fakevolume.js | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 dom/system/gonk/tests/marionette/test_fakevolume.js diff --git a/dom/system/gonk/tests/marionette/manifest.ini b/dom/system/gonk/tests/marionette/manifest.ini index 0499a55955ed..a0a50c70bc93 100644 --- a/dom/system/gonk/tests/marionette/manifest.ini +++ b/dom/system/gonk/tests/marionette/manifest.ini @@ -6,3 +6,4 @@ qemu = true [test_geolocation.js] disabled = Bug 808783 [test_get_voicemailInfo.js] +[test_fakevolume.js] diff --git a/dom/system/gonk/tests/marionette/test_fakevolume.js b/dom/system/gonk/tests/marionette/test_fakevolume.js new file mode 100644 index 000000000000..5ac84d92ab24 --- /dev/null +++ b/dom/system/gonk/tests/marionette/test_fakevolume.js @@ -0,0 +1,29 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +MARIONETTE_TIMEOUT = 10000; + +let Cc = SpecialPowers.Cc; +let Ci = SpecialPowers.Ci; + +let volumeService = Cc["@mozilla.org/telephony/volume-service;1"].getService(Ci.nsIVolumeService); +ok(volumeService, "Should have volume service"); + +let volName = "fake"; +let mountPoint = "/data/fake/storage"; +volumeService.createFakeVolume(volName, mountPoint); + +let vol = volumeService.getVolumeByName(volName); +ok(vol, "volume shouldn't be null"); + +is(volName, vol.name, "name"); +is(mountPoint, vol.mountPoint, "moutnPoint"); +is(Ci.nsIVolume.STATE_INIT, vol.state, "state"); + + +let oldMountGen = vol.mountGeneration; +volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED); +is(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state"); +ok(vol.mountGeneration > oldMountGen, "mount generation should be incremented"); + +finish(); From 95626afa92ec3e81fe19cd4634e709e425909af9 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 9 Jul 2013 16:54:29 -0400 Subject: [PATCH 26/42] Backed out changeset c881d9e4a406 (bug 889602) because maybe THIS is the one causing the Marionette timeouts. --- b2g/components/DirectoryProvider.js | 7 ------- testing/mochitest/b2g.json | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/b2g/components/DirectoryProvider.js b/b2g/components/DirectoryProvider.js index 1e4167666d6e..866dae3fdcec 100644 --- a/b2g/components/DirectoryProvider.js +++ b/b2g/components/DirectoryProvider.js @@ -61,13 +61,6 @@ DirectoryProvider.prototype = { persistent.value = true; return file; } - if (prop == "ProfD") { - let file = Cc["@mozilla.org/file/local;1"] - .createInstance(Ci.nsILocalFile); - file.initWithPath(LOCAL_DIR+"/tests/profile"); - persistent.value = true; - return file; - } if (prop == "coreAppsDir") { let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile) file.initWithPath("/system/b2g"); diff --git a/testing/mochitest/b2g.json b/testing/mochitest/b2g.json index 1ae13a353c05..4363d7a9f0b9 100644 --- a/testing/mochitest/b2g.json +++ b/testing/mochitest/b2g.json @@ -53,6 +53,10 @@ "content/events/test/test_continuous_wheel_events.html":"", "content/events/test/test_dom_wheel_event.html":"", "content/html/content/test/forms/test_input_file_picker.html":"", + "content/html/content/test/forms/test_max_attribute.html":"", + "content/html/content/test/forms/test_min_attribute.html":"", + "content/html/content/test/forms/test_required_attribute.html":"", + "content/html/content/test/forms/test_step_attribute.html":"", "content/html/content/test/forms/test_validation.html":"", "content/html/content/test/test_bug209275.xhtml":"", "content/html/content/test/test_bug430351.html":"", @@ -60,6 +64,8 @@ "content/html/content/test/test_bug481335.xhtml":"", "content/html/content/test/test_bug523771.html":"", "content/html/content/test/test_bug561636.html":"", + "content/html/content/test/test_bug590353-2.html":"", + "content/html/content/test/test_bug598643.html":"", "content/html/content/test/test_bug612730.html":"", "content/html/content/test/test_bug613113.html":"", "content/html/content/test/test_bug615833.html":"", @@ -96,6 +102,7 @@ "content/base/test/test_bug166235.html":"", "content/base/test/test_bug326337.html":"", "content/base/test/test_bug330925.xhtml":"", + "content/base/test/test_bug403852.html":"", "content/base/test/test_bug419527.xhtml":"", "content/base/test/test_bug422403-1.html":"", "content/base/test/test_bug422537.html":"", @@ -115,6 +122,7 @@ "content/base/test/test_child_process_shutdown_message.html":"", "content/base/test/test_copypaste.html":"", "content/base/test/test_csp_redirects.html":"", + "content/base/test/test_fileapi.html":"", "content/base/test/test_fileapi_slice.html":"", "content/base/test/test_messagemanager_assertpermission.html":"", "content/base/test/test_mixed_content_blocker.html":"", From 5e2805d3fd19782286ec4780f568809d77658de5 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 14:45:22 -0700 Subject: [PATCH 27/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/bf01d5808391 Author: Andrew Sutherland Desc: Merge pull request #10872 from asutherland/bug_852369 Bug 852369 - [Email] Support multiple email addresses in mailto links. r=asuth ======== https://hg.mozilla.org/integration/gaia-central/rev/c8788891b795 Author: Mihai Cirlanaru Desc: Bug 852369 - [Email] Support multiple email addresses in mailto links. r=asuth --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 2414aeb2a1db..b7b5c4840979 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "7cb565d70183bd3101237cd04972c70981dce655", + "revision": "bf01d5808391455a4b7d27ff6da58edb07221b78", "repo_path": "/integration/gaia-central" } From 0270d607b299a8cc1a988969604b8c5d68375bb9 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 15:05:23 -0700 Subject: [PATCH 28/42] Bumping gaia.json for 1 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/f4a5fe836729 Author: Donovan Preston Desc: bug 887454 Remove useragent override for youtube.com --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b7b5c4840979..334ca30da0bf 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "bf01d5808391455a4b7d27ff6da58edb07221b78", + "revision": "f4a5fe83672928fb89e14b51ae576503fa658f9f", "repo_path": "/integration/gaia-central" } From 354e73853f34b769f14912b0b6a9106cfbd280fc Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 15:40:29 -0700 Subject: [PATCH 29/42] Bumping gaia.json for 2 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/e079b44a5b2c Author: Mihai Cîrlănaru Desc: Merge pull request #10801 from mcirlanaru/bug_889771 Bug 889771 - Fix width of SIM PIN input box. r=@fabi1cazenave ======== https://hg.mozilla.org/integration/gaia-central/rev/ede8d13d004c Author: Mihai Cirlanaru Desc: Bug 889771 - Fix width of SIM PIN input box. r=kaze --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 334ca30da0bf..e382d103ffeb 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "f4a5fe83672928fb89e14b51ae576503fa658f9f", + "revision": "e079b44a5b2ca0dea9b812870fa2497f44fbf976", "repo_path": "/integration/gaia-central" } From 46a88c33cd3d2cad9afc886dee80c370754c82ec Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 16:00:25 -0700 Subject: [PATCH 30/42] Bumping gaia.json for 3 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/3d290c631b11 Author: Donovan Preston Desc: Merge pull request #10874 from KevinGrandon/revert_bug_887454 Revert "bug 887454 Remove useragent override for youtube.com" r=fzzzy ======== https://hg.mozilla.org/integration/gaia-central/rev/5fbf6ae01b16 Author: Kevin Grandon Desc: Revert "bug 887454 Remove useragent override for youtube.com" This reverts commit 5b5f6d8ecce794323b52daf626cee98dd7b6992e. ======== https://hg.mozilla.org/integration/gaia-central/rev/05a4bc51ae6c Author: Kevin Grandon Desc: Merge pull request #10873 from asutherland/bug_852369 Bug 852369 - [Email] Support multiple email addresses in mailto links. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e382d103ffeb..042c8e46ed82 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "e079b44a5b2ca0dea9b812870fa2497f44fbf976", + "revision": "3d290c631b118aacb213d80425eedae543ab3113", "repo_path": "/integration/gaia-central" } From 0e0287889199bb9d6e6be42eb59012d9a66f9a6b Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 18:05:23 -0700 Subject: [PATCH 31/42] Bumping gaia.json for 2 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/364607a1d732 Author: Mihai Cîrlănaru Desc: Merge pull request #10875 from mcirlanaru/bug_853313 Bug 853313 - [Email] Properly parse 'mailto' links that don't... r=@asutherland ======== https://hg.mozilla.org/integration/gaia-central/rev/61c6f27e1ff9 Author: Mihai Cirlanaru Desc: Bug 853313 - [Email] Properly parse 'mailto' links that don't have a 'to' address. r=asuth --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 042c8e46ed82..83a311f1af42 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "3d290c631b118aacb213d80425eedae543ab3113", + "revision": "364607a1d732c8ec25f0758c00b4becf0048f13d", "repo_path": "/integration/gaia-central" } From a5a7a0bb5035753a974354c346a712041788c254 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 19:55:23 -0700 Subject: [PATCH 32/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/87bfcb576b65 Author: Rudy Lu Desc: Merge pull request #10669 from RudyLu/keyboard/swipe_hide_keyboard_2 Bug 805586 - support "Swipe down" to hide the keyboard ======== https://hg.mozilla.org/integration/gaia-central/rev/415cba41ef6c Author: Rudy Lu Desc: Bug 805586 - support "Swipe down" to hide the keyboard 1. Add the dialog for FTU tip of swipe down 2. Refine the swipe down behavior not to show the highlighted key --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 83a311f1af42..781b3e40602b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "364607a1d732c8ec25f0758c00b4becf0048f13d", + "revision": "87bfcb576b65c5c6f60214f066df7fb0a726e4b6", "repo_path": "/integration/gaia-central" } From 52d41f000d78391537f1ec6dcb0d3bec7d10bd6c Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Wed, 10 Jul 2013 11:47:31 +0800 Subject: [PATCH 33/42] Bug 850529 - MobileMessage: return an empty array if no attachments in a MmsMessage. r=gene --- dom/mobilemessage/src/MmsMessage.cpp | 6 - .../tests/marionette/manifest.ini | 1 + .../marionette/test_mmsmessage_attachments.js | 121 ++++++++++++++++++ 3 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 dom/mobilemessage/tests/marionette/test_mmsmessage_attachments.js diff --git a/dom/mobilemessage/src/MmsMessage.cpp b/dom/mobilemessage/src/MmsMessage.cpp index d76f21455bad..868da60a47ba 100644 --- a/dom/mobilemessage/src/MmsMessage.cpp +++ b/dom/mobilemessage/src/MmsMessage.cpp @@ -473,13 +473,7 @@ MmsMessage::GetSmil(nsAString& aSmil) NS_IMETHODIMP MmsMessage::GetAttachments(JSContext* aCx, JS::Value* aAttachments) { - // TODO Bug 850529 We should return an empty array (or null) - // when it has no attachments? Need to further check this. uint32_t length = mAttachments.Length(); - if (length == 0) { - *aAttachments = JSVAL_NULL; - return NS_OK; - } JS::Rooted attachments(aCx, JS_NewArrayObject(aCx, length, nullptr)); NS_ENSURE_TRUE(attachments, NS_ERROR_OUT_OF_MEMORY); diff --git a/dom/mobilemessage/tests/marionette/manifest.ini b/dom/mobilemessage/tests/marionette/manifest.ini index 29f6a64ab721..af4ca41e19c7 100644 --- a/dom/mobilemessage/tests/marionette/manifest.ini +++ b/dom/mobilemessage/tests/marionette/manifest.ini @@ -34,3 +34,4 @@ qemu = true [test_massive_incoming_delete.js] [test_getsegmentinfofortext.js] [test_phone_number_normalization.js] +[test_mmsmessage_attachments.js] diff --git a/dom/mobilemessage/tests/marionette/test_mmsmessage_attachments.js b/dom/mobilemessage/tests/marionette/test_mmsmessage_attachments.js new file mode 100644 index 000000000000..3a9a8f878f34 --- /dev/null +++ b/dom/mobilemessage/tests/marionette/test_mmsmessage_attachments.js @@ -0,0 +1,121 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +MARIONETTE_TIMEOUT = 60000; + +const MMS_MAX_LENGTH_SUBJECT = 40; + +SpecialPowers.addPermission("sms", true, document); +SpecialPowers.setBoolPref("dom.sms.enabled", true); + +let tasks = { + // List of test fuctions. Each of them should call |tasks.next()| when + // completed or |tasks.finish()| to jump to the last one. + _tasks: [], + _nextTaskIndex: 0, + + push: function push(func) { + this._tasks.push(func); + }, + + next: function next() { + let index = this._nextTaskIndex++; + let task = this._tasks[index]; + try { + task(); + } catch (ex) { + ok(false, "test task[" + index + "] throws: " + ex); + // Run last task as clean up if possible. + if (index != this._tasks.length - 1) { + this.finish(); + } + } + }, + + finish: function finish() { + this._tasks[this._tasks.length - 1](); + }, + + run: function run() { + this.next(); + } +}; + +let mozMobileMessage; + +function getAllMessages(callback, filter, reverse) { + if (!filter) { + filter = new MozSmsFilter; + } + let messages = []; + let request = mozMobileMessage.getMessages(filter, reverse || false); + request.onsuccess = function(event) { + if (request.result) { + messages.push(request.result); + request.continue(); + return; + } + + window.setTimeout(callback.bind(null, messages), 0); + } +} + +function deleteAllMessages() { + getAllMessages(function deleteAll(messages) { + let message = messages.shift(); + if (!message) { + ok(true, "all messages deleted"); + tasks.next(); + return; + } + + let request = mozMobileMessage.delete(message.id); + request.onsuccess = deleteAll.bind(null, messages); + request.onerror = function (event) { + ok(false, "failed to delete all messages"); + tasks.finish(); + } + }); +} + +tasks.push(function () { + log("Verifying initial state."); + + mozMobileMessage = window.navigator.mozMobileMessage; + ok(mozMobileMessage instanceof MozMobileMessageManager); + + tasks.next(); +}); + +tasks.push(function () { + log("MmsMessage.attachments should be an empty array."); + + mozMobileMessage.onfailed = function (event) { + mozMobileMessage.onfailed = null; + + let message = event.message; + ok(Array.isArray(message.attachments) && message.attachments.length === 0, + "message.attachments should be an empty array."); + + tasks.next(); + }; + + // Have a long long subject causes the send fails, so we don't need + // networking here. + mozMobileMessage.sendMMS({ + subject: new Array(MMS_MAX_LENGTH_SUBJECT + 2).join("a"), + receivers: ["1", "2"], + attachments: [], + }); +}); + +tasks.push(deleteAllMessages); + +// WARNING: All tasks should be pushed before this!!! +tasks.push(function cleanUp() { + SpecialPowers.removePermission("sms", document); + SpecialPowers.clearUserPref("dom.sms.enabled"); + finish(); +}); + +tasks.run(); From 55c68c0cafcb9eb320207de1f55571ce8730e376 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 23:36:23 -0700 Subject: [PATCH 34/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/0a395a24388f Author: James Burke Desc: Merge pull request #10811 from jrburke/bug890572-email-initial-transparent Bug 890572 [email] set background transparent for smoother cold start r=asuth ======== https://hg.mozilla.org/integration/gaia-central/rev/d7ec8d7f8077 Author: jrburke Desc: Bug 890572 [email] set background transparent for smoother cold start --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 781b3e40602b..46069e774883 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "87bfcb576b65c5c6f60214f066df7fb0a726e4b6", + "revision": "0a395a24388f6c8606121a85ad1bf790ba1dc07d", "repo_path": "/integration/gaia-central" } From 37ad663b3da23987a49ae19b2285754b22c38307 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Tue, 9 Jul 2013 23:50:23 -0700 Subject: [PATCH 35/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/f48f21472127 Author: James Burke Desc: Merge pull request #10876 from jrburke/bug891728-image-attach-module Bug 891728 [email] dynamic require of shared/mime_mapper fails due to rel-path r=asuth ======== https://hg.mozilla.org/integration/gaia-central/rev/541dda1c48c7 Author: jrburke Desc: Bug 891728 [email] dynamic require of shared/mime_mapper fails due to rel-path --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 46069e774883..7fd8d9851ae4 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "0a395a24388f6c8606121a85ad1bf790ba1dc07d", + "revision": "f48f21472127abdbabf617841cb1bdaa448dddc8", "repo_path": "/integration/gaia-central" } From 205f6d064b5de06a4110a8fe279b3b1442ec0acb Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 02:00:22 -0700 Subject: [PATCH 36/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/6256a30275b9 Author: Rex KM Lee Desc: Merge pull request #10878 from rexboy7/fix-bug891408 Bug 891408 - [System] Calculate inline app size correctly (regression) ======== https://hg.mozilla.org/integration/gaia-central/rev/3ad1b19036ee Author: Rex Lee Desc: Bug 891408 - [System] Calculate inline app size correctly (regression) --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 7fd8d9851ae4..c48611926bff 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "f48f21472127abdbabf617841cb1bdaa448dddc8", + "revision": "6256a30275b91614bc4a641111c9dfc6f7dbc876", "repo_path": "/integration/gaia-central" } From 2e7306d6e4cb86e158ea3230eda724ccd1d620c8 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 03:20:22 -0700 Subject: [PATCH 37/42] Bumping gaia.json for 6 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/65084cc1f901 Author: George Desc: Merge pull request #10884 from cctuan/system-1.5x Bug 881157 - hdpi/xhdpi resolution assets and layout for System app ======== https://hg.mozilla.org/integration/gaia-central/rev/825028166040 Author: cctuan Desc: Bug 881157 - hdpi/xhdpi resolution assets and layout for System app ======== https://hg.mozilla.org/integration/gaia-central/rev/d54be8a49829 Author: Fernando Jiménez Moreno Desc: Merge pull request #10681 from leob2g/Bug_886668_user_cannot_scroll_in_mmi_screen Bug 886668 - User cannot scroll in mmi screen. r=rik ======== https://hg.mozilla.org/integration/gaia-central/rev/29522d5e544f Author: sungwoo.yoon Desc: Bug 886668 - User cannot scroll in mmi screen ======== https://hg.mozilla.org/integration/gaia-central/rev/d66534bbe4e4 Author: Francisco Borja Salguero Castellano Desc: Merge pull request #10842 from borjasalguero/uk_context_menu Bug 888241 - [B2G][Leo][SMS] Long tapping on a valid phone number or em... ======== https://hg.mozilla.org/integration/gaia-central/rev/eba5c59c8de2 Author: borjasalguero Desc: Bug 888241 - [B2G][Leo][SMS] Long tapping on a valid phone number or email, included in a SMS thread, if it overlaps an option of the dialog menu, it opens it directly r=julienw --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c48611926bff..9151b2a5bc11 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "6256a30275b91614bc4a641111c9dfc6f7dbc876", + "revision": "65084cc1f9017469c15ed1bd40a72f46aa979031", "repo_path": "/integration/gaia-central" } From d57139f5ed42e044c3fc8cb60397c8be222f245a Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 03:30:22 -0700 Subject: [PATCH 38/42] Bumping gaia.json for 4 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/e30c84c7edf4 Author: mozshiao9 Desc: Merge pull request #10887 from mozshiao9/master_contacts_881140 Bug 881140 - hdpi/xhdpi resolution assets and layout for Contacts app ======== https://hg.mozilla.org/integration/gaia-central/rev/d76382ea4e27 Author: Mark Shiao Desc: Bug 881140 - hdpi/xhdpi resolution assets and layout for Contacts app ======== https://hg.mozilla.org/integration/gaia-central/rev/a092f04029d6 Author: Cristian Rodriguez Desc: Merge pull request #10883 from crdlc/bug-891781 Bug 891781 - [Facebook] Delete all friends and add some one is broken ======== https://hg.mozilla.org/integration/gaia-central/rev/c718ca1beac1 Author: crdlc Desc: Bug 891781 - [Facebook] Delete all friends and add some one is broken --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9151b2a5bc11..5898627f805c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "65084cc1f9017469c15ed1bd40a72f46aa979031", + "revision": "e30c84c7edf4722ca415eaba553340629c2d5896", "repo_path": "/integration/gaia-central" } From a0791d56e0a14bbf236bfb624a60555335d42e1f Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 04:15:24 -0700 Subject: [PATCH 39/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/215f677d5bd1 Author: Francisco Borja Salguero Castellano Desc: Merge pull request #10886 from arcturus/bug-885981 Bug 885981 - [SMS] The device does not recognize that the SMS received from a saved contact ======== https://hg.mozilla.org/integration/gaia-central/rev/7f91c5f7febc Author: Francisco Jordano Desc: Bug 885981 - [SMS] The device does not recognize that the SMS received from a saved contact --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5898627f805c..675038bbdd7e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "e30c84c7edf4722ca415eaba553340629c2d5896", + "revision": "215f677d5bd1bbe676949ff594861530fe0e3a18", "repo_path": "/integration/gaia-central" } From dd4bd8d8f88540a3abd3cad884dfca1fd8117161 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 05:10:23 -0700 Subject: [PATCH 40/42] Bumping gaia.json for 4 gaia-central revision(s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/124a4b38bb9f Author: Germán Toro del Valle Desc: Merge pull request #10456 from gtorodelvalle/dialer-bug-883756-contact-details-from-call-log Bug 883756 - [Call log] Tapping on an entry from a contact does not take to that contact's detail view screen but to a different one (r=arcturus) ======== https://hg.mozilla.org/integration/gaia-central/rev/b6fd2ae4b6a7 Author: Germán Toro del Valle Desc: Bug 883756 - [Call log] Tapping on an entry from a contact does not take to that contact's detail view screen but to a different one. ======== https://hg.mozilla.org/integration/gaia-central/rev/3cd291d23155 Author: Alive.Kuo Desc: Merge pull request #10888 from alivedise/bugzilla/891799/type-error-resize Bug 891799 - Fix TypeError: runningApps[displayedApp] is undefined, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/550ed8c0c3f2 Author: Alive Kuo Desc: Bug 891799 - Fix TypeError: runningApps[displayedApp] is undefined --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 675038bbdd7e..e1dbce2715b4 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "215f677d5bd1bbe676949ff594861530fe0e3a18", + "revision": "124a4b38bb9f78855b324d174dc684fb43e5fa73", "repo_path": "/integration/gaia-central" } From 2b5ce66456eccdcc6318f4d05ac9983b6fe64f6d Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 05:35:23 -0700 Subject: [PATCH 41/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/de133ead8cfb Author: Cristian Rodriguez Desc: Merge pull request #10862 from crdlc/bug-890815 Bug 890815 - Common importers need to support cancelling (Facebook, Gmail,...) ======== https://hg.mozilla.org/integration/gaia-central/rev/b6e9bf38815c Author: crdlc Desc: Bug 890815 - Common importers need to support cancelling (Facebook, Gmail,...) --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e1dbce2715b4..5f4548ab6fce 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "124a4b38bb9f78855b324d174dc684fb43e5fa73", + "revision": "de133ead8cfbdc16969e3e12305a32a04708ecb6", "repo_path": "/integration/gaia-central" } From e70824e7f599f0bdad0e1945395b95ab37fcb966 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 10 Jul 2013 05:45:23 -0700 Subject: [PATCH 42/42] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/5e60cb6fc0e0 Author: Cristian Rodriguez Desc: Merge pull request #10795 from crdlc/bug-890183 Bug 890183 - [Homescreen] Wrong focus is shown ======== https://hg.mozilla.org/integration/gaia-central/rev/70447e934d7e Author: crdlc Desc: Bug 890183 - [Homescreen] Wrong focus is shown --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5f4548ab6fce..730bb3d9687e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "de133ead8cfbdc16969e3e12305a32a04708ecb6", + "revision": "5e60cb6fc0e09cefe242a6fb0159fbd09360cc1a", "repo_path": "/integration/gaia-central" }