| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "app/clipboard/clipboard.h" |
| 8 #include "app/clipboard/scoped_clipboard_writer.h" |
| 7 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 8 #include "base/clipboard.h" | |
| 9 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
| 10 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 11 #include "base/pickle.h" | 12 #include "base/pickle.h" |
| 12 #include "base/scoped_clipboard_writer.h" | |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
| 16 | 16 |
| 17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 18 class ClipboardTest : public PlatformTest { | 18 class ClipboardTest : public PlatformTest { |
| 19 protected: | 19 protected: |
| 20 virtual void SetUp() { | 20 virtual void SetUp() { |
| 21 message_loop_.reset(new MessageLoopForUI()); | 21 message_loop_.reset(new MessageLoopForUI()); |
| 22 } | 22 } |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 { | 329 { |
| 330 ScopedClipboardWriter clipboard_writer(&clipboard); | 330 ScopedClipboardWriter clipboard_writer(&clipboard); |
| 331 clipboard_writer.WriteBitmapFromPixels(fake_bitmap, gfx::Size(3, 4)); | 331 clipboard_writer.WriteBitmapFromPixels(fake_bitmap, gfx::Size(3, 4)); |
| 332 } | 332 } |
| 333 | 333 |
| 334 EXPECT_TRUE(clipboard.IsFormatAvailable(Clipboard::GetBitmapFormatType(), | 334 EXPECT_TRUE(clipboard.IsFormatAvailable(Clipboard::GetBitmapFormatType(), |
| 335 Clipboard::BUFFER_STANDARD)); | 335 Clipboard::BUFFER_STANDARD)); |
| 336 } | 336 } |
| 337 #endif // defined(OS_WIN) | 337 #endif // defined(OS_WIN) |
| OLD | NEW |