OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 Clipboard clipboard; | 380 Clipboard clipboard; |
381 clipboard.WriteObjects(Clipboard::BUFFER_STANDARD, objects); | 381 clipboard.WriteObjects(Clipboard::BUFFER_STANDARD, objects); |
382 | 382 |
383 EXPECT_TRUE(clipboard.IsFormatAvailable(Clipboard::GetBitmapFormatType(), | 383 EXPECT_TRUE(clipboard.IsFormatAvailable(Clipboard::GetBitmapFormatType(), |
384 Clipboard::BUFFER_STANDARD)); | 384 Clipboard::BUFFER_STANDARD)); |
385 } | 385 } |
386 | 386 |
387 // The following test somehow fails on GTK. The image when read back from the | 387 // The following test somehow fails on GTK. The image when read back from the |
388 // clipboard has the alpha channel set to 0xFF for some reason. The other | 388 // clipboard has the alpha channel set to 0xFF for some reason. The other |
389 // channels stay intact. So I am turning this on only for aura. | 389 // channels stay intact. So I am turning this on only for aura. |
390 #if defined(USE_AURA) | 390 #if defined(USE_AURA) && !defined(OS_WIN) |
391 TEST_F(ClipboardTest, MultipleBitmapReadWriteTest) { | 391 TEST_F(ClipboardTest, MultipleBitmapReadWriteTest) { |
392 Clipboard clipboard; | 392 Clipboard clipboard; |
393 | 393 |
394 // Test first bitmap | 394 // Test first bitmap |
395 unsigned int fake_bitmap_1[] = { | 395 unsigned int fake_bitmap_1[] = { |
396 0x46155189, 0xF6A55C8D, 0x79845674, 0xFA57BD89, | 396 0x46155189, 0xF6A55C8D, 0x79845674, 0xFA57BD89, |
397 0x78FD46AE, 0x87C64F5A, 0x36EDC5AF, 0x4378F568, | 397 0x78FD46AE, 0x87C64F5A, 0x36EDC5AF, 0x4378F568, |
398 0x91E9F63A, 0xC31EA14F, 0x69AB32DF, 0x643A3FD1, | 398 0x91E9F63A, 0xC31EA14F, 0x69AB32DF, 0x643A3FD1, |
399 }; | 399 }; |
400 gfx::Size fake_bitmap_1_size(3, 4); | 400 gfx::Size fake_bitmap_1_size(3, 4); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 writer.WriteBookmark(UTF8ToUTF16("foo"), "bar"); | 643 writer.WriteBookmark(UTF8ToUTF16("foo"), "bar"); |
644 writer.WriteHyperlink(ASCIIToUTF16("foo"), "bar"); | 644 writer.WriteHyperlink(ASCIIToUTF16("foo"), "bar"); |
645 writer.WriteWebSmartPaste(); | 645 writer.WriteWebSmartPaste(); |
646 // Left out: WriteFile, WriteFiles, WriteBitmapFromPixels, WritePickledData. | 646 // Left out: WriteFile, WriteFiles, WriteBitmapFromPixels, WritePickledData. |
647 } | 647 } |
648 | 648 |
649 // Passes if we don't crash. | 649 // Passes if we don't crash. |
650 } | 650 } |
651 | 651 |
652 } // namespace ui | 652 } // namespace ui |
OLD | NEW |