diff options
author | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 10:32:08 +0000 |
---|---|---|
committer | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 10:32:08 +0000 |
commit | efb61dc6ba5f7e1824b8f2b1ea120598b50e7bc4 (patch) | |
tree | 7e641cb9390dcb37f70b50d01e087627288e1a87 | |
parent | 1fcf10d20199c3cacae6f8c2d17117c4148b3c62 (diff) | |
download | chromium_src-efb61dc6ba5f7e1824b8f2b1ea120598b50e7bc4.zip chromium_src-efb61dc6ba5f7e1824b8f2b1ea120598b50e7bc4.tar.gz chromium_src-efb61dc6ba5f7e1824b8f2b1ea120598b50e7bc4.tar.bz2 |
DevTools: enable Storage panel by default
Tha panel allows inspecting cookies and local/session storage which are enabled by default.
TEST=DevToolsSanityTest.TestShowStoragePanel
Review URL: http://codereview.chromium.org/391032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31779 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/debugger/devtools_sanity_unittest.cc | 6 | ||||
-rw-r--r-- | webkit/glue/devtools/js/tests.js | 37 | ||||
-rw-r--r-- | webkit/glue/webdevtoolsfrontend_impl.cc | 3 |
3 files changed, 44 insertions, 2 deletions
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc index f10f655..16ea359 100644 --- a/chrome/browser/debugger/devtools_sanity_unittest.cc +++ b/chrome/browser/debugger/devtools_sanity_unittest.cc @@ -401,4 +401,10 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestEvalGlobal) { RunTest("testEvalGlobal", kEvalTestPage); } +// Test that Storage panel can be shown. +IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestShowStoragePanel) { + RunTest("testShowStoragePanel", kDebuggerTestPage); +} + + } // namespace diff --git a/webkit/glue/devtools/js/tests.js b/webkit/glue/devtools/js/tests.js index b3c8c93..6c920ca 100644 --- a/webkit/glue/devtools/js/tests.js +++ b/webkit/glue/devtools/js/tests.js @@ -1810,6 +1810,43 @@ TestSuite.prototype.testEvalGlobal = function() { /** + * Tests that Storage panel can be open and that local DOM storage is added + * to the panel. + */ +TestSuite.prototype.testShowStoragePanel = function() { + var test = this; + this.addSniffer(WebInspector.panels.storage, 'addDOMStorage', + function(storage) { + var orig = storage.getEntries; + storage.getEntries = function(callback) { + orig.call(this, function(entries) { + callback(entries); + test.releaseControl(); + }); + }; + try { + WebInspector.currentPanel.selectDOMStorage(storage.id); + storage.getEntries = orig; + } catch (e) { + test.fail('Exception in selectDOMStorage: ' + e); + } + }); + this.showPanel('storage'); + + // Access localStorage so that it's pushed to the frontend. + this.evaluateInConsole_( + 'setTimeout("localStorage.x = 10" , 0)', + function(resultText) { + test.assertTrue(!isNaN(resultText), + 'Failed to get timer id: ' + resultText); + }); + + // Wait until DOM storage is added to the panel. + this.takeControl(); +}; + + +/** * Test runner for the test suite. */ var uiTests = {}; diff --git a/webkit/glue/webdevtoolsfrontend_impl.cc b/webkit/glue/webdevtoolsfrontend_impl.cc index 672546c..cfdd896b 100644 --- a/webkit/glue/webdevtoolsfrontend_impl.cc +++ b/webkit/glue/webdevtoolsfrontend_impl.cc @@ -396,8 +396,7 @@ v8::Handle<v8::Value> WebDevToolsFrontendImpl::JsGetApplicationLocale( // static v8::Handle<v8::Value> WebDevToolsFrontendImpl::JsHiddenPanels( const v8::Arguments& args) { - Page* page = V8Proxy::retrieveFrameForEnteredContext()->page(); - return v8String(page->settings()->databasesEnabled() ? "" : "databases"); + return v8String(""); } // static |