update_engine: Fix failing unittests on ARM
A few of the unittests fail when running on ARM. Android has already
fixed those problems and protected them with __ANDROID__. We can just
start using them in Chrome OS too.
BUG=b:165005216
TEST=FEATURES=test emerge-gale update_engine
Change-Id: I7f8820c2ba81f23144257d78aa6c0c599f645e6a
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2460235
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index bce0920..1599aac 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -458,10 +458,10 @@
// There's either more work to do or we are paused, so we just keep the
// file descriptors to watch up to date and exit, until we are done with the
// work and we are not paused.
-#ifdef __ANDROID__
- // When there's no base::SingleThreadTaskRunner on current thread, it's not
- // possible to watch file descriptors. Just poll it later. This usually
- // happens if brillo::FakeMessageLoop is used.
+ //
+ // When there's no |base::SingleThreadTaskRunner| on current thread, it's
+ // not possible to watch file descriptors. Just poll it later. This usually
+ // happens if |brillo::FakeMessageLoop| is used.
if (!base::ThreadTaskRunnerHandle::IsSet()) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
@@ -470,7 +470,6 @@
TimeDelta::FromSeconds(1));
return;
}
-#endif
SetupMessageLoopSources();
return;
}