mirror of
https://github.com/nasa/openmct.git
synced 2025-04-08 03:44:24 +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:
parent
2bbe845f18
commit
790397ae0f
@ -106,6 +106,19 @@ define(
|
||||
expect(mockGL.drawArrays)
|
||||
.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);
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user