- a/LayoutTests/ChangeLog +12 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2021-01-22  Kimmo Kinnunen  <kkinnunen@apple.com>
2
3
        WebGL powerPreference is not tested
4
        https://bugs.webkit.org/show_bug.cgi?id=220846
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        WIP: placeholder
9
10
        * fast/canvas/webgl/high-performance-context-expected.txt: Added.
11
        * fast/canvas/webgl/high-performance-context.html: Added.
12
1
2021-01-15  Chris Fleizach  <cfleizach@apple.com>
13
2021-01-15  Chris Fleizach  <cfleizach@apple.com>
2
14
3
        AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
15
        AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
- a/LayoutTests/fast/canvas/webgl/high-performance-context-expected.txt +11 lines
Line 0 a/LayoutTests/fast/canvas/webgl/high-performance-context-expected.txt_sec1
1
Tests that a high-performance contexts do not fail.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
PASS gl.getContextAttributes().powerPreference is "high-performance"
6
PASS program != null is true
7
PASS getError was expected value: NO_ERROR : Should be no errors from setup.
8
PASS successfullyParsed is true
9
10
TEST COMPLETE
11
- a/LayoutTests/fast/canvas/webgl/high-performance-context.html +41 lines
Line 0 a/LayoutTests/fast/canvas/webgl/high-performance-context.html_sec1
1
<!DOCTYPE html>
2
<html>
3
  <head>
4
  <meta charset="utf-8">
5
    <title>High performance WebGL context test</title>
6
    <script src="../../../resources/js-test.js"></script>
7
    <script src="resources/webgl-test.js"> </script>
8
    <script src="resources/webgl-test-utils.js"> </script>
9
</head>
10
<body>
11
<div id="description"></div>
12
<div id="console"></div>
13
<script>
14
description("Tests that a high-performance contexts do not fail.");
15
if (window.testRunner) {
16
    testRunner.dumpAsText();
17
    testRunner.waitUntilDone();
18
}
19
var wtu = WebGLTestUtils;
20
var canvas = document.createElement('canvas');
21
canvas.addEventListener("webglcontextchanged", () => {
22
    testRunner.notifyDone();
23
}, false);
24
var gl = wtu.create3DContext(canvas, { powerPreference: "high-performance" });
25
shouldBe("gl.getContextAttributes().powerPreference", '"high-performance"');
26
canvas.width = 200;
27
canvas.height = 200;
28
gl.viewport(0, 0, 0, 0);
29
var program = wtu.setupTexturedQuad(gl);
30
shouldBeTrue("program != null");
31
var tex = gl.createTexture();
32
gl.bindTexture(gl.TEXTURE_2D, tex);
33
var pixel = new Uint8Array([0, 255, 0, 255]);
34
gl.texImage2D(
35
  gl.TEXTURE_2D, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
36
wtu.drawQuad(gl);
37
38
glErrorShouldBe(gl, gl.NO_ERROR, "Should be no errors from setup.");
39
</script>
40
</body>
41
</html>

Return to Bug 220846