((Below is the QA Test Plan. I will upload the test extensions before merge day.))
- Open Firefox Beta 70 in a new profile
- Download the following test extensions attached to this bug:
- Test Extension 1: 1542035-test-extension-1-1.0.zip
- Extension with Background script and browserAction toolbar button. Clicking the browserAction toolbar button opens a popup with a menu.
- Test Extension 2: 1542035-test-extension-2-1.0.zip
- Extension with no Background script and a browserAction toolbar button. Clicking the browserAction toolbar button opens a popup with a menu.
Notes about the test extensions:
- For any non-add operations (i.e. edit, remove, remove all), storage items must first be added.
- Any non-add bulk operations will affect all storage items if there are less than 10 in total.
- In
about:config
, setdevtools.storage.extensionStorage.enabled
tofalse
. - Load Test Extension 1 in
about:debugging
. - Open the addon toolbox for Test Extension 1 in
about:debugging
, and select the Storage panel. - Verify "Extension Storage" is not listed in the left sidebar.
- In
about:config
, setdevtools.storage.extensionStorage.enabled
totrue
. - Load Test Extension 1 in
about:debugging
. - Open a page in a new tab (e.g. https://www.mozilla.org/).
- Open the in-page toolbox and select the Storage panel.
- Verify "Extension Storage" is not listed in the left sidebar.
Important: Complete these checks for both Test Extension 1 and Test Extension 2 (referred to as Test Extension below):
- In
about:config
, setdevtools.storage.extensionStorage.enabled
totrue
. - Load Test Extension in
about:debugging
. - If Test Extension 1, open any http(s) page in a new tab (e.g. https://www.mozilla.org/).
- Click the browserAction toolbar icon.
- For each option in the browserAction popup:
- Click an option, e.g. "Background script adds a new storage item" or "browserAction script adds a new storage item".
- Open the addon toolbox for Test Extension in
about:debugging
. - Select the Console panel and note the storage item(s) that is/are modified.
- Open the Storage panel and select the extension under "Extension Storage" in the sidebar.
- Verify the storage data displayed in the panel reflects the modification(s).
- The Storage panel should display the correct data whether the addon toolbox is left open or closed and re-opened each time.
Important: Complete these checks for both Test Extension 1 and Test Extension 2 (referred to as Test Extension below):
- Remove any previous installation of Test Extension 1 and/or Test Extension 2.
- In
about:config
, setdevtools.storage.extensionStorage.enabled
totrue
. - If Test Extension 1, open any http(s) page in a new tab (e.g. https://www.mozilla.org/).
- Load Test Extension in
about:debugging
. - Click the browserAction toolbar icon.
- In the popup, click 'Background script bulk adds several storage items' or 'browserAction script bulk adds several storage items'.
- Open the addon toolbox for Test Extension in
about:debugging
. - Select the Storage panel, and select the extension under "Extension Storage" in the sidebar and note the storage items added.
- Leaving the Storage panel open, disable the extension in
about:addons
. - Enable the extension in
about:addons
. - Verify the storage data in the panel matches the data added prior to disabling the addon.
- Remove any previous installation of Test Extension 1 and/or Test Extension 2.
- In
about:config
, setdevtools.storage.extensionStorage.enabled
totrue
. - Load Test Extension 1 in
about:debugging
. - Open the addon toolbox for Test Extension 1 in
about:debugging
. - Select the Console panel, and for each of the following stringifiable items, verify they are set as a string equivalent in the Storage panel (Note: the Console panel does not always provide helpful error messages for incorrect syntax, so it is recommended to copy these lines over exactly and limit modifications):
await browser.storage.local.set({a: 123});
await browser.storage.local.set({b: true});
await browser.storage.local.set({c: "test"});
await browser.storage.local.set({d: [1, 2]});
await browser.storage.local.set({e: {f: false}});
await browser.storage.local.set({g: null});
Select the Console panel, and for each of the following non-stringifiable items, verify they are set as “Object” in the Storage panel:
await browser.storage.local.set({map: new Map()});
await browser.storage.local.set({set: new Set()});
await browser.storage.local.set({arrayBuffer: new ArrayBuffer(8)});
await browser.storage.local.set({regexp: /regexp/});
await browser.storage.local.set({bigint: 1n})
await browser.storage.local.set({date: new Date()})
- In the same profile as before, download Tree Style Tab from https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/.
- Leaving any new tabs that are created from the install open, open the addon toolbox for Tree Style Tab in
about:debugging
. - Select the Storage panel, and select the extension under "Extension Storage" in the sidebar and note the storage items present.
- For version 3.1.7, you should see something like:
- closeParentBehaviorMode: 1
- configsVersion: 7
- notifiedFeaturesVersion: 3
- In the extension page that opens up, check both checkbox options. Click through the prompts to accept the increased permissions.
- For version 3.1.7, the Storage panel should now have data such as:
- closeParentBehaviorMode: 1
- configsVersion: 7
- notifiedFeaturesVersion: 3
- requestingPermissionsNatively: null
- skipCollapsedTabsForTabSwitchingShortcuts: true
- How to clear the test extension’s storage:
- Since the test extensions are just temporarily installed, simply restart Firefox.
- Note that you will need to re-install the test extension via
about:debugging
.
- What the error,
TypeError: CONTENT_SCRIPT_PORT is null
means:- Make sure you have an http(s):// page loaded in a tab (e.g. https://www.mozilla.org/).
- If the extension has restarted (e.g. disabled/re-enabled, reloaded…) since the page was loaded, you may need to reload the page.