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

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

Issue 7977025: aura: Make 'ui' buildable without gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | « ui/base/clipboard/clipboard_linux.cc ('k') | ui/base/dragdrop/os_exchange_data.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 Clipboard::BUFFER_STANDARD)); 135 Clipboard::BUFFER_STANDARD));
136 clipboard.ReadHTML(Clipboard::BUFFER_STANDARD, &markup_result, &url_result); 136 clipboard.ReadHTML(Clipboard::BUFFER_STANDARD, &markup_result, &url_result);
137 EXPECT_TRUE(ClipboardContentsIsExpected(markup, markup_result)); 137 EXPECT_TRUE(ClipboardContentsIsExpected(markup, markup_result));
138 #if defined(OS_WIN) 138 #if defined(OS_WIN)
139 // TODO(playmobil): It's not clear that non windows clipboards need to support 139 // TODO(playmobil): It's not clear that non windows clipboards need to support
140 // this. 140 // this.
141 EXPECT_EQ(url, url_result); 141 EXPECT_EQ(url, url_result);
142 #endif // defined(OS_WIN) 142 #endif // defined(OS_WIN)
143 } 143 }
144 144
145 #if defined(OS_POSIX) && !defined(OS_MACOSX) 145 #if defined(TOOLKIT_USES_GTK)
146 // Regression test for crbug.com/56298 (pasting empty HTML crashes Linux). 146 // Regression test for crbug.com/56298 (pasting empty HTML crashes Linux).
147 TEST_F(ClipboardTest, EmptyHTMLTest) { 147 TEST_F(ClipboardTest, EmptyHTMLTest) {
148 Clipboard clipboard; 148 Clipboard clipboard;
149 // ScopedClipboardWriter doesn't let us write empty data to the clipboard. 149 // ScopedClipboardWriter doesn't let us write empty data to the clipboard.
150 clipboard.clipboard_data_ = new Clipboard::TargetMap(); 150 clipboard.clipboard_data_ = new Clipboard::TargetMap();
151 // The 1 is so the compiler doesn't warn about allocating an empty array. 151 // The 1 is so the compiler doesn't warn about allocating an empty array.
152 char* empty = new char[1]; 152 char* empty = new char[1];
153 clipboard.InsertMapping("text/html", empty, 0U); 153 clipboard.InsertMapping("text/html", empty, 0U);
154 clipboard.SetGtkClipboard(); 154 clipboard.SetGtkClipboard();
155 155
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 writer.WriteBookmark(UTF8ToUTF16("foo"), "bar"); 423 writer.WriteBookmark(UTF8ToUTF16("foo"), "bar");
424 writer.WriteHyperlink(ASCIIToUTF16("foo"), "bar"); 424 writer.WriteHyperlink(ASCIIToUTF16("foo"), "bar");
425 writer.WriteWebSmartPaste(); 425 writer.WriteWebSmartPaste();
426 // Left out: WriteFile, WriteFiles, WriteBitmapFromPixels, WritePickledData. 426 // Left out: WriteFile, WriteFiles, WriteBitmapFromPixels, WritePickledData.
427 } 427 }
428 428
429 // Passes if we don't crash. 429 // Passes if we don't crash.
430 } 430 }
431 431
432 } // namespace ui 432 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_linux.cc ('k') | ui/base/dragdrop/os_exchange_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698