browser_dom_refresh.js 699 B

12345678910111213141516171819202122232425
  1. /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
  2. /* Any copyright is dedicated to the Public Domain.
  3. * http://creativecommons.org/publicdomain/zero/1.0/ */
  4. "use strict";
  5. const TEST_PAGE_URL = URL_ROOT + "page_basic.html";
  6. /**
  7. * Basic test that checks the Refresh action in DOM panel.
  8. */
  9. add_task(function* () {
  10. info("Test DOM panel basic started");
  11. let { panel } = yield addTestTab(TEST_PAGE_URL);
  12. // Create a new variable in the page scope and refresh the panel.
  13. yield evaluateJSAsync(panel, "var _b = 10");
  14. yield refreshPanel(panel);
  15. // Verify that the variable is displayed now.
  16. let row = getRowByLabel(panel, "_b");
  17. ok(row, "New variable must be displayed");
  18. });