browser_dom_refresh.js (827B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const TEST_PAGE_URL = URL_ROOT + "page_basic.html"; 7 8 /** 9 * Basic test that checks the Refresh action in DOM panel. 10 */ 11 add_task(async function () { 12 info("Test DOM panel basic started"); 13 14 const { panel } = await addTestTab(TEST_PAGE_URL); 15 16 // Create a new variable in the page scope and refresh the panel. 17 await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { 18 content.wrappedJSObject._b = 10; 19 }); 20 21 await refreshPanel(panel); 22 23 // Verify that the variable is displayed now. 24 const row = getRowByLabel(panel, "_b"); 25 ok(row, "New variable must be displayed"); 26 27 await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { 28 delete content.wrappedJSObject._b; 29 }); 30 });