| Index: content/public/test/browser_test_utils.h
|
| diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
|
| index 3793c111e9576324556645af177e513727a7d430..411c4c79c36d8087bf05eafff9d114f5a2b8782c 100644
|
| --- a/content/public/test/browser_test_utils.h
|
| +++ b/content/public/test/browser_test_utils.h
|
| @@ -553,6 +553,32 @@ class InputMsgWatcher : public BrowserMessageFilter {
|
| DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher);
|
| };
|
|
|
| +// A proxy for ui::TestClipboard for use in browser tests. On Windows,
|
| +// clipboard is handled on the IO thread. BrowserTestClipboard
|
| +// hops messages onto the right thread.
|
| +class BrowserTestClipboard {
|
| + public:
|
| + BrowserTestClipboard();
|
| + ~BrowserTestClipboard();
|
| +
|
| + void SetUp();
|
| + void TearDown();
|
| +
|
| + // Puts text/rtf |rtf| on the clipboard.
|
| + void SetRtf(const std::string& rtf);
|
| +
|
| + // Puts plain text |text| on the clipboard.
|
| + void SetText(const std::string& text);
|
| +
|
| + private:
|
| + void RunTaskOnIOThreadAndWait(const base::Closure&);
|
| + void RunTask(const base::Closure& task, base::WaitableEvent* completion);
|
| +
|
| + bool is_installed_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BrowserTestClipboard);
|
| +};
|
| +
|
| } // namespace content
|
|
|
| #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
|
|
|