1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/run_loop.h" 6 #include "base/test/test_message_loop.h" 7 8 namespace base { 9 10 TestMessageLoop::TestMessageLoop() = default; 11 TestMessageLoop(MessageLoop::Type type)12TestMessageLoop::TestMessageLoop(MessageLoop::Type type) : loop_(type) {} 13 ~TestMessageLoop()14TestMessageLoop::~TestMessageLoop() { 15 RunLoop().RunUntilIdle(); 16 } 17 18 } // namespace base 19