browser_wa_controller-01.js 742 B

1234567891011121314151617181920212223242526272829
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /**
  4. * Bug 1125817
  5. * Tests to ensure that disconnecting a node immediately
  6. * after creating it does not fail.
  7. */
  8. const BUG_1125817_URL = EXAMPLE_URL + "doc_bug_1125817.html";
  9. add_task(function* () {
  10. let { target, panel } = yield initWebAudioEditor(BUG_1125817_URL);
  11. let { panelWin } = panel;
  12. let { gFront, $, $$, EVENTS, gAudioNodes } = panelWin;
  13. let events = Promise.all([
  14. once(gAudioNodes, "add", 2),
  15. once(gAudioNodes, "disconnect"),
  16. waitForGraphRendered(panelWin, 2, 0)
  17. ]);
  18. reload(target);
  19. yield events;
  20. ok(true, "Successfully disconnected a just-created node.");
  21. yield teardown(target);
  22. });