browser_webgl-actor-test-03.js 724 B

123456789101112131415161718192021222324252627
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /**
  4. * Tests if notifications about WebGL programs being linked are sent
  5. * after a target navigation.
  6. */
  7. function* ifWebGLSupported() {
  8. let { target, front } = yield initBackend(SIMPLE_CANVAS_URL);
  9. let navigated = once(target, "navigate");
  10. let linked = once(front, "program-linked");
  11. yield front.setup({ reload: true });
  12. ok(true, "The front was setup up successfully.");
  13. yield navigated;
  14. ok(true, "Target automatically navigated when the front was set up.");
  15. yield linked;
  16. ok(true, "A 'program-linked' notification was sent after reloading.");
  17. yield removeTab(target.tab);
  18. finish();
  19. }