mirror of
https://github.com/nasa/openmct.git
synced 2025-06-11 20:01:41 +00:00
[Plot] Add test for buffer size
Add test case for usage of drawing buffer size as reported by WebGL (instead of assuming we always got the full size we requested.) WTD-852.
This commit is contained in:
@ -106,6 +106,19 @@ define(
|
|||||||
expect(mockGL.drawArrays)
|
expect(mockGL.drawArrays)
|
||||||
.toHaveBeenCalledWith("TRIANGLE_FAN", 0, 4);
|
.toHaveBeenCalledWith("TRIANGLE_FAN", 0, 4);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("uses buffer sizes reported by WebGL", function () {
|
||||||
|
// Make sure that GLChart uses the GL buffer size, which may
|
||||||
|
// differ from what canvas requested. WTD-852
|
||||||
|
mockCanvas.width = 300;
|
||||||
|
mockCanvas.height = 150;
|
||||||
|
mockGL.drawingBufferWidth = 200;
|
||||||
|
mockGL.drawingBufferHeight = 175;
|
||||||
|
|
||||||
|
glChart.clear();
|
||||||
|
|
||||||
|
expect(mockGL.viewport).toHaveBeenCalledWith(0, 0, 200, 175);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
Reference in New Issue
Block a user