Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: ui/base/clipboard/clipboard_unittest.cc

Issue 10256008: Adds a class that makes it easy to subclass a HWND and filter messages sent to it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/all.gyp ('k') | ui/base/win/hwnd_subclass.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | ui/base/win/hwnd_subclass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698