diff options
Diffstat (limited to 'app/clipboard/clipboard_unittest.cc')
-rw-r--r-- | app/clipboard/clipboard_unittest.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/clipboard/clipboard_unittest.cc b/app/clipboard/clipboard_unittest.cc index 5b1d48a8..e4f288a 100644 --- a/app/clipboard/clipboard_unittest.cc +++ b/app/clipboard/clipboard_unittest.cc @@ -335,3 +335,22 @@ TEST_F(ClipboardTest, BitmapTest) { Clipboard::BUFFER_STANDARD)); } #endif // defined(OS_WIN) + +// Test writing all formats we have simultaneously. +TEST_F(ClipboardTest, WriteEverything) { + Clipboard clipboard; + + { + ScopedClipboardWriter writer(&clipboard); + writer.WriteText(UTF8ToUTF16("foo")); + writer.WriteURL(UTF8ToUTF16("foo")); + writer.WriteHTML(UTF8ToUTF16("foo"), "bar"); + writer.WriteBookmark(UTF8ToUTF16("foo"), "bar"); + writer.WriteHyperlink("foo", "bar"); + writer.WriteWebSmartPaste(); + // Left out: WriteFile, WriteFiles, WriteBitmapFromPixels, WritePickledData. + } + + // Passes if we don't crash. +} + |