browser_callwatcher-01.js 825 B

123456789101112131415161718192021222324252627
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /**
  4. * Bug 1130901
  5. * Tests to ensure that calling call/apply on methods wrapped
  6. * via CallWatcher do not throw a security permissions error:
  7. * "Error: Permission denied to access property 'call'"
  8. */
  9. const BUG_1130901_URL = EXAMPLE_URL + "doc_bug_1130901.html";
  10. add_task(function* () {
  11. let { target, panel } = yield initWebAudioEditor(BUG_1130901_URL);
  12. let { panelWin } = panel;
  13. let { gFront, $, $$, EVENTS, gAudioNodes } = panelWin;
  14. let rendered = waitForGraphRendered(panelWin, 3, 0);
  15. reload(target);
  16. yield rendered;
  17. ok(true, "Successfully created a node from AudioContext via `call`.");
  18. ok(true, "Successfully created a node from AudioContext via `apply`.");
  19. yield teardown(target);
  20. });