| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/clipboard.h" | 8 #include "base/clipboard.h" |
| 9 #include "base/platform_test.h" | |
| 10 #include "base/scoped_clipboard_writer.h" | 9 #include "base/scoped_clipboard_writer.h" |
| 11 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "testing/platform_test.h" |
| 13 | 13 |
| 14 typedef PlatformTest ClipboardTest; | 14 typedef PlatformTest ClipboardTest; |
| 15 | 15 |
| 16 TEST_F(ClipboardTest, ClearTest) { | 16 TEST_F(ClipboardTest, ClearTest) { |
| 17 Clipboard clipboard; | 17 Clipboard clipboard; |
| 18 | 18 |
| 19 { | 19 { |
| 20 ScopedClipboardWriter scw(&clipboard); | 20 ScopedClipboardWriter scw(&clipboard); |
| 21 scw.WriteText(std::wstring(L"clear me")); | 21 scw.WriteText(std::wstring(L"clear me")); |
| 22 } | 22 } |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 257 |
| 258 { | 258 { |
| 259 ScopedClipboardWriter scw(&clipboard); | 259 ScopedClipboardWriter scw(&clipboard); |
| 260 scw.WriteBitmapFromPixels(fake_bitmap, gfx::Size(3, 4)); | 260 scw.WriteBitmapFromPixels(fake_bitmap, gfx::Size(3, 4)); |
| 261 } | 261 } |
| 262 | 262 |
| 263 EXPECT_EQ(true, clipboard.IsFormatAvailable( | 263 EXPECT_EQ(true, clipboard.IsFormatAvailable( |
| 264 Clipboard::GetBitmapFormatType())); | 264 Clipboard::GetBitmapFormatType())); |
| 265 } | 265 } |
| 266 #endif | 266 #endif |
| OLD | NEW |