|
327 | 327 | <td><input value="complexNoRequests_alone" type="button" data-ignore="timestat"></td>
|
328 | 328 | <td class="uncheck"></td>
|
329 | 329 | </tr>
|
| 330 | + <tr> |
| 331 | + <th colspan="2" align="left">Read Conf:</th> |
| 332 | + </tr> |
| 333 | + <tr> |
| 334 | + <td><input value="readConfig" type="button" data-ignore="timestat"></td> |
| 335 | + <td class="uncheck"></td> |
| 336 | + </tr> |
330 | 337 | </table>
|
331 | 338 |
|
332 | 339 | <script>
|
| 340 | + |
| 341 | +function readConfig( stateTd, callback ) { |
| 342 | + var conf = require.config(); |
| 343 | + var ok = conf.baseUrl == './' |
| 344 | + && conf.paths.css == '../src/css' |
| 345 | + && conf.paths.abspath == '/test/pathstest' |
| 346 | + && conf.map.usecjs.simple == 'cjs/simple' |
| 347 | + && conf.map['usecjs/change2amd'].simple == 'amd/simple' |
| 348 | + && conf.packages[0] == 'pkgclassic/1.0' |
| 349 | + && conf.packages[1].name == 'pkgsetmain' |
| 350 | + && conf.config['moduleconf/cat'].desc == 'cat' |
| 351 | + && conf.urlArgs['*'] == 'urlArgs' |
| 352 | + && conf.urlArgs['amd/simpleDependency'] == 'amdsd'; |
| 353 | + |
| 354 | + if (ok) { |
| 355 | + conf = require.config({ |
| 356 | + paths: { |
| 357 | + 'justfortest': 'justfortestpath' |
| 358 | + } |
| 359 | + }); |
| 360 | + ok = conf.baseUrl == './' |
| 361 | + && conf.paths.css == '../src/css' |
| 362 | + && conf.paths.abspath == '/test/pathstest' |
| 363 | + && conf.map.usecjs.simple == 'cjs/simple' |
| 364 | + && conf.map['usecjs/change2amd'].simple == 'amd/simple' |
| 365 | + && conf.packages[0] == 'pkgclassic/1.0' |
| 366 | + && conf.packages[1].name == 'pkgsetmain' |
| 367 | + && conf.config['moduleconf/cat'].desc == 'cat' |
| 368 | + && conf.urlArgs['*'] == 'urlArgs' |
| 369 | + && conf.urlArgs['amd/simpleDependency'] == 'amdsd' |
| 370 | + && conf.paths.justfortest == 'justfortestpath'; |
| 371 | + } |
| 372 | + |
| 373 | + if (ok) { |
| 374 | + stateTd.className = 'pass'; |
| 375 | + } |
| 376 | + else { |
| 377 | + stateTd.className = 'fail'; |
| 378 | + } |
| 379 | + callback(); |
| 380 | +} |
| 381 | + |
333 | 382 | function hasModuleRequest( moduleId ) {
|
334 | 383 | var scripts = document.getElementsByTagName( 'script' );
|
335 | 384 | var len = scripts.length;
|
|
0 commit comments