<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">

		<title>reveal.js - Tests</title>

		<link rel="stylesheet" href="../dist/reveal.css">
		<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
		<script src="../node_modules/qunit/qunit/qunit.js"></script>
	</head>

	<body style="overflow: auto;">

		<div id="qunit"></div>
  		<div id="qunit-fixture"></div>

		<div class="reveal" style="visibility: hidden;">

			<div class="slides">

				<section data-visibility="hidden">
					This should be remove by reveal.js before our tests run.
				</section>

				<section data-background-image="examples/assets/image1.png">
					<h1>1</h1>
					<img data-src="">
					<video data-src=""></video>
					<audio data-src=""></audio>
					<aside class="notes">speaker notes 1</aside>
				</section>

				<section>
					<section data-background="examples/assets/image2.png" data-notes="speaker notes 2">
						<h1>2.1</h1>
					</section>
					<section data-background-image="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/">
						<h1>2.2</h1>
					</section>
					<section>
						<h1>2.3</h1>
					</section>
				</section>

				<section id="fragment-slides">
					<section>
						<h1>3.1</h1>
						<ul>
							<li class="fragment">4.1</li>
							<li class="fragment">4.2</li>
							<li class="fragment">4.3</li>
						</ul>
					</section>

					<section>
						<h1>3.2</h1>
						<ul>
							<li class="fragment" data-fragment-index="0">4.1</li>
							<li class="fragment" data-fragment-index="0">4.2</li>
						</ul>
						<iframe data-src="http://example.com"></iframe>
					</section>

					<section id="fragments3">
						<h1>3.3</h1>
						<ul>
							<li class="fragment" data-fragment-index="1">3.3.1</li>
							<li class="fragment" data-fragment-index="4">3.3.2</li>
							<li class="fragment" data-fragment-index="4">3.3.3</li>
						</ul>
					</section>
				</section>

				<section>
					<h1>4</h1>
				</section>

			</div>

		</div>

		<script src="../dist/reveal.js"></script>
		<script>
			window.location.hash = '';

			Reveal.configure({maxScale: 1.11});

			// These tests expect the DOM to contain a presentation
			// with the following slide structure:
			//
			// 1
			// 2 - Three sub-slides
			// 3 - Three fragment elements
			// 3 - Two fragments with same data-fragment-index
			// 4
			Reveal.initialize().then( function() {

				// Helper methods
				function triggerKeyboardEvent(config) {
					document.dispatchEvent( new KeyboardEvent( 'keydown', config ) );
				}

				// ---------------------------------------------------------------
				// DOM TESTS

				QUnit.module( 'DOM' );

				QUnit.test( 'Initial slides classes', function( assert ) {
					var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )

					assert.strictEqual( document.querySelectorAll( '.reveal .slides section[data-visibility="hidden"]' ).length, 0, 'no data-visibility="hidden" slides' );
					assert.strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
					assert.strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
					assert.strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );

					assert.strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );

					assert.ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
				});

				// ---------------------------------------------------------------
				// API TESTS

				QUnit.module( 'API' );

				QUnit.test( 'Reveal.configure before initialization', function( assert ) {
					assert.strictEqual( Reveal.getConfig().maxScale, 1.11 );
				});

				QUnit.test( 'Reveal.isReady', function( assert ) {
					assert.strictEqual( Reveal.isReady(), true, 'returns true' );
				});

				QUnit.test( 'Reveal.isOverview', function( assert ) {
					assert.strictEqual( Reveal.isOverview(), false, 'false by default' );

					Reveal.toggleOverview();
					assert.strictEqual( Reveal.isOverview(), true, 'true after toggling on' );

					Reveal.toggleOverview();
					assert.strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
				});

				QUnit.test( 'Reveal.isPaused', function( assert ) {
					assert.strictEqual( Reveal.isPaused(), false, 'false by default' );

					Reveal.togglePause();
					assert.strictEqual( Reveal.isPaused(), true, 'true after pausing' );

					Reveal.togglePause();
					assert.strictEqual( Reveal.isPaused(), false, 'false after resuming' );
				});

				QUnit.test( 'Reveal.isFirstSlide', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );

					Reveal.slide( 1, 0 );
					assert.strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );

					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
				});

				QUnit.test( 'Reveal.isFirstSlide after vertical slide', function( assert ) {
					Reveal.slide( 1, 1 );
					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( 0, 0 )' );
				});

				QUnit.test( 'Reveal.isLastSlide', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );

					var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;

					Reveal.slide( lastSlideIndex, 0 );
					assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( '+ lastSlideIndex +', 0 )' );

					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
				});

				QUnit.test( 'Reveal.isLastSlide after vertical slide', function( assert ) {
					var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;

					Reveal.slide( 1, 1 );
					Reveal.slide( lastSlideIndex );
					assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
				});

				QUnit.test( 'Reveal.getTotalSlides', function( assert ) {
					assert.strictEqual( Reveal.getTotalSlides(), 8, 'eight slides in total' );
				});

				QUnit.test( 'Reveal.getIndices', function( assert ) {
					var indices = Reveal.getIndices();

					assert.ok( indices.hasOwnProperty( 'h' ), 'h exists' );
					assert.ok( indices.hasOwnProperty( 'v' ), 'v exists' );
					assert.ok( indices.hasOwnProperty( 'f' ), 'f exists' );

					Reveal.slide( 1, 0 );
					assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
					assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );

					Reveal.slide( 1, 2 );
					assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
					assert.strictEqual( Reveal.getIndices().v, 2, 'v 2' );

					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.getIndices().h, 0, 'h 0' );
					assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );
				});

				QUnit.test( 'Reveal.getSlide', function( assert ) {
					assert.equal( Reveal.getSlide( 0 ), document.querySelector( '.reveal .slides>section:first-child' ), 'gets correct first slide' );
					assert.equal( Reveal.getSlide( 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)' ), 'no v index returns stack' );
					assert.equal( Reveal.getSlide( 1, 0 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(1)' ), 'v index 0 returns first vertical child' );
					assert.equal( Reveal.getSlide( 1, 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(2)' ), 'v index 1 returns second vertical child' );

					assert.strictEqual( Reveal.getSlide( 100 ), undefined, 'undefined when out of horizontal bounds' );
					assert.strictEqual( Reveal.getSlide( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
				});

				QUnit.test( 'Reveal.getSlideBackground', function( assert ) {
					assert.equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
					assert.equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
					assert.equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 0 returns first vertical child' );
					assert.equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(3)' ), 'v index 1 returns second vertical child' );

					assert.strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
					assert.strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
				});

				QUnit.test( 'Reveal.getSlideNotes', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );

					Reveal.slide( 1, 0 );
					assert.ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
				});

				QUnit.test( 'Reveal.getPreviousSlide/getCurrentSlide', function( assert ) {
					Reveal.slide( 0, 0 );
					Reveal.slide( 1, 0 );

					var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
					var secondSlide = document.querySelector( '.reveal .slides>section:nth-child(2)>section' );

					assert.equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
					assert.equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
				});

				QUnit.test( 'Reveal.getProgress', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );

					var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;

					Reveal.slide( lastSlideIndex, 0 );
					assert.strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
				});

				QUnit.test( 'Reveal.getScale', function( assert ) {
					assert.ok( typeof Reveal.getScale() === 'number', 'has scale' );
				});

				QUnit.test( 'Reveal.getConfig', function( assert ) {
					assert.ok( typeof Reveal.getConfig() === 'object', 'has config' );
				});

				QUnit.test( 'Reveal.configure', function( assert ) {
					assert.strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );

					Reveal.configure({ loop: true });
					assert.strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );

					Reveal.configure({ loop: false, customTestValue: 1 });
					assert.strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
				});

				QUnit.test( 'Reveal.availableRoutes', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );

					Reveal.slide( 1, 0 );
					assert.deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );

					Reveal.slide( 0, 0 );
					assert.deepEqual( Reveal.availableRoutes({ includeFragments: true }), { left: false, up: false, down: false, right: true }, 'correct with fragments included' );
				});

				QUnit.test( 'Reveal.next', function( assert ) {
					Reveal.slide( 0, 0 );

					// Step through vertical child slides
					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );

					// Step through fragments
					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
				});

				QUnit.test( 'Reveal.next at end', function( assert ) {
					Reveal.slide( 3 );

					// We're at the end, this should have no effect
					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
				});


				// ---------------------------------------------------------------
				// URL TESTS

				QUnit.module( 'URL' );

				QUnit.test( 'Write (fragmentInURL: false)', function( assert ) {
					Reveal.configure({ hash: true, fragmentInURL: false });

					Reveal.slide( 2, 0 );
					assert.strictEqual( window.location.hash, '#/2' );

					Reveal.slide( 2, 1 );
					assert.strictEqual( window.location.hash, '#/2/1' );

					Reveal.slide( 2, 0, 1 );
					assert.strictEqual( window.location.hash, '#/2' );

					Reveal.slide( 2, 2, 0 );
					assert.strictEqual( window.location.hash, '#/fragments3' );

					Reveal.slide( 2, 2, 1 );
					assert.strictEqual( window.location.hash, '#/fragments3' );
				});

				QUnit.test( 'Write (fragmentInURL: true)', function( assert ) {
					Reveal.configure({ hash: true, fragmentInURL: true });

					Reveal.slide( 2, 0, -1 );
					assert.strictEqual( window.location.hash, '#/2' );

					Reveal.slide( 2, 1, -1 );
					assert.strictEqual( window.location.hash, '#/2/1' );

					Reveal.slide( 2, 0, 1 );
					assert.strictEqual( window.location.hash, '#/2/0/1' );

					Reveal.slide( 2, 2, -1 );
					assert.strictEqual( window.location.hash, '#/fragments3' );

					Reveal.slide( 2, 2, 1 );
					assert.strictEqual( window.location.hash, '#/fragments3/1' );
				});

				QUnit.test( 'Read', async function( assert ) {
					Reveal.configure({ hash: true, fragmentInURL: true });

					let test = function( hash, indices ) {
						return new Promise( resolve => {
							window.onhashchange = () => {
								assert.deepEqual( Reveal.getIndices(), indices );
								resolve();
							};
							window.location.hash = hash;
						} );
					}

					await test( '#/0', { h: 0, v: 0, f: undefined } ); // horizontal
					await test( '#/1/1', { h: 1, v: 1, f: undefined } ); // vertical
					await test( '#/0/', { h: 0, v: 0, f: undefined } ); // trailing /
					await test( '#/1/1/', { h: 1, v: 1, f: undefined } ); // trailing /
					await test( '#/2/0/1', { h: 2, v: 0, f: 1 } ); // fragment
				});

				// ---------------------------------------------------------------
				// KEYBOARD TESTS

				QUnit.module( 'Keyboard' );

				QUnit.test( 'Add key bindings', function( assert ) {
					var done = assert.async( 1 );

					Reveal.addKeyBinding({keyCode: 88, key: 'X', description: 'X-SHORTCUT-X'}, function() {
						assert.ok( true, 'callback triggered' );
						done();
					} );

					Reveal.toggleHelp( true );
					assert.ok( /X\-SHORTCUT\-X/.test( document.body.innerHTML ), 'binding is added to help overlay' );
					Reveal.toggleHelp( false );

					triggerKeyboardEvent({ keyCode: 88 });

					Reveal.removeKeyBinding( 88 );

					// should do nothing
					triggerKeyboardEvent({ keyCode: 88 });
				});

				QUnit.test( 'Navigation bindings', function( assert ) {
					Reveal.slide( 0 );

					// right arrow
					triggerKeyboardEvent({ keyCode: 39 });
					assert.strictEqual( Reveal.getIndices().h, 1 );

					// down arrow + shift
					triggerKeyboardEvent({ keyCode: 40, shiftKey: true });
					assert.strictEqual( Reveal.getIndices().v, 2, 'shift + down arrow goes to last vertical slide' );

					// up arrow
					triggerKeyboardEvent({ keyCode: 38 });
					assert.strictEqual( Reveal.getIndices().v, 1 );

					// right arrow + shift
					triggerKeyboardEvent({ keyCode: 39, shiftKey: true });
					assert.ok( Reveal.isLastSlide(), 'shift + right arrow goes to last horizontal slide' );


					// right arrow on slide with fragments
					Reveal.slide( 2, 0, -1 );
					triggerKeyboardEvent({ keyCode: 39 });
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'right arrow shows fragment' );

					triggerKeyboardEvent({ keyCode: 39, altKey: true });
					assert.strictEqual( Reveal.getIndices().h, 3, 'right arrow skips fragments when alt key is pressed' );
				});

				// ---------------------------------------------------------------
				// FRAGMENT TESTS

				QUnit.module( 'Fragments' );

				QUnit.test( 'Sliding to fragments', function( assert ) {
					Reveal.slide( 2, 0, -1 );
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );

					Reveal.slide( 2, 0, 0 );
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );

					Reveal.slide( 2, 0, 2 );
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );

					Reveal.slide( 2, 0, 1 );
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
				});

				QUnit.test( 'data-fragment is set on slide <section>', function( assert ) {
					Reveal.slide( 2, 0, -1 );
					assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '-1' );

					Reveal.slide( 2, 0, 2 );
					assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '2' );

					Reveal.slide( 2, 0, 0 );
					assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '0' );

					var fragmentSlide = Reveal.getCurrentSlide();

					Reveal.slide( 3, 0 );
					assert.deepEqual( fragmentSlide.getAttribute( 'data-fragment' ), '0', 'data-fragment persists when jumping to another slide' );
				});

				QUnit.test( 'Hiding all fragments', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );

					Reveal.slide( 2, 0, 0 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );

					Reveal.slide( 2, 0, -1 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
				});

				QUnit.test( 'Current fragment', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
					var lastFragmentIndex = [].slice.call( fragmentSlide.querySelectorAll( '.fragment' ) ).pop().getAttribute( 'data-fragment-index' );

					Reveal.slide( 2, 0 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );

					Reveal.slide( 2, 0, 0 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );

					Reveal.slide( 1, 0, 0 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );

					Reveal.slide( 3, 0, 0 );
					assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );

					Reveal.slide( 2, 1, -1 );
					Reveal.prev();
					assert.strictEqual( fragmentSlide.querySelector( '.fragment.current-fragment' ).getAttribute( 'data-fragment-index' ), lastFragmentIndex, 'last fragment is current fragment when returning from future slide' );
				});

				QUnit.test( 'Stepping through fragments', function( assert ) {
					Reveal.slide( 2, 0, -1 );

					// forwards:

					Reveal.next();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );

					Reveal.right();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );

					Reveal.down();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );

					Reveal.down(); // moves to f #3

					// backwards:

					Reveal.prev();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );

					Reveal.left();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );

					Reveal.up();
					assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
				});

				QUnit.test( 'Stepping past fragments', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );

					Reveal.slide( 0, 0, 0 );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );

					Reveal.slide( 3, 0, 0 );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
				});

				QUnit.test( 'Fragment indices', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(2)' );

					Reveal.slide( 3, 0, 0 );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );

					// This slide has three fragments, first one is index 0, second and third have index 1
					Reveal.slide( 2, 2, 0 );
					assert.equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );

					Reveal.slide( 2, 2, 1 );
					assert.equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
				});

				QUnit.test( 'Index generation', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );

					// These have no indices defined to start with
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
				});

				QUnit.test( 'Index normalization', function( assert ) {
					var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(3)' );

					// These start out as 1-4-4 and should normalize to 0-1-1
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
					assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
				});

				QUnit.test( 'fragmentshown event', function( assert ) {
					assert.expect( 2 );
					var done = assert.async( 2 );

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'fragmentshown', _onEvent );

					Reveal.slide( 2, 0 );
					Reveal.slide( 2, 0 ); // should do nothing
					Reveal.slide( 2, 0, 0 ); // should do nothing
					Reveal.next();
					Reveal.next();
					Reveal.prev(); // shouldn't fire fragmentshown

					Reveal.off( 'fragmentshown', _onEvent );
				});

				QUnit.test( 'fragmenthidden event', function( assert ) {
					assert.expect( 2 );
					var done = assert.async( 2 );

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'fragmenthidden', _onEvent );

					Reveal.slide( 2, 0, 2 );
					Reveal.slide( 2, 0, 2 ); // should do nothing
					Reveal.prev();
					Reveal.prev();
					Reveal.next(); // shouldn't fire fragmenthidden

					Reveal.off( 'fragmenthidden', _onEvent );
				});


				// ---------------------------------------------------------------
				// AUTO-SLIDE TESTS

				QUnit.module( 'Auto Sliding' );

				QUnit.test( 'Reveal.isAutoSliding', function( assert ) {
					assert.strictEqual( Reveal.isAutoSliding(), false, 'false by default' );

					Reveal.configure({ autoSlide: 10000 });
					assert.strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );

					Reveal.configure({ autoSlide: 0 });
					assert.strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
				});

				QUnit.test( 'Reveal.toggleAutoSlide', function( assert ) {
					Reveal.configure({ autoSlide: 10000 });

					Reveal.toggleAutoSlide();
					assert.strictEqual( Reveal.isAutoSliding(), false, 'false after first toggle' );
					Reveal.toggleAutoSlide();
					assert.strictEqual( Reveal.isAutoSliding(), true, 'true after second toggle' );

					Reveal.configure({ autoSlide: 0 });
				});

				QUnit.test( 'autoslidepaused', function( assert ) {
					assert.expect( 1 );
					var done = assert.async();

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'autoslidepaused', _onEvent );
					Reveal.configure({ autoSlide: 10000 });
					Reveal.toggleAutoSlide();

					// cleanup
					Reveal.configure({ autoSlide: 0 });
					Reveal.off( 'autoslidepaused', _onEvent );
				});

				QUnit.test( 'autoslideresumed', function( assert ) {
					assert.expect( 1 );
					var done = assert.async();

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'autoslideresumed', _onEvent );
					Reveal.configure({ autoSlide: 10000 });
					Reveal.toggleAutoSlide();
					Reveal.toggleAutoSlide();

					// cleanup
					Reveal.configure({ autoSlide: 0 });
					Reveal.off( 'autoslideresumed', _onEvent );
				});


				// ---------------------------------------------------------------
				// CONFIGURATION VALUES

				QUnit.module( 'Configuration' );

				QUnit.test( 'Controls', function( assert ) {
					var controlsElement = document.querySelector( '.reveal>.controls' );

					Reveal.configure({ controls: false });
					assert.equal( controlsElement.style.display, 'none', 'controls are hidden' );

					Reveal.configure({ controls: true });
					assert.equal( controlsElement.style.display, 'block', 'controls are visible' );
				});

				QUnit.test( 'Progress', function( assert ) {
					var progressElement = document.querySelector( '.reveal>.progress' );

					Reveal.configure({ progress: false });
					assert.equal( progressElement.style.display, 'none', 'progress are hidden' );

					Reveal.configure({ progress: true });
					assert.equal( progressElement.style.display, 'block', 'progress are visible' );
				});

				QUnit.test( 'Loop', function( assert ) {
					Reveal.configure({ loop: true });

					Reveal.slide( 0, 0 );

					Reveal.left();
					assert.notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );

					Reveal.right();
					assert.equal( Reveal.getIndices().h, 0, 'looped from end to start' );

					Reveal.configure({ navigationMode: 'linear' });
					Reveal.slide( 0, 0 );

					Reveal.prev();
					assert.notEqual( Reveal.getIndices().h, 0, 'looped from start to end in linear mode' );

					Reveal.next();
					assert.equal( Reveal.getIndices().h, 0, 'looped from end to start in linear mode' );

					Reveal.configure({ loop: false, navigationMode: 'default' });
				});


				// ---------------------------------------------------------------
				// LAZY-LOADING TESTS

				QUnit.module( 'Lazy-Loading' );

				QUnit.test( 'img with data-src', function( assert ) {
					assert.strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
				});

				QUnit.test( 'video with data-src', function( assert ) {
					assert.strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' );
				});

				QUnit.test( 'audio with data-src', function( assert ) {
					assert.strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' );
				});

				QUnit.test( 'iframe with data-src', function( assert ) {
					Reveal.slide( 0, 0 );
					assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
					Reveal.slide( 2, 1 );
					assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 1, 'Iframe source is set' );
					Reveal.slide( 2, 2 );
					assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
				});

				QUnit.test( 'background images', function( assert ) {
					var imageSource1 = Reveal.getSlide( 0 ).getAttribute( 'data-background-image' );
					var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
					var imageSource3 = Reveal.getSlide( 1, 1 ).getAttribute( 'data-background-image' );

					// check that the images are applied to the background elements
					assert.ok( Reveal.getSlideBackground( 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
					assert.ok( Reveal.getSlideBackground( 1, 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
					assert.ok( Reveal.getSlideBackground( 1, 1 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource3 ) !== -1, 'data-background worked' );
				});


				// ---------------------------------------------------------------
				// EVENT TESTS

				QUnit.module( 'Events' );

				QUnit.test( 'beforeslidechange', function( assert ) {
					var done = assert.async( 2 );

					var normalEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}
					var blockingEvent = function( event ) {
						event.preventDefault();
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'beforeslidechange', normalEvent );
					Reveal.slide( 2, 0 );
					Reveal.off( 'beforeslidechange', normalEvent );

					Reveal.on( 'beforeslidechange', blockingEvent );
					Reveal.slide( 3, 0 );
					Reveal.off( 'beforeslidechange', blockingEvent );

					assert.strictEqual( Reveal.getIndices().h, 2, 'preventing "beforeslidechange" blocks navigation ' );

				});

				QUnit.test( 'slidechanged', function( assert ) {
					assert.expect( 3 );
					var done = assert.async( 3 );

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'slidechanged', _onEvent );

					Reveal.slide( 1, 0 ); // should trigger
					Reveal.slide( 1, 0 ); // should do nothing
					Reveal.next(); // should trigger
					Reveal.slide( 3, 0 ); // should trigger
					Reveal.next(); // should do nothing

					Reveal.off( 'slidechanged', _onEvent );

				});

				/* Fails intermittently...
				QUnit.test( 'slidetransitionend', function( assert ) {
					assert.expect( 2 );
					let done = assert.async( 2 );
					let time = Date.now();

					let horizontalCallback = event => {
						assert.ok( Date.now() - time > 200, 'horizontal event fired' );
						done();

						let verticalCallback = event => {
							assert.ok( true, 'vertical event fired' );
							done();
							Reveal.off( 'slidetransitionend', verticalCallback );
						}

						Reveal.off( 'slidetransitionend', horizontalCallback );
						Reveal.on( 'slidetransitionend', verticalCallback );
						Reveal.slide( 1, 1 );
					}

					Reveal.slide( 0, 0 );
					Reveal.on( 'slidetransitionend', horizontalCallback );
					Reveal.slide( 1, 0 );

				});
				*/

				QUnit.test( 'paused', function( assert ) {
					assert.expect( 1 );
					var done = assert.async();

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'paused', _onEvent );

					Reveal.togglePause();
					Reveal.togglePause();

					Reveal.off( 'paused', _onEvent );
				});

				QUnit.test( 'resumed', function( assert ) {
					assert.expect( 1 );
					var done = assert.async();

					var _onEvent = function( event ) {
						assert.ok( true, 'event fired' );
						done();
					}

					Reveal.on( 'resumed', _onEvent );

					Reveal.togglePause();
					Reveal.togglePause();

					Reveal.off( 'resumed', _onEvent );
				});

			} );
		</script>

	</body>
</html>
