summaryrefslogtreecommitdiffstats
path: root/webkit/support/test_webkit_client.cc
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 01:00:06 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 01:00:06 +0000
commitbaaea999cec6a59750d7e35315e9e2839fc2d10d (patch)
treebb55fc25e3bb3b7c7ea13c0fae6b334d3556a485 /webkit/support/test_webkit_client.cc
parent00fb5ef53f9afadc88ddaf1e091a8114b5a9365b (diff)
downloadchromium_src-baaea999cec6a59750d7e35315e9e2839fc2d10d.zip
chromium_src-baaea999cec6a59750d7e35315e9e2839fc2d10d.tar.gz
chromium_src-baaea999cec6a59750d7e35315e9e2839fc2d10d.tar.bz2
webkit_support: Implement createIDBKeysFromSerializedValuesAndKeyPath() for DumpRenderTree.
BUG=none TEST=none; This is a part of test code. Review URL: http://codereview.chromium.org/3479005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/test_webkit_client.cc')
-rw-r--r--webkit/support/test_webkit_client.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc
index 9bc8692..8382fd0 100644
--- a/webkit/support/test_webkit_client.cc
+++ b/webkit/support/test_webkit_client.cc
@@ -17,10 +17,13 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebGraphicsContext3D.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
@@ -253,6 +256,18 @@ WebKit::WebIDBFactory* TestWebKitClient::idbFactory() {
return WebKit::WebIDBFactory::create();
}
+void TestWebKitClient::createIDBKeysFromSerializedValuesAndKeyPath(
+ const WebKit::WebVector<WebKit::WebSerializedScriptValue>& values,
+ const WebKit::WebString& keyPath,
+ WebKit::WebVector<WebKit::WebIDBKey>& keys_out) {
+ WebKit::WebVector<WebKit::WebIDBKey> keys(values.size());
+ for (size_t i = 0; i < values.size(); ++i) {
+ keys[i] = WebKit::WebIDBKey::createFromValueAndKeyPath(
+ values[i], WebKit::WebIDBKeyPath::create(keyPath));
+ }
+ keys_out.swap(keys);
+}
+
#if defined(OS_WIN)
void TestWebKitClient::SetThemeEngine(WebKit::WebThemeEngine* engine) {
active_theme_engine_ = engine ? engine : WebKitClientImpl::themeEngine();