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

Unified Diff: webkit/tools/test_shell/mock_webclipboard_impl.cc

Issue 6635003: Support event.clipboardData.types in layout tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 | « webkit/tools/test_shell/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: webkit/tools/test_shell/mock_webclipboard_impl.cc
diff --git a/webkit/tools/test_shell/mock_webclipboard_impl.cc b/webkit/tools/test_shell/mock_webclipboard_impl.cc
index eec9099f34075ca163da1d9ea07b9335a8f39f92..eb006f0ff1c49d3c10e2fd6311711dbf2f8545bd 100644
--- a/webkit/tools/test_shell/mock_webclipboard_impl.cc
+++ b/webkit/tools/test_shell/mock_webclipboard_impl.cc
@@ -14,6 +14,7 @@
using WebKit::WebString;
using WebKit::WebURL;
+using WebKit::WebVector;
bool MockWebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
switch (format) {
@@ -85,3 +86,17 @@ void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image,
m_writeSmartPaste = false;
}
}
+
+WebVector<WebString> MockWebClipboardImpl::readAvailableTypes(
+ Buffer buffer, bool* containsFilenames) {
+ *containsFilenames = false;
+ std::vector<WebString> results;
+ if (!m_plainText.isEmpty()) {
+ results.push_back(WebString("Text"));
+ results.push_back(WebString("text/plain"));
+ }
+ if (!m_htmlText.isEmpty()) {
+ results.push_back(WebString("text/html"));
+ }
+ return results;
+}
« no previous file with comments | « webkit/tools/test_shell/mock_webclipboard_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698