| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the 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 "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebClipboard
.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
| 15 | 15 |
| 16 class MockWebClipboardImpl : public WebKit::WebClipboard { | 16 class MockWebClipboardImpl : public WebKit::WebClipboard { |
| 17 public: | 17 public: |
| 18 MockWebClipboardImpl(); | 18 MockWebClipboardImpl(); |
| 19 ~MockWebClipboardImpl(); | 19 ~MockWebClipboardImpl(); |
| 20 | 20 |
| 21 virtual bool isFormatAvailable(WebKit::WebClipboard::Format format, | 21 virtual bool isFormatAvailable(WebKit::WebClipboard::Format format, |
| 22 WebKit::WebClipboard::Buffer buffer); | 22 WebKit::WebClipboard::Buffer buffer); |
| 23 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( | 23 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( |
| 24 WebKit::WebClipboard::Buffer buffer, bool* containsFilenames); | 24 WebKit::WebClipboard::Buffer buffer, bool* containsFilenames); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 42 virtual void writeDataObject(const WebKit::WebDragData& data); | 42 virtual void writeDataObject(const WebKit::WebDragData& data); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 WebKit::WebString m_plainText; | 45 WebKit::WebString m_plainText; |
| 46 WebKit::WebString m_htmlText; | 46 WebKit::WebString m_htmlText; |
| 47 WebKit::WebImage m_image; | 47 WebKit::WebImage m_image; |
| 48 bool m_writeSmartPaste; | 48 bool m_writeSmartPaste; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ | 51 #endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ |
| OLD | NEW |