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

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: added initialization for members 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..88f4e9f8cf5d9d6d3fa7431ed4123c5716d89ea4 100644
--- a/content/test/mock_webclipboard_impl.cc
+++ b/content/test/mock_webclipboard_impl.cc
@@ -6,7 +6,6 @@
#include <algorithm>
-#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -26,10 +25,16 @@ using blink::WebVector;
namespace content {
-MockWebClipboardImpl::MockWebClipboardImpl() {}
+MockWebClipboardImpl::MockWebClipboardImpl()
+ : m_sequenceNumber(0),
+ m_writeSmartPaste(false) {}
MockWebClipboardImpl::~MockWebClipboardImpl() {}
+uint64_t MockWebClipboardImpl::sequenceNumber(Buffer) {
+ return m_sequenceNumber;
+}
+
bool MockWebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
switch (format) {
case FormatPlainText:
@@ -130,12 +135,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 +151,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 +163,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 +175,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;
« 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