Commit 8cd107ec authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Fix ExecuteGetStorageKeys

Fix the implementation of get local storage keys and get session storage
keys functions.

Bug: chromedriver:2177
Change-Id: Iac8e8155081190d92dc14a54f9c367337f2ebe86
Reviewed-on: https://chromium-review.googlesource.com/844354Reviewed-by: default avatarJonathon Kereliuk <kereliuk@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526485}
parent c33c4fa5
...@@ -1211,8 +1211,9 @@ Status ExecuteGetStorageKeys(const char* storage, ...@@ -1211,8 +1211,9 @@ Status ExecuteGetStorageKeys(const char* storage,
Timeout* timeout) { Timeout* timeout) {
const char script[] = const char script[] =
"var keys = [];" "var keys = [];"
"for (var key in %s) {" "var storage = %s;"
" keys.push(key);" "for (var i = 0; i < storage.length; i++) {"
" keys.push(storage.key(i));"
"}" "}"
"keys"; "keys";
return web_view->EvaluateScript( return web_view->EvaluateScript(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment