Skip to content

Commit 1c60ae6

Browse files
committed
Close webgl dedicated test in canvas mode
1 parent 7d730d7 commit 1c60ae6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/js-tests/src/ParticleTest/ParticleTest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ var particleSceneArr = [
138138
}
139139
];
140140

141-
if( 'opengl' in cc.sys.capabilities ){
141+
if( 'opengl' in cc.sys.capabilities && cc._renderType === cc.game.RENDER_TYPE_WEBGL){
142142
particleSceneArr.push( function () {
143143
return new ParallaxParticle();
144144
});

tests/js-tests/src/RenderTextureTest/RenderTextureTest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ var arrayOfRenderTextureTest = [
673673
Issue1464
674674
];
675675

676-
if(('opengl' in cc.sys.capabilities) && (!cc.sys.isNative) ){
676+
if(('opengl' in cc.sys.capabilities) && (!cc.sys.isNative) && cc._renderType === cc.game.RENDER_TYPE_WEBGL){
677677
arrayOfRenderTextureTest.push(RenderTextureIssue937);
678678
arrayOfRenderTextureTest.push(RenderTextureZbuffer);
679679
arrayOfRenderTextureTest.push(RenderTextureTestDepthStencil);

tests/js-tests/src/SpriteTest/SpriteTest.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ var SpriteZVertex = SpriteTestDemo.extend({
977977
this._super(cc.color(255, 0, 0, 80), cc.color(255, 98, 117, 20));
978978

979979

980-
if ("opengl" in cc.sys.capabilities) {
980+
if ("opengl" in cc.sys.capabilities && cc._renderType === cc.game.RENDER_TYPE_WEBGL) {
981981

982982
gl.enable(gl.DEPTH_TEST);
983983
//

0 commit comments

Comments
 (0)