[go: nahoru, domu]

Use ScopedTaskEnvironment instead of MessageLoopForUI in ui/aura/test/.

ScopedTaskEnvironment allows usage of ThreadTaskRunnerHandle and
base/task_scheduler/post_task.h within its scope. It should be
instantiated in everytest that uses either of these APIs
(i.e. no test should instantiate a MessageLoop directly).

Motivation for ScopedTaskEnvironment can be found in:
https://docs.google.com/document/d/1QabRo8c7D9LsYY3cEcaPQbOCLo8Tu-6VLykYXyl3Pkk/edit

TBR=sky@chromium.org
BUG=708584

Review-Url: https://codereview.chromium.org/2849423002
Cr-Commit-Position: refs/heads/master@{#468756}
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index a2de0b1c..76dd501d 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -276,6 +276,7 @@
     ":aura",
   ]
   deps = [
+    "//base/test:test_support",
     "//services/ui/public/interfaces",
     "//skia",
     "//testing/gtest",