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

Side by Side Diff: webkit/tools/test_shell/mock_webclipboard_impl.h

Issue 211052: Implement ChromiumBridge::clipboardWritePlainText() (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webclipboard_impl.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 // 4 //
5 // This file mocks out just enough of the WebClipboard API for running the 5 // This file mocks out just enough of the WebClipboard API for running the
6 // webkit tests. This is so we can run webkit tests without them sharing a 6 // webkit tests. This is so we can run webkit tests without them sharing a
7 // clipboard, which allows for running them in parallel and having the tests 7 // clipboard, which allows for running them in parallel and having the tests
8 // not interact with actual user actions. 8 // not interact with actual user actions.
9 9
10 #ifndef WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 10 #ifndef WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
11 #define WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 11 #define WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
12 12
13 #include "webkit/api/public/WebClipboard.h" 13 #include "webkit/api/public/WebClipboard.h"
14 #include "webkit/api/public/WebString.h" 14 #include "webkit/api/public/WebString.h"
15 15
16 class MockWebClipboardImpl : public WebKit::WebClipboard { 16 class MockWebClipboardImpl : public WebKit::WebClipboard {
17 public: 17 public:
18 virtual bool isFormatAvailable(WebKit::WebClipboard::Format, 18 virtual bool isFormatAvailable(WebKit::WebClipboard::Format,
19 WebKit::WebClipboard::Buffer); 19 WebKit::WebClipboard::Buffer);
20 20
21 virtual WebKit::WebString readPlainText(WebKit::WebClipboard::Buffer); 21 virtual WebKit::WebString readPlainText(WebKit::WebClipboard::Buffer);
22 virtual WebKit::WebString readHTML(WebKit::WebClipboard::Buffer, 22 virtual WebKit::WebString readHTML(WebKit::WebClipboard::Buffer,
23 WebKit::WebURL*); 23 WebKit::WebURL*);
24 24
25 virtual void writePlainText(const WebKit::WebString& plain_text);
25 virtual void writeHTML( 26 virtual void writeHTML(
26 const WebKit::WebString& htmlText, const WebKit::WebURL&, 27 const WebKit::WebString& htmlText, const WebKit::WebURL&,
27 const WebKit::WebString& plainText, bool writeSmartPaste); 28 const WebKit::WebString& plainText, bool writeSmartPaste);
28 virtual void writeURL( 29 virtual void writeURL(
29 const WebKit::WebURL&, const WebKit::WebString& title); 30 const WebKit::WebURL&, const WebKit::WebString& title);
30 virtual void writeImage( 31 virtual void writeImage(
31 const WebKit::WebImage&, const WebKit::WebURL&, 32 const WebKit::WebImage&, const WebKit::WebURL&,
32 const WebKit::WebString& title); 33 const WebKit::WebString& title);
33 34
34 private: 35 private:
35 WebKit::WebString m_plainText; 36 WebKit::WebString m_plainText;
36 WebKit::WebString m_htmlText; 37 WebKit::WebString m_htmlText;
37 bool m_writeSmartPaste; 38 bool m_writeSmartPaste;
38 }; 39 };
39 40
40 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ 41 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webclipboard_impl.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698