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

Unified Diff: content/test/mock_webclipboard_impl.cc

Issue 396953002: Add testRunner.copyAtAndCapturePixelsAsyncThen() method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated patch Created 6 years, 5 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 | « content/test/mock_webclipboard_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/mock_webclipboard_impl.cc
diff --git a/content/test/mock_webclipboard_impl.cc b/content/test/mock_webclipboard_impl.cc
index 8aa8c307d2c4e83dd079ac9b56c5f04b378bbec2..2109f5262849862c04d0f2172786856993a601fb 100644
--- a/content/test/mock_webclipboard_impl.cc
+++ b/content/test/mock_webclipboard_impl.cc
@@ -30,6 +30,10 @@ MockWebClipboardImpl::MockWebClipboardImpl() {}
MockWebClipboardImpl::~MockWebClipboardImpl() {}
+uint64_t MockWebClipboardImpl::sequenceNumber(Buffer) {
+ return m_sequenceNumber;
+}
+
bool MockWebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
switch (format) {
case FormatPlainText:
@@ -130,12 +134,14 @@ void MockWebClipboardImpl::writeHTML(const blink::WebString& htmlText,
m_htmlText = htmlText;
m_plainText = plainText;
m_writeSmartPaste = writeSmartPaste;
+ ++m_sequenceNumber;
}
void MockWebClipboardImpl::writePlainText(const blink::WebString& plain_text) {
clear();
m_plainText = plain_text;
+ ++m_sequenceNumber;
}
void MockWebClipboardImpl::writeURL(const blink::WebURL& url,
@@ -144,6 +150,7 @@ void MockWebClipboardImpl::writeURL(const blink::WebURL& url,
m_htmlText = WebString::fromUTF8(URLToMarkup(url, title));
m_plainText = url.spec().utf16();
+ ++m_sequenceNumber;
}
void MockWebClipboardImpl::writeImage(const blink::WebImage& image,
@@ -155,6 +162,7 @@ void MockWebClipboardImpl::writeImage(const blink::WebImage& image,
m_plainText = m_htmlText;
m_htmlText = WebString::fromUTF8(URLToImageMarkup(url, title));
m_image = image;
+ ++m_sequenceNumber;
}
}
@@ -166,6 +174,7 @@ void MockWebClipboardImpl::writeDataObject(const WebDragData& data) {
const WebDragData::Item& item = itemList[i];
switch (item.storageType) {
case WebDragData::Item::StorageTypeString: {
+ ++m_sequenceNumber;
if (EqualsASCII(item.stringType, ui::Clipboard::kMimeTypeText)) {
m_plainText = item.stringData;
continue;
@@ -190,6 +199,7 @@ void MockWebClipboardImpl::clear() {
m_image.reset();
m_customData.clear();
m_writeSmartPaste = false;
+ m_sequenceNumber = 0;
sky 2014/07/17 21:32:31 Is there a reason why this and m_writeSmartPaste a
hj.r.chung 2014/07/18 04:00:27 I'll upload another patch with both members in the
}
} // namespace content
« no previous file with comments | « content/test/mock_webclipboard_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698