test-dependencies.html 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Test Dependencies</title>
  6. <link rel="stylesheet" href="../css/reveal.css">
  7. <link rel="stylesheet" href="qunit-2.5.0.css">
  8. </head>
  9. <body style="overflow: auto;">
  10. <div id="qunit"></div>
  11. <div id="qunit-fixture"></div>
  12. <div class="reveal" style="display: none;">
  13. <div class="slides">
  14. <section>Slide content</section>
  15. </div>
  16. </div>
  17. <script src="../js/reveal.js"></script>
  18. <script src="qunit-2.5.0.js"></script>
  19. <script>
  20. window.externalScriptSequence = '';
  21. Reveal.addEventListener( 'ready', function() {
  22. QUnit.module( 'Dependencies' );
  23. QUnit.test( 'Load synchronous scripts', function( assert ) {
  24. assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
  25. });
  26. } );
  27. Reveal.initialize({
  28. dependencies: [
  29. { src: 'assets/external-script-a.js' },
  30. { src: 'assets/external-script-b.js' },
  31. { src: 'assets/external-script-c.js' }
  32. ]
  33. });
  34. </script>
  35. </body>
  36. </html>