browser_canvas-actor-test-08.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /**
  4. * Tests that integers used in arguments are not cast to their constant, enum value
  5. * forms if the method's signature does not expect an enum. Bug 999687.
  6. */
  7. function* ifTestingSupported() {
  8. let { target, front } = yield initCanvasDebuggerBackend(SIMPLE_BITMASKS_URL);
  9. let navigated = once(target, "navigate");
  10. yield front.setup({ reload: true });
  11. ok(true, "The front was setup up successfully.");
  12. yield navigated;
  13. ok(true, "Target automatically navigated when the front was set up.");
  14. let snapshotActor = yield front.recordAnimationFrame();
  15. let animationOverview = yield snapshotActor.getOverview();
  16. let functionCalls = animationOverview.calls;
  17. is(functionCalls[0].name, "clearRect",
  18. "The first called function's name is correct.");
  19. is(functionCalls[0].argsPreview, "0, 0, 4, 4",
  20. "The first called function's args preview is not cast to enums.");
  21. is(functionCalls[2].name, "fillRect",
  22. "The fillRect called function's name is correct.");
  23. is(functionCalls[2].argsPreview, "0, 0, 1, 1",
  24. "The fillRect called function's args preview is not casted to enums.");
  25. yield removeTab(target.tab);
  26. finish();
  27. }