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-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
78c174362c0ce8f75c53ab37da1874533eb1a56a)
Change-Id: I5b6952fc75e7300e9734e6f8f8103fe684584712
4 files changed