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

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

Issue 387020: Upstreaming WebKit.gyp (Closed)
Patch Set: Created 11 years, 1 month 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
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 "third_party/WebKit/WebKit/chromium/public/WebClipboard.h"
14 #include "webkit/api/public/WebString.h" 14 #include "third_party/WebKit/WebKit/chromium/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 writePlainText(const WebKit::WebString& plain_text);
26 virtual void writeHTML( 26 virtual void writeHTML(
27 const WebKit::WebString& htmlText, const WebKit::WebURL&, 27 const WebKit::WebString& htmlText, const WebKit::WebURL&,
28 const WebKit::WebString& plainText, bool writeSmartPaste); 28 const WebKit::WebString& plainText, bool writeSmartPaste);
29 virtual void writeURL( 29 virtual void writeURL(
30 const WebKit::WebURL&, const WebKit::WebString& title); 30 const WebKit::WebURL&, const WebKit::WebString& title);
31 virtual void writeImage( 31 virtual void writeImage(
32 const WebKit::WebImage&, const WebKit::WebURL&, 32 const WebKit::WebImage&, const WebKit::WebURL&,
33 const WebKit::WebString& title); 33 const WebKit::WebString& title);
34 34
35 private: 35 private:
36 WebKit::WebString m_plainText; 36 WebKit::WebString m_plainText;
37 WebKit::WebString m_htmlText; 37 WebKit::WebString m_htmlText;
38 bool m_writeSmartPaste; 38 bool m_writeSmartPaste;
39 }; 39 };
40 40
41 #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/tools/test_shell/mac/webwidget_host.mm ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698