Changeset 70794 in webkit
- Timestamp:
- Oct 28, 2010 12:05:41 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70792 r70794 1 2010-10-28 Adrienne Walker <enne@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Add shouldBeDefined function to js-test-pre.js and update 6 context-attributes-etc test to use it. 7 https://bugs.webkit.org/show_bug.cgi?id=47853 8 9 * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt: 10 * fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html: 11 * fast/dom/Window/window-property-descriptors-expected.txt: 12 * fast/js/resources/js-test-pre.js: 13 (shouldBeDefined): 14 1 15 2010-10-28 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
r69996 r70794 7 7 PASS webGL = getWebGL('alphaOn', { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. 8 8 PASS contextAttribs = webGL.getContextAttributes() is non-null. 9 PASS contextAttribs.alpha is non-null.10 PASS contextAttribs.depth is non-null.11 PASS contextAttribs.stencil is non-null.12 PASS contextAttribs.antialias is non-null.13 PASS contextAttribs.premultipliedAlpha is non-null.9 PASS contextAttribs.alpha is defined. 10 PASS contextAttribs.depth is defined. 11 PASS contextAttribs.stencil is defined. 12 PASS contextAttribs.antialias is defined. 13 PASS contextAttribs.premultipliedAlpha is defined. 14 14 PASS pixel is correctColor 15 15 Testing alpha = false 16 16 PASS webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. 17 17 PASS contextAttribs = webGL.getContextAttributes() is non-null. 18 PASS contextAttribs.alpha is non-null.19 PASS contextAttribs.depth is non-null.20 PASS contextAttribs.stencil is non-null.21 PASS contextAttribs.antialias is non-null.22 PASS contextAttribs.premultipliedAlpha is non-null.18 PASS contextAttribs.alpha is defined. 19 PASS contextAttribs.depth is defined. 20 PASS contextAttribs.stencil is defined. 21 PASS contextAttribs.antialias is defined. 22 PASS contextAttribs.premultipliedAlpha is defined. 23 23 PASS pixel is correctColor 24 24 Testing depth = true 25 25 PASS webGL = getWebGL('depthOn', { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 26 26 PASS contextAttribs = webGL.getContextAttributes() is non-null. 27 PASS contextAttribs.depth is non-null.28 PASS contextAttribs.alpha is non-null.29 PASS contextAttribs.stencil is non-null.30 PASS contextAttribs.antialias is non-null.31 PASS contextAttribs.premultipliedAlpha is non-null.27 PASS contextAttribs.depth is defined. 28 PASS contextAttribs.alpha is defined. 29 PASS contextAttribs.stencil is defined. 30 PASS contextAttribs.antialias is defined. 31 PASS contextAttribs.premultipliedAlpha is defined. 32 32 PASS pixel is correctColor 33 33 Testing depth = false 34 34 PASS webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 35 35 PASS contextAttribs = webGL.getContextAttributes() is non-null. 36 PASS contextAttribs.depth is non-null.37 PASS contextAttribs.alpha is non-null.38 PASS contextAttribs.stencil is non-null.39 PASS contextAttribs.antialias is non-null.40 PASS contextAttribs.premultipliedAlpha is non-null.36 PASS contextAttribs.depth is defined. 37 PASS contextAttribs.alpha is defined. 38 PASS contextAttribs.stencil is defined. 39 PASS contextAttribs.antialias is defined. 40 PASS contextAttribs.premultipliedAlpha is defined. 41 41 PASS pixel is correctColor 42 42 Testing stencil = true 43 43 PASS webGL = getWebGL('stencilOn', { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 44 44 PASS contextAttribs = webGL.getContextAttributes() is non-null. 45 PASS contextAttribs.depth is non-null.46 PASS contextAttribs.alpha is non-null.47 PASS contextAttribs.stencil is non-null.48 PASS contextAttribs.antialias is non-null.49 PASS contextAttribs.premultipliedAlpha is non-null.45 PASS contextAttribs.depth is defined. 46 PASS contextAttribs.alpha is defined. 47 PASS contextAttribs.stencil is defined. 48 PASS contextAttribs.antialias is defined. 49 PASS contextAttribs.premultipliedAlpha is defined. 50 50 PASS pixel is correctColor 51 51 Testing stencil = false 52 52 PASS webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 53 53 PASS contextAttribs = webGL.getContextAttributes() is non-null. 54 PASS contextAttribs.depth is non-null.55 PASS contextAttribs.alpha is non-null.56 PASS contextAttribs.stencil is non-null.57 PASS contextAttribs.antialias is non-null.58 PASS contextAttribs.premultipliedAlpha is non-null.54 PASS contextAttribs.depth is defined. 55 PASS contextAttribs.alpha is defined. 56 PASS contextAttribs.stencil is defined. 57 PASS contextAttribs.antialias is defined. 58 PASS contextAttribs.premultipliedAlpha is defined. 59 59 PASS pixel is correctColor 60 60 Testing antialias = true 61 61 PASS webGL = getWebGL('antialiasOn', { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 62 62 PASS contextAttribs = webGL.getContextAttributes() is non-null. 63 PASS contextAttribs.depth is non-null.64 PASS contextAttribs.alpha is non-null.65 PASS contextAttribs.stencil is non-null.66 PASS contextAttribs.antialias is non-null.67 PASS contextAttribs.premultipliedAlpha is non-null.63 PASS contextAttribs.depth is defined. 64 PASS contextAttribs.alpha is defined. 65 PASS contextAttribs.stencil is defined. 66 PASS contextAttribs.antialias is defined. 67 PASS contextAttribs.premultipliedAlpha is defined. 68 68 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias 69 69 Testing antialias = false 70 70 PASS webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. 71 71 PASS contextAttribs = webGL.getContextAttributes() is non-null. 72 PASS contextAttribs.depth is non-null.73 PASS contextAttribs.alpha is non-null.74 PASS contextAttribs.stencil is non-null.75 PASS contextAttribs.antialias is non-null.76 PASS contextAttribs.premultipliedAlpha is non-null.72 PASS contextAttribs.depth is defined. 73 PASS contextAttribs.alpha is defined. 74 PASS contextAttribs.stencil is defined. 75 PASS contextAttribs.antialias is defined. 76 PASS contextAttribs.premultipliedAlpha is defined. 77 77 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias 78 78 PASS successfullyParsed is true -
trunk/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
r70414 r70794 141 141 shouldBeNonNull("webGL = getWebGL('alphaOff', { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)"); 142 142 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 143 shouldBe NonNull("contextAttribs.alpha");144 shouldBe NonNull("contextAttribs.depth");145 shouldBe NonNull("contextAttribs.stencil");146 shouldBe NonNull("contextAttribs.antialias");147 shouldBe NonNull("contextAttribs.premultipliedAlpha");143 shouldBeDefined("contextAttribs.alpha"); 144 shouldBeDefined("contextAttribs.depth"); 145 shouldBeDefined("contextAttribs.stencil"); 146 shouldBeDefined("contextAttribs.antialias"); 147 shouldBeDefined("contextAttribs.premultipliedAlpha"); 148 148 149 149 var buf = new Uint8Array(1 * 1 * 4); … … 165 165 shouldBeNonNull("webGL = getWebGL('depthOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 166 166 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 167 shouldBe NonNull("contextAttribs.depth");168 shouldBe NonNull("contextAttribs.alpha");169 shouldBe NonNull("contextAttribs.stencil");170 shouldBe NonNull("contextAttribs.antialias");171 shouldBe NonNull("contextAttribs.premultipliedAlpha");167 shouldBeDefined("contextAttribs.depth"); 168 shouldBeDefined("contextAttribs.alpha"); 169 shouldBeDefined("contextAttribs.stencil"); 170 shouldBeDefined("contextAttribs.antialias"); 171 shouldBeDefined("contextAttribs.premultipliedAlpha"); 172 172 173 173 webGL.depthFunc(webGL.NEVER); … … 205 205 shouldBeNonNull("webGL = getWebGL('stencilOff', { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 206 206 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 207 shouldBe NonNull("contextAttribs.depth");208 shouldBe NonNull("contextAttribs.alpha");209 shouldBe NonNull("contextAttribs.stencil");210 shouldBe NonNull("contextAttribs.antialias");211 shouldBe NonNull("contextAttribs.premultipliedAlpha");207 shouldBeDefined("contextAttribs.depth"); 208 shouldBeDefined("contextAttribs.alpha"); 209 shouldBeDefined("contextAttribs.stencil"); 210 shouldBeDefined("contextAttribs.antialias"); 211 shouldBeDefined("contextAttribs.premultipliedAlpha"); 212 212 213 213 webGL.depthFunc(webGL.ALWAYS); … … 248 248 shouldBeNonNull("webGL = getWebGL('antialiasOff', { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0)"); 249 249 shouldBeNonNull("contextAttribs = webGL.getContextAttributes()"); 250 shouldBe NonNull("contextAttribs.depth");251 shouldBe NonNull("contextAttribs.alpha");252 shouldBe NonNull("contextAttribs.stencil");253 shouldBe NonNull("contextAttribs.antialias");254 shouldBe NonNull("contextAttribs.premultipliedAlpha");250 shouldBeDefined("contextAttribs.depth"); 251 shouldBeDefined("contextAttribs.alpha"); 252 shouldBeDefined("contextAttribs.stencil"); 253 shouldBeDefined("contextAttribs.antialias"); 254 shouldBeDefined("contextAttribs.premultipliedAlpha"); 255 255 256 256 var vertices = new Float32Array([ -
trunk/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
r69553 r70794 461 461 PASS typeof Object.getOwnPropertyDescriptor(window, 'sessionStorage') is 'object' 462 462 PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBe') is 'object' 463 PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeDefined') is 'object' 463 464 PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeEqualToString') is 'object' 464 465 PASS typeof Object.getOwnPropertyDescriptor(window, 'shouldBeFalse') is 'object' -
trunk/LayoutTests/fast/js/resources/js-test-pre.js
r69138 r70794 220 220 } 221 221 222 function shouldBeDefined(_a) 223 { 224 var exception; 225 var _av; 226 try { 227 _av = eval(_a); 228 } catch (e) { 229 exception = e; 230 } 231 232 if (exception) 233 testFailed(_a + " should be defined. Threw exception " + exception); 234 else if (_av !== undefined) 235 testPassed(_a + " is defined."); 236 else 237 testFailed(_a + " should be defined. Was " + _av); 238 } 239 222 240 function shouldBeGreaterThanOrEqual(_a, _b) { 223 241 if (typeof _a != "string" || typeof _b != "string")
Note: See TracChangeset
for help on using the changeset viewer.