diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 22:25:46 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-30 22:25:46 +0000 |
commit | e522cf7889669bfd5153a2d32ac47246bcee2883 (patch) | |
tree | ee868c2b38d594dc7c4ad2cff44d11101ee2dd18 /webkit/tools/test_shell/mock_webclipboard_impl.h | |
parent | dbdda5408e79f9b0a0936743f9c48ee258c08bf5 (diff) | |
download | chromium_src-e522cf7889669bfd5153a2d32ac47246bcee2883.zip chromium_src-e522cf7889669bfd5153a2d32ac47246bcee2883.tar.gz chromium_src-e522cf7889669bfd5153a2d32ac47246bcee2883.tar.bz2 |
Move C++ code from webkit/tools/test_shell to webkit/support
This code is simple/test/mock implementations of APIs to use in DumpRenderTree,
webkit_unit_tests, and various other bits of unit test code around the codebase.
Nothing here is used for test_shell since there is no test_shell any more.
This moves the code to webkit/support/ along with the rest of DRT/w_u_t support
code. Hopefully we'll be able to delete most of this soon along with
DumpRenderTree. In the meantime this simplifies webkit/
R=darin@chromium.org
Review URL: https://codereview.chromium.org/15946006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/mock_webclipboard_impl.h')
-rw-r--r-- | webkit/tools/test_shell/mock_webclipboard_impl.h | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/webkit/tools/test_shell/mock_webclipboard_impl.h b/webkit/tools/test_shell/mock_webclipboard_impl.h deleted file mode 100644 index 1ec33b2..0000000 --- a/webkit/tools/test_shell/mock_webclipboard_impl.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// This file mocks out just enough of the WebClipboard API for running the -// webkit tests. This is so we can run webkit tests without them sharing a -// clipboard, which allows for running them in parallel and having the tests -// not interact with actual user actions. - -#ifndef WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ -#define WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ - -#include <map> - -#include "base/string16.h" -#include "third_party/WebKit/public/platform/WebClipboard.h" -#include "third_party/WebKit/public/platform/WebDragData.h" -#include "third_party/WebKit/public/platform/WebImage.h" - -class MockWebClipboardImpl : public WebKit::WebClipboard { - public: - MockWebClipboardImpl(); - virtual ~MockWebClipboardImpl(); - - virtual bool isFormatAvailable(WebKit::WebClipboard::Format format, - WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( - WebKit::WebClipboard::Buffer buffer, bool* containsFilenames); - - virtual WebKit::WebString readPlainText(WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebString readHTML(WebKit::WebClipboard::Buffer buffer, - WebKit::WebURL* url, - unsigned* fragmentStart, - unsigned* fragmentEnd); - virtual WebKit::WebData readImage(WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebString readCustomData(WebKit::WebClipboard::Buffer buffer, - const WebKit::WebString& type); - - virtual void writePlainText(const WebKit::WebString& plain_text); - virtual void writeHTML( - const WebKit::WebString& htmlText, const WebKit::WebURL& url, - const WebKit::WebString& plainText, bool writeSmartPaste); - virtual void writeURL( - const WebKit::WebURL& url, const WebKit::WebString& title); - virtual void writeImage( - const WebKit::WebImage& image, const WebKit::WebURL& url, - const WebKit::WebString& title); - virtual void writeDataObject(const WebKit::WebDragData& data); - - private: - void clear(); - - WebKit::WebString m_plainText; - WebKit::WebString m_htmlText; - WebKit::WebImage m_image; - std::map<base::string16, base::string16> m_customData; - bool m_writeSmartPaste; -}; - -#endif // WEBKIT_TOOLS_TEST_SHELL_MOCK_WEBCLIPBOARD_IMPL_H_ |