Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/incorrect-context-object-behaviour.html

Issue 1601093008: Remove duplicated WebGL layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script src="resources/webgl-test.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9
10 <script>
11 description("Tests calling WebGL APIs with objects from other contexts");
12
13 if (window.internals)
14 window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
15
16 var contextA = create3DContext();
17 var contextB = create3DContext();
18 var programA = loadStandardProgram(contextA);
19 var programB = loadStandardProgram(contextB);
20 var shaderA = loadStandardVertexShader(contextA);
21 var shaderB = loadStandardVertexShader(contextB);
22 var textureA = contextA.createTexture();
23 var textureB = contextB.createTexture();
24 var frameBufferA = contextA.createFramebuffer();
25 var frameBufferB = contextB.createFramebuffer();
26 var renderBufferA = contextA.createRenderbuffer();
27 var renderBufferB = contextB.createRenderbuffer();
28 var locationA = contextA.getUniformLocation(programA, 'u_modelViewProjMatrix');
29 var locationB = contextB.getUniformLocation(programB, 'u_modelViewProjMatrix');
30
31 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.compileSha der(shaderB)");
32 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.linkProgra m(programB)");
33 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShad er(programA, shaderB)");
34 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShad er(programB, shaderA)");
35 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.attachShad er(programB, shaderB)");
36 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShad er(programA, shaderB)");
37 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShad er(programB, shaderA)");
38 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.detachShad er(programB, shaderB)");
39 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.shaderSour ce(shaderB, 'foo')");
40 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindAttrib Location(programB, 0, 'foo')");
41 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindFrameb uffer(contextA.FRAMEBUFFER, frameBufferB)");
42 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindRender buffer(contextA.RENDERBUFFER, renderBufferB)");
43 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.bindTextur e(contextA.TEXTURE_2D, textureB)");
44 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.framebuffe rRenderbuffer(contextA.FRAMEBUFFER, contextA.DEPTH_ATTACHMENT, contextA.RENDERBU FFER, renderBufferB)");
45 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.framebuffe rTexture2D(contextA.FRAMEBUFFER, contextA.COLOR_ATTACHMENT0, contextA.TEXTURE_2D , textureB, 0)");
46 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getProgram Parameter(programB, 0)");
47 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getProgram InfoLog(programB, 0)");
48 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderP arameter(shaderB, 0)");
49 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderI nfoLog(shaderB, 0)");
50 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getShaderS ource(shaderB)");
51 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform (programB, locationA)");
52 shouldGenerateGLError(contextA, contextA.INVALID_OPERATION, "contextA.getUniform Location(programB, 'u_modelViewProjMatrix')");
53 </script>
54
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698