Bug 1231179 - Make sessionStorage entry rows editable via double-click in storage inspector r=pbro
MozReview-Commit-ID: 3DFu6fyEdOS
This commit is contained in:
@@ -2,24 +2,26 @@
|
||||
tags = devtools
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
storage-cookies.html
|
||||
storage-complex-values.html
|
||||
storage-cookies.html
|
||||
storage-listings.html
|
||||
storage-localstorage.html
|
||||
storage-overflow.html
|
||||
storage-search.html
|
||||
storage-secured-iframe.html
|
||||
storage-sessionstorage.html
|
||||
storage-unsecured-iframe.html
|
||||
storage-updates.html
|
||||
head.js
|
||||
|
||||
[browser_storage_basic.js]
|
||||
[browser_storage_dynamic_updates.js]
|
||||
[browser_storage_cookies_edit.js]
|
||||
[browser_storage_cookies_edit_keyboard.js]
|
||||
[browser_storage_cookies_tab_navigation.js]
|
||||
[browser_storage_dynamic_updates.js]
|
||||
[browser_storage_localstorage_edit.js]
|
||||
[browser_storage_overflow.js]
|
||||
[browser_storage_search.js]
|
||||
[browser_storage_sessionstorage_edit.js]
|
||||
[browser_storage_sidebar.js]
|
||||
[browser_storage_values.js]
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Basic test to check the editing of localStorage.
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(function*() {
|
||||
yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-sessionstorage.html");
|
||||
|
||||
yield selectTreeItem(["sessionStorage", "http://test1.example.org"]);
|
||||
yield gUI.table.once(TableWidget.EVENTS.FIELDS_EDITABLE);
|
||||
|
||||
yield editCell("TestSS1", "name", "newTestSS1");
|
||||
yield editCell("newTestSS1", "value", "newValueSS1");
|
||||
|
||||
yield editCell("TestSS3", "name", "newTestSS3");
|
||||
yield editCell("newTestSS3", "value", "newValueSS3");
|
||||
|
||||
yield editCell("TestSS5", "name", "newTestSS5");
|
||||
yield editCell("newTestSS5", "value", "newValueSS5");
|
||||
|
||||
yield finishTests();
|
||||
});
|
||||
23
devtools/client/storage/test/storage-sessionstorage.html
Normal file
23
devtools/client/storage/test/storage-sessionstorage.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<!--
|
||||
Bug 1231179 - Storage inspector front end - tests
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Storage inspector sessionStorage test</title>
|
||||
<script type="application/javascript;version=1.7">
|
||||
"use strict";
|
||||
|
||||
function setup() {
|
||||
sessionStorage.setItem("TestSS1", "ValueSS1");
|
||||
sessionStorage.setItem("TestSS2", "ValueSS2");
|
||||
sessionStorage.setItem("TestSS3", "ValueSS3");
|
||||
sessionStorage.setItem("TestSS4", "ValueSS4");
|
||||
sessionStorage.setItem("TestSS5", "ValueSS5");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="setup()">
|
||||
</body>
|
||||
</html>
|
||||
@@ -150,8 +150,7 @@ StorageUI.prototype = {
|
||||
makeFieldsEditable: function() {
|
||||
let actor = this.getCurrentActor();
|
||||
|
||||
if (typeof actor.getEditableFields !== "undefined" &&
|
||||
this.table.datatype !== "sessionStorage") {
|
||||
if (typeof actor.getEditableFields !== "undefined") {
|
||||
actor.getEditableFields().then(fields => {
|
||||
this.table.makeFieldsEditable(fields);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user