1 // Copyright (c) 2012 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.
6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop/message_loop.h"
8 #include "remoting/base/auto_thread_task_runner.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 void SetFlagTask(bool* success) {
21 TEST(AutoThreadTaskRunnerTest, StartAndStop) {
22 // Create a task runner.
23 base::MessageLoop message_loop;
24 scoped_refptr<AutoThreadTaskRunner> task_runner = new AutoThreadTaskRunner(
25 message_loop.message_loop_proxy(), base::MessageLoop::QuitClosure());
27 // Post a task to make sure it is executed.
29 message_loop.PostTask(FROM_HERE, base::Bind(&SetFlagTask, &success));
36 } // namespace remoting