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

Unified Diff: ui/base/clipboard/clipboard_unittest.cc

Issue 232773008: More removal of GTK code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base/ so I don't need another stamp. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/custom_data_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_unittest.cc
diff --git a/ui/base/clipboard/clipboard_unittest.cc b/ui/base/clipboard/clipboard_unittest.cc
index 30798d39de9c2ffc9076222a16eadaf4e43a7de1..b3387ef448207109fa0b10a193870cc06c050ccb 100644
--- a/ui/base/clipboard/clipboard_unittest.cc
+++ b/ui/base/clipboard/clipboard_unittest.cc
@@ -159,7 +159,7 @@ TEST_F(ClipboardTest, RTFTest) {
EXPECT_EQ(rtf, result);
}
-#if defined(TOOLKIT_GTK)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
TEST_F(ClipboardTest, MultipleBufferTest) {
base::string16 text(ASCIIToUTF16("Standard")), text_result;
base::string16 markup(ASCIIToUTF16("<string>Selection</string>"));
@@ -254,27 +254,6 @@ TEST_F(ClipboardTest, UniodeHTMLTest) {
}
#endif // defined(OS_WIN)
-#if defined(TOOLKIT_GTK)
-// Regression test for crbug.com/56298 (pasting empty HTML crashes Linux).
-TEST_F(ClipboardTest, EmptyHTMLTest) {
- // ScopedClipboardWriter doesn't let us write empty data to the clipboard.
- clipboard().clipboard_data_ = new Clipboard::TargetMap();
- // The 1 is so the compiler doesn't warn about allocating an empty array.
- char* empty = new char[1];
- clipboard().InsertMapping("text/html", empty, 0U);
- clipboard().SetGtkClipboard(CLIPBOARD_TYPE_COPY_PASTE);
-
- EXPECT_TRUE(clipboard().IsFormatAvailable(Clipboard::GetHtmlFormatType(),
- CLIPBOARD_TYPE_COPY_PASTE));
- base::string16 markup_result;
- std::string url_result;
- uint32 ignored;
- clipboard().ReadHTML(CLIPBOARD_TYPE_COPY_PASTE, &markup_result, &url_result,
- &ignored, &ignored);
- EXPECT_PRED2(MarkupMatches, base::string16(), markup_result);
-}
-#endif
-
// TODO(estade): Port the following test (decide what target we use for urls)
#if !defined(OS_POSIX) || defined(OS_MACOSX)
TEST_F(ClipboardTest, BookmarkTest) {
@@ -414,19 +393,8 @@ static void TestBitmapWrite(Clipboard* clipboard,
for (int i = 0; i < image.width(); ++i) {
int offset = i + j * image.width();
uint32 pixel = SkPreMultiplyColor(bitmap_data[offset]);
-#if defined(TOOLKIT_GTK)
- // Non-Aura GTK doesn't support alpha transparency. Instead, the alpha
- // channel is always set to 0xFF - see http://crbug.com/154573.
- // However, since we premultiplied above, we must also premultiply here
- // before unpremultiplying and setting alpha to 0xFF; otherwise, the
- // results will not match GTK's.
- EXPECT_EQ(
- SkUnPreMultiply::PMColorToColor(pixel) | 0xFF000000, row_address[i])
- << "i = " << i << ", j = " << j;
-#else
EXPECT_EQ(pixel, row_address[i])
<< "i = " << i << ", j = " << j;
-#endif // defined(TOOLKIT_GTK)
}
}
}
« no previous file with comments | « ui/base/clipboard/clipboard.h ('k') | ui/base/clipboard/custom_data_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698