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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1876653003: Register clipboard image blob in the browser process to copy data less. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index b9c613ee0b6c6a411842ea481647d7b798df62b3..66171b35b003ebbc514db567b146a9a7ae191b35 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -64,10 +64,10 @@
#include "platform/testing/URLTestHelpers.h"
#include "platform/testing/UnitTestHelpers.h"
#include "public/platform/Platform.h"
-#include "public/platform/WebClipboard.h"
#include "public/platform/WebDisplayMode.h"
#include "public/platform/WebDragData.h"
#include "public/platform/WebDragOperation.h"
+#include "public/platform/WebMockClipboard.h"
#include "public/platform/WebSize.h"
#include "public/platform/WebThread.h"
#include "public/platform/WebURLLoaderMockFactory.h"
@@ -324,8 +324,7 @@ TEST_F(WebViewTest, CopyImageAt)
EXPECT_NE(sequence, Platform::current()->clipboard()->sequenceNumber(WebClipboard::BufferStandard));
- WebData data = Platform::current()->clipboard()->readImage(WebClipboard::Buffer());
- WebImage image = WebImage::fromData(data, WebSize());
+ WebImage image = static_cast<WebMockClipboard*>(Platform::current()->clipboard())->readRawImage(WebClipboard::Buffer());
SkAutoLockPixels autoLock(image.getSkBitmap());
EXPECT_EQ(SkColorSetARGB(255, 255, 0, 0), image.getSkBitmap().getColor(0, 0));
@@ -347,8 +346,7 @@ TEST_F(WebViewTest, CopyImageAtWithPinchZoom)
EXPECT_NE(sequence, Platform::current()->clipboard()->sequenceNumber(WebClipboard::BufferStandard));
- WebData data = Platform::current()->clipboard()->readImage(WebClipboard::Buffer());
- WebImage image = WebImage::fromData(data, WebSize());
+ WebImage image = static_cast<WebMockClipboard*>(Platform::current()->clipboard())->readRawImage(WebClipboard::Buffer());
SkAutoLockPixels autoLock(image.getSkBitmap());
EXPECT_EQ(SkColorSetARGB(255, 255, 0, 0), image.getSkBitmap().getColor(0, 0));
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp ('k') | third_party/WebKit/public/blink_headers.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698