OLD | NEW |
(Empty) | |
| 1 /* |
| 2 Unit testing library for the OpenGL ES 2.0 HTML Canvas context |
| 3 */ |
| 4 |
| 5 /* |
| 6 ** Copyright (c) 2012 The Khronos Group Inc. |
| 7 ** |
| 8 ** Permission is hereby granted, free of charge, to any person obtaining a |
| 9 ** copy of this software and/or associated documentation files (the |
| 10 ** "Materials"), to deal in the Materials without restriction, including |
| 11 ** without limitation the rights to use, copy, modify, merge, publish, |
| 12 ** distribute, sublicense, and/or sell copies of the Materials, and to |
| 13 ** permit persons to whom the Materials are furnished to do so, subject to |
| 14 ** the following conditions: |
| 15 ** |
| 16 ** The above copyright notice and this permission notice shall be included |
| 17 ** in all copies or substantial portions of the Materials. |
| 18 ** |
| 19 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 22 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 23 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 24 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 25 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
| 26 */ |
| 27 |
| 28 /* -- plaform specific code -- */ |
| 29 |
| 30 // WebKit |
| 31 if (window.testRunner && !window.layoutTestController) { |
| 32 window.layoutTestController = window.testRunner; |
| 33 } |
| 34 |
| 35 if (window.layoutTestController) { |
| 36 layoutTestController.overridePreference("WebKitWebGLEnabled", "1"); |
| 37 layoutTestController.dumpAsText(); |
| 38 layoutTestController.waitUntilDone(); |
| 39 |
| 40 // The WebKit testing system compares console output. |
| 41 // Because the output of the WebGL Tests is GPU dependent |
| 42 // we turn off console messages. |
| 43 window.console.log = function() { }; |
| 44 window.console.error = function() { }; |
| 45 |
| 46 // RAF doesn't work in LayoutTests. Disable it so the tests will |
| 47 // use setTimeout instead. |
| 48 window.requestAnimationFrame = undefined; |
| 49 window.webkitRequestAnimationFrame = undefined; |
| 50 } |
| 51 |
| 52 if (window.internals) { |
| 53 window.internals.settings.setWebGLErrorsToConsoleEnabled(false); |
| 54 } |
| 55 |
| 56 /* -- end platform specific code --*/ |
| 57 Tests = { |
| 58 autorun : true, |
| 59 message : null, |
| 60 delay : 0, |
| 61 |
| 62 startUnit : function(){ return []; }, |
| 63 setup : function() { return arguments; }, |
| 64 teardown : function() {}, |
| 65 endUnit : function() {} |
| 66 } |
| 67 |
| 68 var __testSuccess__ = true; |
| 69 var __testFailCount__ = 0; |
| 70 var __testLog__; |
| 71 var __backlog__ = []; |
| 72 |
| 73 Object.toSource = function(a, seen){ |
| 74 if (a == null) return "null"; |
| 75 if (typeof a == 'boolean') return a ? "true" : "false"; |
| 76 if (typeof a == 'string') return '"' + a.replace(/"/g, '\\"') + '"'; |
| 77 if (a instanceof HTMLElement) return a.toString(); |
| 78 if (a.width && a.height && a.data) return "[ImageData]"; |
| 79 if (a instanceof Array) { |
| 80 if (!seen) seen = []; |
| 81 var idx = seen.indexOf(a); |
| 82 if (idx != -1) return '#'+(idx+1)+'#'; |
| 83 seen.unshift(a); |
| 84 var srcs = a.map(function(o){ return Object.toSource(o,seen) }); |
| 85 var prefix = ''; |
| 86 idx = seen.indexOf(a); |
| 87 if (idx != -1) prefix = '#'+(idx+1)+'='; |
| 88 return prefix + '[' + srcs.join(", ") + ']'; |
| 89 } |
| 90 if (typeof a == 'object') { |
| 91 if (!seen) seen = []; |
| 92 var idx = seen.indexOf(a); |
| 93 if (idx != -1) return '#'+(idx+1)+'#'; |
| 94 seen.unshift(a); |
| 95 var members = []; |
| 96 var name; |
| 97 try { |
| 98 for (var i in a) { |
| 99 if (i.search(/^[a-zA-Z0-9]+$/) != -1) |
| 100 name = i; |
| 101 else |
| 102 name = '"' + i.replace(/"/g, '\\"') + '"'; |
| 103 var ai; |
| 104 try { ai = a[i]; } |
| 105 catch(e) { ai = 'null /*ERROR_ACCESSING*/'; } |
| 106 var s = name + ':' + Object.toSource(ai, seen); |
| 107 members.push(s); |
| 108 } |
| 109 } catch (e) {} |
| 110 var prefix = ''; |
| 111 idx = seen.indexOf(a); |
| 112 if (idx != -1) prefix = '#'+(idx+1)+'='; |
| 113 return prefix + '{' + members.join(", ") + '}' |
| 114 } |
| 115 if (typeof a == 'function') |
| 116 return '('+a.toString().replace(/\n/g, " ").replace(/\s+/g, " ")+')'; |
| 117 return a.toString(); |
| 118 } |
| 119 |
| 120 function formatError(e) { |
| 121 if (window.console) console.log(e); |
| 122 var pathSegs = location.href.toString().split("/"); |
| 123 var currentDoc = e.lineNumber != null ? pathSegs[pathSegs.length - 1] : null; |
| 124 var trace = (e.filename || currentDoc) + ":" + e.lineNumber + (e.trace ? "\n"+
e.trace : ""); |
| 125 return e.message + "\n" + trace; |
| 126 } |
| 127 |
| 128 function runTests() { |
| 129 var h = document.getElementById('test-status'); |
| 130 if (h == null) { |
| 131 h = document.createElement('h1'); |
| 132 h.id = 'test-status'; |
| 133 document.body.appendChild(h); |
| 134 } |
| 135 h.textContent = ""; |
| 136 var log = document.getElementById('test-log'); |
| 137 if (log == null) { |
| 138 log = document.createElement('div'); |
| 139 log.id = 'test-log'; |
| 140 document.body.appendChild(log); |
| 141 } |
| 142 while (log.childNodes.length > 0) |
| 143 log.removeChild(log.firstChild); |
| 144 |
| 145 var setup_args = []; |
| 146 |
| 147 if (Tests.startUnit != null) { |
| 148 __testLog__ = document.createElement('div'); |
| 149 try { |
| 150 setup_args = Tests.startUnit(); |
| 151 if (__testLog__.childNodes.length > 0) |
| 152 log.appendChild(__testLog__); |
| 153 } catch(e) { |
| 154 testFailed("startUnit", formatError(e)); |
| 155 log.appendChild(__testLog__); |
| 156 printTestStatus(); |
| 157 return; |
| 158 } |
| 159 } |
| 160 |
| 161 var testsRun = false; |
| 162 var allTestsSuccessful = true; |
| 163 |
| 164 for (var i in Tests) { |
| 165 if (i.substring(0,4) != "test") continue; |
| 166 __testLog__ = document.createElement('div'); |
| 167 __testSuccess__ = true; |
| 168 try { |
| 169 doTestNotify (i); |
| 170 var args = setup_args; |
| 171 if (Tests.setup != null) |
| 172 args = Tests.setup.apply(Tests, setup_args); |
| 173 Tests[i].apply(Tests, args); |
| 174 if (Tests.teardown != null) |
| 175 Tests.teardown.apply(Tests, args); |
| 176 } |
| 177 catch (e) { |
| 178 testFailed(i, e.name, formatError(e)); |
| 179 } |
| 180 if (__testSuccess__ == false) { |
| 181 ++__testFailCount__; |
| 182 } |
| 183 var h = document.createElement('h2'); |
| 184 h.textContent = i; |
| 185 __testLog__.insertBefore(h, __testLog__.firstChild); |
| 186 log.appendChild(__testLog__); |
| 187 allTestsSuccessful = allTestsSuccessful && __testSuccess__ == true; |
| 188 reportTestResultsToHarness(__testSuccess__, i); |
| 189 doTestNotify (i+"--"+(__testSuccess__?"OK":"FAIL")); |
| 190 testsRun = true; |
| 191 } |
| 192 |
| 193 printTestStatus(testsRun); |
| 194 if (Tests.endUnit != null) { |
| 195 __testLog__ = document.createElement('div'); |
| 196 try { |
| 197 Tests.endUnit.apply(Tests, setup_args); |
| 198 if (__testLog__.childNodes.length > 0) |
| 199 log.appendChild(__testLog__); |
| 200 } catch(e) { |
| 201 testFailed("endUnit", e.name, formatError(e)); |
| 202 log.appendChild(__testLog__); |
| 203 } |
| 204 } |
| 205 notifyFinishedToHarness(allTestsSuccessful, "finished tests"); |
| 206 } |
| 207 |
| 208 function doTestNotify(name) { |
| 209 //try { |
| 210 // var xhr = new XMLHttpRequest(); |
| 211 // xhr.open("GET", "http://localhost:8888/"+name, true); |
| 212 // xhr.send(null); |
| 213 //} catch(e) {} |
| 214 } |
| 215 |
| 216 function testFailed(assertName, name) { |
| 217 var d = document.createElement('div'); |
| 218 var h = document.createElement('h3'); |
| 219 var d1 = document.createElement("span"); |
| 220 h.appendChild(d1); |
| 221 d1.appendChild(document.createTextNode("FAIL: ")); |
| 222 d1.style.color = "red"; |
| 223 h.appendChild(document.createTextNode( |
| 224 name==null ? assertName : name + " (in " + assertName + ")")); |
| 225 d.appendChild(h); |
| 226 var args = [] |
| 227 for (var i=2; i<arguments.length; i++) { |
| 228 var a = arguments[i]; |
| 229 var p = document.createElement('p'); |
| 230 p.style.whiteSpace = 'pre'; |
| 231 p.textContent = (a == null) ? "null" : |
| 232 (typeof a == 'boolean' || typeof a == 'string') ? a : Object
.toSource(a); |
| 233 args.push(p.textContent); |
| 234 d.appendChild(p); |
| 235 } |
| 236 __testLog__.appendChild(d); |
| 237 __testSuccess__ = false; |
| 238 doTestNotify([assertName, name].concat(args).join("--")); |
| 239 } |
| 240 |
| 241 function testPassed(assertName, name) { |
| 242 var d = document.createElement('div'); |
| 243 var h = document.createElement('h3'); |
| 244 var d1 = document.createElement("span"); |
| 245 h.appendChild(d1); |
| 246 d1.appendChild(document.createTextNode("PASS: ")); |
| 247 d1.style.color = "green"; |
| 248 h.appendChild(document.createTextNode( |
| 249 name==null ? assertName : name + " (in " + assertName + ")")); |
| 250 d.appendChild(h); |
| 251 var args = [] |
| 252 for (var i=2; i<arguments.length; i++) { |
| 253 var a = arguments[i]; |
| 254 var p = document.createElement('p'); |
| 255 p.style.whiteSpace = 'pre'; |
| 256 p.textContent = (a == null) ? "null" : |
| 257 (typeof a == 'boolean' || typeof a == 'string') ? a : Object
.toSource(a); |
| 258 args.push(p.textContent); |
| 259 d.appendChild(p); |
| 260 } |
| 261 __testLog__.appendChild(d); |
| 262 doTestNotify([assertName, name].concat(args).join("--")); |
| 263 } |
| 264 |
| 265 function checkTestSuccess() { |
| 266 return __testFailCount__ == 0; |
| 267 } |
| 268 |
| 269 window.addEventListener('load', function(){ |
| 270 for (var i=0; i<__backlog__.length; i++) |
| 271 log(__backlog__[i]); |
| 272 }, false); |
| 273 |
| 274 function log(msg) { |
| 275 var p = document.createElement('p'); |
| 276 var a = []; |
| 277 for (var i=0; i<arguments.length; i++) |
| 278 a.push(arguments[i]); |
| 279 p.textContent = a.join(", "); |
| 280 if (!__testLog__) { |
| 281 if (document.body) |
| 282 document.body.appendChild(p); |
| 283 else |
| 284 __backlog__.push(msg); |
| 285 } else { |
| 286 __testLog__.appendChild(p); |
| 287 } |
| 288 } |
| 289 |
| 290 function printTestStatus(testsRun) { |
| 291 var status = document.getElementById('test-status'); |
| 292 if (testsRun) { |
| 293 status.className = checkTestSuccess() ? 'ok' : 'fail'; |
| 294 status.textContent = checkTestSuccess() ? "PASS" : "FAIL"; |
| 295 } else { |
| 296 status.className = 'fail'; |
| 297 status.textContent = "NO TESTS FOUND"; |
| 298 } |
| 299 } |
| 300 |
| 301 function assertFail(name, f) { |
| 302 if (f == null) { f = name; name = null; } |
| 303 var r = false; |
| 304 try { f(); } catch(e) { r=true; } |
| 305 if (!r) { |
| 306 testFailed("assertFail", name, f); |
| 307 return false; |
| 308 } else { |
| 309 testPassed("assertFail", name, f); |
| 310 return true; |
| 311 } |
| 312 } |
| 313 |
| 314 function assertOk(name, f) { |
| 315 if (f == null) { f = name; name = null; } |
| 316 var r = false; |
| 317 var err; |
| 318 try { f(); r=true; } catch(e) { err = e; } |
| 319 if (!r) { |
| 320 testFailed("assertOk", name, f, err.toString()); |
| 321 return false; |
| 322 } else { |
| 323 testPassed("assertOk", name, f); |
| 324 return true; |
| 325 } |
| 326 } |
| 327 |
| 328 function assert(name, v) { |
| 329 if (v == null) { v = name; name = null; } |
| 330 if (!v) { |
| 331 testFailed("assert", name, v); |
| 332 return false; |
| 333 } else { |
| 334 testPassed("assert", name, v); |
| 335 return true; |
| 336 } |
| 337 } |
| 338 |
| 339 function assertProperty(name, v, p) { |
| 340 if (p == null) { p = v; v = name; name = p; } |
| 341 if (v[p] == null) { |
| 342 testFailed("assertProperty", name); |
| 343 return false; |
| 344 } else { |
| 345 testPassed("assertProperty", name); |
| 346 return true; |
| 347 } |
| 348 } |
| 349 |
| 350 function compare(a,b) { |
| 351 if (typeof a == 'number' && typeof b == 'number') { |
| 352 return a == b; |
| 353 } else { |
| 354 return Object.toSource(a) == Object.toSource(b); |
| 355 } |
| 356 } |
| 357 |
| 358 function assertEquals(name, v, p) { |
| 359 if (p == null) { p = v; v = name; name = null; } |
| 360 if (!compare(v, p)) { |
| 361 testFailed("assertEquals", name, v, p); |
| 362 return false; |
| 363 } else { |
| 364 testPassed("assertEquals", name, v, p); |
| 365 return true; |
| 366 } |
| 367 } |
| 368 |
| 369 function assertArrayEquals(name, v, p) { |
| 370 if (p == null) { p = v; v = name; name = null; } |
| 371 if (!v) { |
| 372 testFailed("assertArrayEquals: first array undefined", name, v, p); |
| 373 return false; |
| 374 } |
| 375 if (!p) { |
| 376 testFailed("assertArrayEquals: second array undefined", name, v, p); |
| 377 return false; |
| 378 } |
| 379 if (v.length != p.length) { |
| 380 testFailed("assertArrayEquals", name, v, p); |
| 381 return false; |
| 382 } |
| 383 for (var ii = 0; ii < v.length; ++ii) { |
| 384 if (v[ii] != p[ii]) { |
| 385 testFailed("assertArrayEquals", name, v, p); |
| 386 return false; |
| 387 } |
| 388 } |
| 389 testPassed("assertArrayEquals", name, v, p); |
| 390 return true; |
| 391 } |
| 392 |
| 393 function assertNotEquals(name, v, p) { |
| 394 if (p == null) { p = v; v = name; name = null; } |
| 395 if (compare(v, p)) { |
| 396 testFailed("assertNotEquals", name, v, p) |
| 397 return false; |
| 398 } else { |
| 399 testPassed("assertNotEquals", name, v, p) |
| 400 return true; |
| 401 } |
| 402 } |
| 403 |
| 404 function time(elementId, f) { |
| 405 var s = document.getElementById(elementId); |
| 406 var t0 = new Date().getTime(); |
| 407 f(); |
| 408 var t1 = new Date().getTime(); |
| 409 s.textContent = 'Elapsed: '+(t1-t0)+' ms'; |
| 410 } |
| 411 |
| 412 function randomFloat () { |
| 413 // note that in fuzz-testing, this can used as the size of a buffer to alloc
ate. |
| 414 // so it shouldn't return astronomic values. The maximum value 10000000 is a
lready quite big. |
| 415 var fac = 1.0; |
| 416 var r = Math.random(); |
| 417 if (r < 0.25) |
| 418 fac = 10; |
| 419 else if (r < 0.4) |
| 420 fac = 100; |
| 421 else if (r < 0.5) |
| 422 fac = 1000; |
| 423 else if (r < 0.6) |
| 424 fac = 100000; |
| 425 else if (r < 0.7) |
| 426 fac = 10000000; |
| 427 else if (r < 0.8) |
| 428 fac = NaN; |
| 429 return -0.5*fac + Math.random() * fac; |
| 430 } |
| 431 function randomFloatFromRange(lo, hi) { |
| 432 var r = Math.random(); |
| 433 if (r < 0.05) |
| 434 return lo; |
| 435 else if (r > 0.95) |
| 436 return hi; |
| 437 else |
| 438 return lo + Math.random()*(hi-lo); |
| 439 } |
| 440 function randomInt (sz) { |
| 441 if (sz != null) |
| 442 return Math.floor(Math.random()*sz); |
| 443 else |
| 444 return Math.floor(randomFloat()); |
| 445 } |
| 446 function randomIntFromRange(lo, hi) { |
| 447 return Math.floor(randomFloatFromRange(lo, hi)); |
| 448 } |
| 449 function randomLength () { |
| 450 var l = Math.floor(Math.random() * 256); |
| 451 if (Math.random < 0.5) l = l / 10; |
| 452 if (Math.random < 0.3) l = l / 10; |
| 453 return l; |
| 454 } |
| 455 function randomSmallIntArray () { |
| 456 var l = randomLength(); |
| 457 var s = new Array(l); |
| 458 for (var i=0; i<l; i++) |
| 459 s[i] = Math.floor(Math.random() * 256)-1; |
| 460 return s; |
| 461 } |
| 462 function randomFloatArray () { |
| 463 var l = randomLength(); |
| 464 var s = new Array(l); |
| 465 for (var i=0; i<l; i++) |
| 466 s[i] = randomFloat(); |
| 467 return s; |
| 468 } |
| 469 function randomIntArray () { |
| 470 var l = randomLength(); |
| 471 var s = new Array(l); |
| 472 for (var i=0; i<l; i++) |
| 473 s[i] = randomFloat(); |
| 474 return s; |
| 475 } |
| 476 function randomMixedArray () { |
| 477 var l = randomLength(); |
| 478 var s = new Array(l); |
| 479 for (var i=0; i<l; i++) |
| 480 s[i] = randomNonArray(); |
| 481 return s; |
| 482 } |
| 483 function randomArray () { |
| 484 var r = Math.random(); |
| 485 if (r < 0.3) |
| 486 return randomFloatArray(); |
| 487 else if (r < 0.6) |
| 488 return randomIntArray(); |
| 489 else if (r < 0.8) |
| 490 return randomSmallIntArray(); |
| 491 else |
| 492 return randomMixedArray(); |
| 493 } |
| 494 function randomString () { |
| 495 return String.fromCharCode.apply(String, randomSmallIntArray()); |
| 496 } |
| 497 function randomGLConstant () { |
| 498 return GLConstants[Math.floor(Math.random() * GLConstants.length)]; |
| 499 } |
| 500 |
| 501 function randomNonArray() { |
| 502 var r = Math.random(); |
| 503 if (r < 0.25) { |
| 504 return randomFloat(); |
| 505 } else if (r < 0.6) { |
| 506 return randomInt(); |
| 507 } else if (r < 0.7) { |
| 508 return (r < 0.65); |
| 509 } else if (r < 0.87) { |
| 510 return randomString(); |
| 511 } else if (r < 0.98) { |
| 512 return randomGLConstant(); |
| 513 } else { |
| 514 return null; |
| 515 } |
| 516 } |
| 517 |
| 518 function generateRandomArg(pos, count) { |
| 519 if (pos == 0 && Math.random() < 0.5) |
| 520 return randomGLConstant(); |
| 521 if (pos == count-1 && Math.random() < 0.25) |
| 522 if (Math.random() < 0.5) |
| 523 return randomString(); |
| 524 else |
| 525 return randomArray(); |
| 526 var r = Math.random(); |
| 527 if (r < 0.25) { |
| 528 return randomFloat(); |
| 529 } else if (r < 0.6) { |
| 530 return randomInt(); |
| 531 } else if (r < 0.7) { |
| 532 return (r < 0.65); |
| 533 } else if (r < 0.77) { |
| 534 return randomString(); |
| 535 } else if (r < 0.84) { |
| 536 return randomArray(); |
| 537 } else if (r < 0.98) { |
| 538 return randomGLConstant(); |
| 539 } else { |
| 540 return null; |
| 541 } |
| 542 } |
| 543 |
| 544 |
| 545 function generateRandomArgs(count) { |
| 546 var arr = new Array(count); |
| 547 for (var i=0; i<count; i++) |
| 548 arr[i] = generateRandomArg(i, count); |
| 549 return arr; |
| 550 } |
| 551 |
| 552 // qc (arg1gen, arg2gen, ..., predicate) |
| 553 // qc (randomString, randomInt, randomInt, function(s,i,j){ s.substring(i,j) }) |
| 554 function qc() { |
| 555 } |
| 556 |
| 557 GLConstants = [ |
| 558 1, |
| 559 0x00000100, |
| 560 0x00000400, |
| 561 0x00004000, |
| 562 0x0000, |
| 563 0x0001, |
| 564 0x0002, |
| 565 0x0003, |
| 566 0x0004, |
| 567 0x0005, |
| 568 0x0006, |
| 569 0, |
| 570 1, |
| 571 0x0300, |
| 572 0x0301, |
| 573 0x0302, |
| 574 0x0303, |
| 575 0x0304, |
| 576 0x0305, |
| 577 0x0306, |
| 578 0x0307, |
| 579 0x0308, |
| 580 0x8006, |
| 581 0x8009, |
| 582 0x8009, |
| 583 0x883D, |
| 584 0x800A, |
| 585 0x800B, |
| 586 0x80C8, |
| 587 0x80C9, |
| 588 0x80CA, |
| 589 0x80CB, |
| 590 0x8001, |
| 591 0x8002, |
| 592 0x8003, |
| 593 0x8004, |
| 594 0x8005, |
| 595 0x8892, |
| 596 0x8893, |
| 597 0x8894, |
| 598 0x8895, |
| 599 0x88E0, |
| 600 0x88E4, |
| 601 0x88E8, |
| 602 0x8764, |
| 603 0x8765, |
| 604 0x8626, |
| 605 0x0404, |
| 606 0x0405, |
| 607 0x0408, |
| 608 0x0DE1, |
| 609 0x0B44, |
| 610 0x0BE2, |
| 611 0x0BD0, |
| 612 0x0B90, |
| 613 0x0B71, |
| 614 0x0C11, |
| 615 0x8037, |
| 616 0x809E, |
| 617 0x80A0, |
| 618 0, |
| 619 0x0500, |
| 620 0x0501, |
| 621 0x0502, |
| 622 0x0505, |
| 623 0x0900, |
| 624 0x0901, |
| 625 0x0B21, |
| 626 0x846D, |
| 627 0x846E, |
| 628 0x0B45, |
| 629 0x0B46, |
| 630 0x0B70, |
| 631 0x0B72, |
| 632 0x0B73, |
| 633 0x0B74, |
| 634 0x0B91, |
| 635 0x0B92, |
| 636 0x0B94, |
| 637 0x0B95, |
| 638 0x0B96, |
| 639 0x0B97, |
| 640 0x0B93, |
| 641 0x0B98, |
| 642 0x8800, |
| 643 0x8801, |
| 644 0x8802, |
| 645 0x8803, |
| 646 0x8CA3, |
| 647 0x8CA4, |
| 648 0x8CA5, |
| 649 0x0BA2, |
| 650 0x0C10, |
| 651 0x0C22, |
| 652 0x0C23, |
| 653 0x0CF5, |
| 654 0x0D05, |
| 655 0x0D33, |
| 656 0x0D3A, |
| 657 0x0D50, |
| 658 0x0D52, |
| 659 0x0D53, |
| 660 0x0D54, |
| 661 0x0D55, |
| 662 0x0D56, |
| 663 0x0D57, |
| 664 0x2A00, |
| 665 0x8038, |
| 666 0x8069, |
| 667 0x80A8, |
| 668 0x80A9, |
| 669 0x80AA, |
| 670 0x80AB, |
| 671 0x86A2, |
| 672 0x86A3, |
| 673 0x1100, |
| 674 0x1101, |
| 675 0x1102, |
| 676 0x8192, |
| 677 0x1400, |
| 678 0x1401, |
| 679 0x1402, |
| 680 0x1403, |
| 681 0x1404, |
| 682 0x1405, |
| 683 0x1406, |
| 684 0x140C, |
| 685 0x1902, |
| 686 0x1906, |
| 687 0x1907, |
| 688 0x1908, |
| 689 0x1909, |
| 690 0x190A, |
| 691 0x8033, |
| 692 0x8034, |
| 693 0x8363, |
| 694 0x8B30, |
| 695 0x8B31, |
| 696 0x8869, |
| 697 0x8DFB, |
| 698 0x8DFC, |
| 699 0x8B4D, |
| 700 0x8B4C, |
| 701 0x8872, |
| 702 0x8DFD, |
| 703 0x8B4F, |
| 704 0x8B80, |
| 705 0x8B82, |
| 706 0x8B83, |
| 707 0x8B85, |
| 708 0x8B86, |
| 709 0x8B87, |
| 710 0x8B89, |
| 711 0x8B8A, |
| 712 0x8B8C, |
| 713 0x8B8D, |
| 714 0x0200, |
| 715 0x0201, |
| 716 0x0202, |
| 717 0x0203, |
| 718 0x0204, |
| 719 0x0205, |
| 720 0x0206, |
| 721 0x0207, |
| 722 0x1E00, |
| 723 0x1E01, |
| 724 0x1E02, |
| 725 0x1E03, |
| 726 0x150A, |
| 727 0x8507, |
| 728 0x8508, |
| 729 0x1F00, |
| 730 0x1F01, |
| 731 0x1F02, |
| 732 0x1F03, |
| 733 0x2600, |
| 734 0x2601, |
| 735 0x2700, |
| 736 0x2701, |
| 737 0x2702, |
| 738 0x2703, |
| 739 0x2800, |
| 740 0x2801, |
| 741 0x2802, |
| 742 0x2803, |
| 743 0x1702, |
| 744 0x8513, |
| 745 0x8514, |
| 746 0x8515, |
| 747 0x8516, |
| 748 0x8517, |
| 749 0x8518, |
| 750 0x8519, |
| 751 0x851A, |
| 752 0x851C, |
| 753 0x84C0, |
| 754 0x84C1, |
| 755 0x84C2, |
| 756 0x84C3, |
| 757 0x84C4, |
| 758 0x84C5, |
| 759 0x84C6, |
| 760 0x84C7, |
| 761 0x84C8, |
| 762 0x84C9, |
| 763 0x84CA, |
| 764 0x84CB, |
| 765 0x84CC, |
| 766 0x84CD, |
| 767 0x84CE, |
| 768 0x84CF, |
| 769 0x84D0, |
| 770 0x84D1, |
| 771 0x84D2, |
| 772 0x84D3, |
| 773 0x84D4, |
| 774 0x84D5, |
| 775 0x84D6, |
| 776 0x84D7, |
| 777 0x84D8, |
| 778 0x84D9, |
| 779 0x84DA, |
| 780 0x84DB, |
| 781 0x84DC, |
| 782 0x84DD, |
| 783 0x84DE, |
| 784 0x84DF, |
| 785 0x84E0, |
| 786 0x2901, |
| 787 0x812F, |
| 788 0x8370, |
| 789 0x8B50, |
| 790 0x8B51, |
| 791 0x8B52, |
| 792 0x8B53, |
| 793 0x8B54, |
| 794 0x8B55, |
| 795 0x8B56, |
| 796 0x8B57, |
| 797 0x8B58, |
| 798 0x8B59, |
| 799 0x8B5A, |
| 800 0x8B5B, |
| 801 0x8B5C, |
| 802 0x8B5E, |
| 803 0x8B60, |
| 804 0x8622, |
| 805 0x8623, |
| 806 0x8624, |
| 807 0x8625, |
| 808 0x886A, |
| 809 0x8645, |
| 810 0x889F, |
| 811 0x8B9A, |
| 812 0x8B9B, |
| 813 0x8B81, |
| 814 0x8B84, |
| 815 0x8B88, |
| 816 0x8DFA, |
| 817 0x8DF8, |
| 818 0x8DF9, |
| 819 0x8DF0, |
| 820 0x8DF1, |
| 821 0x8DF2, |
| 822 0x8DF3, |
| 823 0x8DF4, |
| 824 0x8DF5, |
| 825 0x8D40, |
| 826 0x8D41, |
| 827 0x8056, |
| 828 0x8057, |
| 829 0x8D62, |
| 830 0x81A5, |
| 831 0x1901, |
| 832 0x8D48, |
| 833 0x8D42, |
| 834 0x8D43, |
| 835 0x8D44, |
| 836 0x8D50, |
| 837 0x8D51, |
| 838 0x8D52, |
| 839 0x8D53, |
| 840 0x8D54, |
| 841 0x8D55, |
| 842 0x8CD0, |
| 843 0x8CD1, |
| 844 0x8CD2, |
| 845 0x8CD3, |
| 846 0x8CE0, |
| 847 0x8D00, |
| 848 0x8D20, |
| 849 0, |
| 850 0x8CD5, |
| 851 0x8CD6, |
| 852 0x8CD7, |
| 853 0x8CD9, |
| 854 0x8CDD, |
| 855 0x8CA6, |
| 856 0x8CA7, |
| 857 0x84E8, |
| 858 0x0506, |
| 859 0x809D |
| 860 ]; |
| 861 |
| 862 function reportTestResultsToHarness(success, msg) { |
| 863 if (window.parent.webglTestHarness) { |
| 864 window.parent.webglTestHarness.reportResults(window.location.pathname, succe
ss, msg); |
| 865 } |
| 866 } |
| 867 |
| 868 function notifyFinishedToHarness() { |
| 869 if (window.parent.webglTestHarness) { |
| 870 window.parent.webglTestHarness.notifyFinished(window.location.pathname); |
| 871 } |
| 872 } |
| 873 |
| 874 function initTests() { |
| 875 if (Tests.message != null) { |
| 876 var h = document.getElementById('test-message'); |
| 877 if (h == null) { |
| 878 h = document.createElement('p'); |
| 879 h.id = 'test-message'; |
| 880 document.body.insertBefore(h, document.body.firstChild); |
| 881 } |
| 882 h.textContent = Tests.message; |
| 883 } |
| 884 if (Tests.autorun) { |
| 885 runTests(); |
| 886 } else { |
| 887 var h = document.getElementById('test-run'); |
| 888 if (h == null) { |
| 889 h = document.createElement('input'); |
| 890 h.type = 'submit'; |
| 891 h.value = "Run tests"; |
| 892 h.addEventListener('click', function(ev){ |
| 893 runTests(); |
| 894 ev.preventDefault(); |
| 895 }, false); |
| 896 h.id = 'test-run'; |
| 897 document.body.insertBefore(h, document.body.firstChild); |
| 898 } |
| 899 h.textContent = Tests.message; |
| 900 } |
| 901 |
| 902 } |
| 903 |
| 904 window.addEventListener('load', function(){ |
| 905 // let the browser hopefully finish updating the gl canvas surfaces if we are
given a delay |
| 906 if (Tests.delay) |
| 907 setTimeout(initTests, Tests.delay); |
| 908 else |
| 909 initTests() |
| 910 }, false); |
| 911 |
OLD | NEW |