1 // Copyright 2014 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.
5 #ifndef IOS_WEB_PUBLIC_TEST_TEST_WEB_THREAD_H_
6 #define IOS_WEB_PUBLIC_TEST_TEST_WEB_THREAD_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ios/web/public/web_thread.h"
18 class TestWebThreadImpl
;
20 // DEPRECATED: use TestWebThreadBundle instead.
21 // A WebThread for unit tests; this lets unit tests outside of web create
22 // WebThread instances.
25 explicit TestWebThread(WebThread::ID identifier
);
26 TestWebThread(WebThread::ID identifier
, base::MessageLoop
* message_loop
);
30 // Provides a subset of the capabilities of the Thread interface to enable
31 // certain unit tests. To avoid a stronger dependency of the internals of
32 // WebThread, do no provide the full Thread interface.
34 // Starts the thread with a generic message loop.
37 // Starts the thread with an IOThread message loop.
43 // Returns true if the thread is running.
47 scoped_ptr
<TestWebThreadImpl
> impl_
;
49 DISALLOW_COPY_AND_ASSIGN(TestWebThread
);
54 #endif // IOS_WEB_PUBLIC_TEST_TEST_WEB_THREAD_H_