libchromeos: Use MockMessageLoop on FakeStream.
The added MockMessageLoop is a mockable FakeMessageLoop. By default the
mock object will behave like a fake one, but it is also possible to set
expectations on the MessageLoop methods.
The MockMessageLoop now replaces the base::TaskRunner used in
FakeStream and runs the posted callbacks from the message loop instead
of running them when they are posted.
libweave is updated to create the FakeStream using a
chromeos::MessageLoop.
BUG=chromium:499886
TEST=FEATURES=test emerge-link libchromeos libweave buffet
Reviewed-on: https://chromium-review.googlesource.com/290632
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
(cherry-pick from
https://chromium.googlesource.com/chromiumos/platform2 at
78c174362c0ce8f75c53ab37da1874533eb1a56a)
Change-Id: Ie3407b9dfc5c821615c03e9fe37ddf11fcc82e9d
8 files changed
tree: 9914c9d1c6d541400e7f50f183f455fd2c532e1b
- libweave/