Chromium Code Reviews| Index: ui/base/clipboard/clipboard_test_template.h |
| diff --git a/ui/base/clipboard/clipboard_test_template.h b/ui/base/clipboard/clipboard_test_template.h |
| index b2deb2210824c99ede0cd03e186eb53b9881f168..6e0a9e978ffa5ed85e388beddc89bcd893c2c164 100644 |
| --- a/ui/base/clipboard/clipboard_test_template.h |
| +++ b/ui/base/clipboard/clipboard_test_template.h |
| @@ -56,7 +56,7 @@ class ClipboardTest : public PlatformTest { |
| public: |
| #if defined(USE_AURA) |
| ClipboardTest() |
| - : event_source_(PlatformEventSource::CreateDefault()), |
| + : event_source_(ClipboardTraits::GetEventSource()), |
| clipboard_(ClipboardTraits::Create()) {} |
| #else |
| ClipboardTest() : clipboard_(ClipboardTraits::Create()) {} |
| @@ -64,6 +64,8 @@ class ClipboardTest : public PlatformTest { |
| ~ClipboardTest() override { ClipboardTraits::Destroy(clipboard_); } |
| + bool IsMusTest() { return ClipboardTraits::IsMusTest(); } |
| + |
| protected: |
| Clipboard& clipboard() { return *clipboard_; } |
| @@ -86,6 +88,7 @@ class ClipboardTest : public PlatformTest { |
| // Hack for tests that need to call static methods of ClipboardTest. |
| struct NullClipboardTraits { |
| static Clipboard* Create() { return nullptr; } |
| + static bool IsMusTest() { return false; } |
| static void Destroy(Clipboard*) {} |
| }; |
| @@ -366,9 +369,11 @@ TYPED_TEST(ClipboardTest, URLTest) { |
| #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ |
| !defined(OS_CHROMEOS) |
| - ascii_text.clear(); |
| - this->clipboard().ReadAsciiText(CLIPBOARD_TYPE_SELECTION, &ascii_text); |
| - EXPECT_EQ(UTF16ToUTF8(url), ascii_text); |
| + if (!this->IsMusTest()) { |
|
dcheng
2016/06/04 06:14:00
Why do we exclude mus here? Wouldn't we expect thi
Elliot Glaysher
2016/06/06 20:10:12
Because mus is chromeos in a linux build.
When ch
dcheng
2016/06/07 05:39:00
It feels a bit odd, but I can live with this reaso
|
| + ascii_text.clear(); |
| + this->clipboard().ReadAsciiText(CLIPBOARD_TYPE_SELECTION, &ascii_text); |
| + EXPECT_EQ(UTF16ToUTF8(url), ascii_text); |
| + } |
| #endif |
| } |