| Index: components/bookmarks/browser/bookmark_utils_unittest.cc
|
| diff --git a/components/bookmarks/browser/bookmark_utils_unittest.cc b/components/bookmarks/browser/bookmark_utils_unittest.cc
|
| index f27676d8041dc392f055f221c33729b30bff869e..c37b16a35993cd980ab77e4a9f771821cec22463 100644
|
| --- a/components/bookmarks/browser/bookmark_utils_unittest.cc
|
| +++ b/components/bookmarks/browser/bookmark_utils_unittest.cc
|
| @@ -20,6 +20,15 @@
|
| #include "ui/base/clipboard/clipboard.h"
|
| #include "ui/base/clipboard/scoped_clipboard_writer.h"
|
|
|
| +#if defined(USE_GLIB) && defined(USE_X11)
|
| +
|
| +#include <memory>
|
| +
|
| +#include "ui/events/platform/x11/x11_event_source_glib.h" // nogncheck
|
| +#include "ui/gfx/x/x11_types.h" // nogncheck
|
| +
|
| +#endif // defined(USE_GLIB) && defined(USE_X11)
|
| +
|
| using base::ASCIIToUTF16;
|
| using std::string;
|
|
|
| @@ -30,8 +39,12 @@ class BookmarkUtilsTest : public testing::Test,
|
| public BaseBookmarkModelObserver {
|
| public:
|
| BookmarkUtilsTest()
|
| - : grouped_changes_beginning_count_(0),
|
| - grouped_changes_ended_count_(0) {}
|
| + : grouped_changes_beginning_count_(0), grouped_changes_ended_count_(0) {
|
| +#if defined(USE_GLIB) && defined(USE_X11)
|
| + event_source_.reset(new ui::X11EventSourceGlib(gfx::GetXDisplay()));
|
| +#endif // defined(USE_GLIB) && defined(USE_X11)
|
| + }
|
| +
|
| ~BookmarkUtilsTest() override {}
|
|
|
| // Copy and paste is not yet supported on iOS. http://crbug.com/228147
|
| @@ -73,6 +86,11 @@ class BookmarkUtilsTest : public testing::Test,
|
|
|
| // Clipboard requires a message loop.
|
| base::MessageLoopForUI loop_;
|
| +#if defined(USE_GLIB) && defined(USE_X11)
|
| + // On Linux, Clipboard also depends on an event source being present, to get
|
| + // the timestamp.
|
| + std::unique_ptr<ui::X11EventSourceGlib> event_source_;
|
| +#endif // defined(USE_GLIB) && defined(USE_X11)
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BookmarkUtilsTest);
|
| };
|
|
|