Commit 45336e53 authored by jsbell@chromium.org's avatar jsbell@chromium.org

Use correct callback type for deleteDatabase result

BUG=106883
TEST=

Review URL: http://codereview.chromium.org/8879034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113708 0039d316-1c4b-4281-b951-d872f2087c98
parent f4bc5409
<!DOCTYPE html>
<html>
<head>
<title>IndexedDB regression test for bug 106883</title>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="bug_106883.js"></script>
</head>
<body onLoad="test()">
<div id="status">Starting...</div>
</body>
</html>
// Copyright (c) 2011 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.
function test()
{
webkitIndexedDB.deleteDatabase('no-such-database').onsuccess = function() {
window.close();
};
}
...@@ -124,6 +124,13 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug84933Test) { ...@@ -124,6 +124,13 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug84933Test) {
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 1); ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 1);
} }
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, Bug106883Test) {
const GURL url = testUrl(FilePath(FILE_PATH_LITERAL("bug_106883.html")));
// Just navigate to the URL. Test will crash if it fails.
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 1);
}
// In proc browser test is needed here because ClearLocalState indirectly calls // In proc browser test is needed here because ClearLocalState indirectly calls
// WebKit's isMainThread through WebSecurityOrigin->SecurityOrigin. // WebKit's isMainThread through WebSecurityOrigin->SecurityOrigin.
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearLocalState) { IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, ClearLocalState) {
......
...@@ -259,14 +259,11 @@ void IndexedDBDispatcherHost::OnIDBFactoryDeleteDatabase( ...@@ -259,14 +259,11 @@ void IndexedDBDispatcherHost::OnIDBFactoryDeleteDatabase(
IndexedDBContext::kIndexedDBDirectory); IndexedDBContext::kIndexedDBDirectory);
} }
WebSecurityOrigin origin(
WebSecurityOrigin::createFromDatabaseIdentifier(params.origin));
GURL url(origin.toString());
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT));
Context()->GetIDBFactory()->deleteDatabase( Context()->GetIDBFactory()->deleteDatabase(
params.name, params.name,
new IndexedDBCallbacks<WebIDBDatabase>(this, params.response_id, url), new IndexedDBCallbacks<WebSerializedScriptValue>(this,
params.response_id),
WebSecurityOrigin::createFromDatabaseIdentifier(params.origin), NULL, WebSecurityOrigin::createFromDatabaseIdentifier(params.origin), NULL,
webkit_glue::FilePathToWebString(indexed_db_path)); webkit_glue::FilePathToWebString(indexed_db_path));
} }
......
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