dyndoc-ruby 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +2 -212
- data/share/etc/pandoc/README.INSTALL +0 -1
- data/share/etc/pandoc/config.rb +0 -4
- data/share/etc/pandoc/extra/reveal.js-3.0.0/CONTRIBUTING.md +0 -19
- data/share/etc/pandoc/extra/reveal.js-3.0.0/Gruntfile.js +0 -174
- data/share/etc/pandoc/extra/reveal.js-3.0.0/LICENSE +0 -19
- data/share/etc/pandoc/extra/reveal.js-3.0.0/README.md +0 -950
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/print/paper.css +0 -202
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/print/pdf.css +0 -157
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.css +0 -1141
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.min.css +0 -1141
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.scss +0 -1316
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/README.md +0 -25
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/beige.css +0 -265
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/black.css +0 -261
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/blood.css +0 -291
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/default.css +0 -268
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/league.css +0 -267
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/moon.css +0 -265
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/night.css +0 -259
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/serif.css +0 -261
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/simple.css +0 -261
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/sky.css +0 -268
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/solarized.css +0 -265
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/beige.scss +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/black.scss +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/blood.scss +0 -91
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/league.scss +0 -34
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/moon.scss +0 -57
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/night.scss +0 -35
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/serif.scss +0 -35
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/simple.scss +0 -38
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/sky.scss +0 -46
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/solarized.scss +0 -63
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/white.scss +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/mixins.scss +0 -29
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/settings.scss +0 -43
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/theme.scss +0 -339
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/white.css +0 -261
- data/share/etc/pandoc/extra/reveal.js-3.0.0/index.html +0 -408
- data/share/etc/pandoc/extra/reveal.js-3.0.0/js/reveal.js +0 -4276
- data/share/etc/pandoc/extra/reveal.js-3.0.0/js/reveal.min.js +0 -4276
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/css/zenburn.css +0 -117
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/LICENSE +0 -2
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.css +0 -10
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/LICENSE +0 -45
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro.css +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/classList.js +0 -2
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/head.min.js +0 -8
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/html5shiv.js +0 -7
- data/share/etc/pandoc/extra/reveal.js-3.0.0/package.json +0 -48
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/highlight/highlight.js +0 -30
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/leap/leap.js +0 -159
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/example.html +0 -129
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/example.md +0 -31
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/markdown.js +0 -393
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/marked.js +0 -37
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/math/math.js +0 -64
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/client.js +0 -13
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/index.js +0 -56
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/master.js +0 -51
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/client.js +0 -60
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/index.js +0 -66
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/notes.html +0 -396
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes/notes.html +0 -406
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes/notes.js +0 -122
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/print-pdf/print-pdf.js +0 -48
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/remotes/remotes.js +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/search/search.js +0 -196
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/zoom-js/zoom.js +0 -278
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/assets/image1.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/assets/image2.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/barebones.html +0 -41
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/embedded-media.html +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/math.html +0 -185
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/slide-backgrounds.html +0 -144
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/qunit-1.12.0.css +0 -244
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/qunit-1.12.0.js +0 -2212
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-element-attributes.html +0 -134
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-element-attributes.js +0 -46
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-slide-attributes.html +0 -128
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-slide-attributes.js +0 -47
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown.html +0 -52
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown.js +0 -15
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-pdf.html +0 -83
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-pdf.js +0 -15
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test.html +0 -82
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test.js +0 -572
- data/share/etc/pandoc/extra/reveal.js-3.1.0/CONTRIBUTING.md +0 -23
- data/share/etc/pandoc/extra/reveal.js-3.1.0/Gruntfile.js +0 -170
- data/share/etc/pandoc/extra/reveal.js-3.1.0/LICENSE +0 -19
- data/share/etc/pandoc/extra/reveal.js-3.1.0/README.md +0 -1050
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/print/paper.css +0 -202
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/print/pdf.css +0 -157
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/reveal.css +0 -1175
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/reveal.scss +0 -1319
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/README.md +0 -23
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/beige.css +0 -271
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/black.css +0 -267
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/blood.css +0 -285
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/league.css +0 -273
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/moon.css +0 -271
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/night.css +0 -265
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/serif.css +0 -267
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/simple.css +0 -267
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/sky.css +0 -274
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/solarized.css +0 -271
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/beige.scss +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/black.scss +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/blood.scss +0 -79
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/league.scss +0 -34
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/moon.scss +0 -57
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/night.scss +0 -35
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/serif.scss +0 -35
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/simple.scss +0 -38
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/sky.scss +0 -46
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/solarized.scss +0 -63
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/white.scss +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/mixins.scss +0 -29
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/settings.scss +0 -43
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/theme.scss +0 -349
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/white.css +0 -267
- data/share/etc/pandoc/extra/reveal.js-3.1.0/index.html +0 -411
- data/share/etc/pandoc/extra/reveal.js-3.1.0/js/reveal.js +0 -4508
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/css/zenburn.css +0 -117
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/LICENSE +0 -2
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.css +0 -10
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/LICENSE +0 -45
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro.css +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/classList.js +0 -2
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/head.min.js +0 -8
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/html5shiv.js +0 -7
- data/share/etc/pandoc/extra/reveal.js-3.1.0/package.json +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/highlight/highlight.js +0 -30
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/leap/leap.js +0 -159
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/example.html +0 -129
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/example.md +0 -31
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/markdown.js +0 -393
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/marked.js +0 -6
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/math/math.js +0 -64
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/client.js +0 -13
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/index.js +0 -56
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/master.js +0 -51
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/client.js +0 -60
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/index.js +0 -66
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/notes.html +0 -396
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes/notes.html +0 -406
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes/notes.js +0 -122
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/print-pdf/print-pdf.js +0 -48
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/remotes/remotes.js +0 -39
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/search/search.js +0 -196
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/zoom-js/zoom.js +0 -278
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/assets/image1.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/assets/image2.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/barebones.html +0 -41
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/embedded-media.html +0 -49
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/math.html +0 -185
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/slide-backgrounds.html +0 -144
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/slide-transitions.html +0 -101
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/qunit-1.12.0.css +0 -244
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/qunit-1.12.0.js +0 -2212
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-element-attributes.html +0 -134
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-element-attributes.js +0 -46
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-slide-attributes.html +0 -128
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-slide-attributes.js +0 -47
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown.html +0 -52
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown.js +0 -15
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-pdf.html +0 -83
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-pdf.js +0 -15
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test.html +0 -85
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test.js +0 -589
- data/share/etc/pandoc/extra/s5-ui/default/blank.gif +0 -0
- data/share/etc/pandoc/extra/s5-ui/default/bodybg.gif +0 -0
- data/share/etc/pandoc/extra/s5-ui/default/framing.css +0 -23
- data/share/etc/pandoc/extra/s5-ui/default/iepngfix.htc +0 -42
- data/share/etc/pandoc/extra/s5-ui/default/opera.css +0 -7
- data/share/etc/pandoc/extra/s5-ui/default/outline.css +0 -15
- data/share/etc/pandoc/extra/s5-ui/default/pretty.css +0 -86
- data/share/etc/pandoc/extra/s5-ui/default/print.css +0 -1
- data/share/etc/pandoc/extra/s5-ui/default/s5-core.css +0 -9
- data/share/etc/pandoc/extra/s5-ui/default/slides.css +0 -3
- data/share/etc/pandoc/extra/s5-ui/default/slides.js +0 -553
@@ -1,15 +0,0 @@
|
|
1
|
-
|
2
|
-
Reveal.addEventListener( 'ready', function() {
|
3
|
-
|
4
|
-
// Only one test for now, we're mainly ensuring that there
|
5
|
-
// are no execution errors when running PDF mode
|
6
|
-
|
7
|
-
test( 'Reveal.isReady', function() {
|
8
|
-
strictEqual( Reveal.isReady(), true, 'returns true' );
|
9
|
-
});
|
10
|
-
|
11
|
-
|
12
|
-
} );
|
13
|
-
|
14
|
-
Reveal.initialize({ pdf: true });
|
15
|
-
|
@@ -1,82 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta charset="utf-8">
|
6
|
-
|
7
|
-
<title>reveal.js - Tests</title>
|
8
|
-
|
9
|
-
<link rel="stylesheet" href="../css/reveal.css">
|
10
|
-
<link rel="stylesheet" href="qunit-1.12.0.css">
|
11
|
-
</head>
|
12
|
-
|
13
|
-
<body style="overflow: auto;">
|
14
|
-
|
15
|
-
<div id="qunit"></div>
|
16
|
-
<div id="qunit-fixture"></div>
|
17
|
-
|
18
|
-
<div class="reveal" style="display: none;">
|
19
|
-
|
20
|
-
<div class="slides">
|
21
|
-
|
22
|
-
<section data-background-image="examples/assets/image1.png">
|
23
|
-
<h1>1</h1>
|
24
|
-
<img data-src="fake-url.png">
|
25
|
-
</section>
|
26
|
-
|
27
|
-
<section>
|
28
|
-
<section data-background="examples/assets/image2.png">
|
29
|
-
<h1>2.1</h1>
|
30
|
-
</section>
|
31
|
-
<section>
|
32
|
-
<h1>2.2</h1>
|
33
|
-
</section>
|
34
|
-
<section>
|
35
|
-
<h1>2.3</h1>
|
36
|
-
</section>
|
37
|
-
</section>
|
38
|
-
|
39
|
-
<section id="fragment-slides">
|
40
|
-
<section>
|
41
|
-
<h1>3.1</h1>
|
42
|
-
<ul>
|
43
|
-
<li class="fragment">4.1</li>
|
44
|
-
<li class="fragment">4.2</li>
|
45
|
-
<li class="fragment">4.3</li>
|
46
|
-
</ul>
|
47
|
-
</section>
|
48
|
-
|
49
|
-
<section>
|
50
|
-
<h1>3.2</h1>
|
51
|
-
<ul>
|
52
|
-
<li class="fragment" data-fragment-index="0">4.1</li>
|
53
|
-
<li class="fragment" data-fragment-index="0">4.2</li>
|
54
|
-
</ul>
|
55
|
-
</section>
|
56
|
-
|
57
|
-
<section>
|
58
|
-
<h1>3.3</h1>
|
59
|
-
<ul>
|
60
|
-
<li class="fragment" data-fragment-index="1">3.3.1</li>
|
61
|
-
<li class="fragment" data-fragment-index="4">3.3.2</li>
|
62
|
-
<li class="fragment" data-fragment-index="4">3.3.3</li>
|
63
|
-
</ul>
|
64
|
-
</section>
|
65
|
-
</section>
|
66
|
-
|
67
|
-
<section>
|
68
|
-
<h1>4</h1>
|
69
|
-
</section>
|
70
|
-
|
71
|
-
</div>
|
72
|
-
|
73
|
-
</div>
|
74
|
-
|
75
|
-
<script src="../lib/js/head.min.js"></script>
|
76
|
-
<script src="../js/reveal.js"></script>
|
77
|
-
<script src="qunit-1.12.0.js"></script>
|
78
|
-
|
79
|
-
<script src="test.js"></script>
|
80
|
-
|
81
|
-
</body>
|
82
|
-
</html>
|
@@ -1,572 +0,0 @@
|
|
1
|
-
|
2
|
-
// These tests expect the DOM to contain a presentation
|
3
|
-
// with the following slide structure:
|
4
|
-
//
|
5
|
-
// 1
|
6
|
-
// 2 - Three sub-slides
|
7
|
-
// 3 - Three fragment elements
|
8
|
-
// 3 - Two fragments with same data-fragment-index
|
9
|
-
// 4
|
10
|
-
|
11
|
-
|
12
|
-
Reveal.addEventListener( 'ready', function() {
|
13
|
-
|
14
|
-
// ---------------------------------------------------------------
|
15
|
-
// DOM TESTS
|
16
|
-
|
17
|
-
QUnit.module( 'DOM' );
|
18
|
-
|
19
|
-
test( 'Initial slides classes', function() {
|
20
|
-
var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )
|
21
|
-
|
22
|
-
strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
|
23
|
-
strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
|
24
|
-
strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
|
25
|
-
|
26
|
-
strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
|
27
|
-
|
28
|
-
ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
|
29
|
-
});
|
30
|
-
|
31
|
-
// ---------------------------------------------------------------
|
32
|
-
// API TESTS
|
33
|
-
|
34
|
-
QUnit.module( 'API' );
|
35
|
-
|
36
|
-
test( 'Reveal.isReady', function() {
|
37
|
-
strictEqual( Reveal.isReady(), true, 'returns true' );
|
38
|
-
});
|
39
|
-
|
40
|
-
test( 'Reveal.isOverview', function() {
|
41
|
-
strictEqual( Reveal.isOverview(), false, 'false by default' );
|
42
|
-
|
43
|
-
Reveal.toggleOverview();
|
44
|
-
strictEqual( Reveal.isOverview(), true, 'true after toggling on' );
|
45
|
-
|
46
|
-
Reveal.toggleOverview();
|
47
|
-
strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
|
48
|
-
});
|
49
|
-
|
50
|
-
test( 'Reveal.isPaused', function() {
|
51
|
-
strictEqual( Reveal.isPaused(), false, 'false by default' );
|
52
|
-
|
53
|
-
Reveal.togglePause();
|
54
|
-
strictEqual( Reveal.isPaused(), true, 'true after pausing' );
|
55
|
-
|
56
|
-
Reveal.togglePause();
|
57
|
-
strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
58
|
-
});
|
59
|
-
|
60
|
-
test( 'Reveal.isFirstSlide', function() {
|
61
|
-
Reveal.slide( 0, 0 );
|
62
|
-
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
63
|
-
|
64
|
-
Reveal.slide( 1, 0 );
|
65
|
-
strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );
|
66
|
-
|
67
|
-
Reveal.slide( 0, 0 );
|
68
|
-
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
69
|
-
});
|
70
|
-
|
71
|
-
test( 'Reveal.isFirstSlide after vertical slide', function() {
|
72
|
-
Reveal.slide( 1, 1 );
|
73
|
-
Reveal.slide( 0, 0 );
|
74
|
-
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( 0, 0 )' );
|
75
|
-
});
|
76
|
-
|
77
|
-
test( 'Reveal.isLastSlide', function() {
|
78
|
-
Reveal.slide( 0, 0 );
|
79
|
-
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
80
|
-
|
81
|
-
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
82
|
-
|
83
|
-
Reveal.slide( lastSlideIndex, 0 );
|
84
|
-
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
85
|
-
|
86
|
-
Reveal.slide( 0, 0 );
|
87
|
-
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
88
|
-
});
|
89
|
-
|
90
|
-
test( 'Reveal.isLastSlide after vertical slide', function() {
|
91
|
-
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
92
|
-
|
93
|
-
Reveal.slide( 1, 1 );
|
94
|
-
Reveal.slide( lastSlideIndex );
|
95
|
-
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
96
|
-
});
|
97
|
-
|
98
|
-
test( 'Reveal.getTotalSlides', function() {
|
99
|
-
strictEqual( Reveal.getTotalSlides(), 8, 'eight slides in total' );
|
100
|
-
});
|
101
|
-
|
102
|
-
test( 'Reveal.getIndices', function() {
|
103
|
-
var indices = Reveal.getIndices();
|
104
|
-
|
105
|
-
ok( indices.hasOwnProperty( 'h' ), 'h exists' );
|
106
|
-
ok( indices.hasOwnProperty( 'v' ), 'v exists' );
|
107
|
-
ok( indices.hasOwnProperty( 'f' ), 'f exists' );
|
108
|
-
|
109
|
-
Reveal.slide( 1, 0 );
|
110
|
-
strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
111
|
-
strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
112
|
-
|
113
|
-
Reveal.slide( 1, 2 );
|
114
|
-
strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
115
|
-
strictEqual( Reveal.getIndices().v, 2, 'v 2' );
|
116
|
-
|
117
|
-
Reveal.slide( 0, 0 );
|
118
|
-
strictEqual( Reveal.getIndices().h, 0, 'h 0' );
|
119
|
-
strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
120
|
-
});
|
121
|
-
|
122
|
-
test( 'Reveal.getSlide', function() {
|
123
|
-
equal( Reveal.getSlide( 0 ), document.querySelector( '.reveal .slides>section:first-child' ), 'gets correct first slide' );
|
124
|
-
equal( Reveal.getSlide( 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)' ), 'no v index returns stack' );
|
125
|
-
equal( Reveal.getSlide( 1, 0 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
126
|
-
equal( Reveal.getSlide( 1, 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
127
|
-
|
128
|
-
strictEqual( Reveal.getSlide( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
129
|
-
strictEqual( Reveal.getSlide( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
130
|
-
});
|
131
|
-
|
132
|
-
test( 'Reveal.getSlideBackground', function() {
|
133
|
-
equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
|
134
|
-
equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
|
135
|
-
equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
136
|
-
equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
137
|
-
|
138
|
-
strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
139
|
-
strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
140
|
-
});
|
141
|
-
|
142
|
-
test( 'Reveal.getPreviousSlide/getCurrentSlide', function() {
|
143
|
-
Reveal.slide( 0, 0 );
|
144
|
-
Reveal.slide( 1, 0 );
|
145
|
-
|
146
|
-
var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
|
147
|
-
var secondSlide = document.querySelector( '.reveal .slides>section:nth-child(2)>section' );
|
148
|
-
|
149
|
-
equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
|
150
|
-
equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
|
151
|
-
});
|
152
|
-
|
153
|
-
test( 'Reveal.getProgress', function() {
|
154
|
-
Reveal.slide( 0, 0 );
|
155
|
-
strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );
|
156
|
-
|
157
|
-
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
158
|
-
|
159
|
-
Reveal.slide( lastSlideIndex, 0 );
|
160
|
-
strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
|
161
|
-
});
|
162
|
-
|
163
|
-
test( 'Reveal.getScale', function() {
|
164
|
-
ok( typeof Reveal.getScale() === 'number', 'has scale' );
|
165
|
-
});
|
166
|
-
|
167
|
-
test( 'Reveal.getConfig', function() {
|
168
|
-
ok( typeof Reveal.getConfig() === 'object', 'has config' );
|
169
|
-
});
|
170
|
-
|
171
|
-
test( 'Reveal.configure', function() {
|
172
|
-
strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );
|
173
|
-
|
174
|
-
Reveal.configure({ loop: true });
|
175
|
-
strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );
|
176
|
-
|
177
|
-
Reveal.configure({ loop: false, customTestValue: 1 });
|
178
|
-
strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
|
179
|
-
});
|
180
|
-
|
181
|
-
test( 'Reveal.availableRoutes', function() {
|
182
|
-
Reveal.slide( 0, 0 );
|
183
|
-
deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );
|
184
|
-
|
185
|
-
Reveal.slide( 1, 0 );
|
186
|
-
deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );
|
187
|
-
});
|
188
|
-
|
189
|
-
test( 'Reveal.next', function() {
|
190
|
-
Reveal.slide( 0, 0 );
|
191
|
-
|
192
|
-
// Step through vertical child slides
|
193
|
-
Reveal.next();
|
194
|
-
deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );
|
195
|
-
|
196
|
-
Reveal.next();
|
197
|
-
deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );
|
198
|
-
|
199
|
-
Reveal.next();
|
200
|
-
deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );
|
201
|
-
|
202
|
-
// Step through fragments
|
203
|
-
Reveal.next();
|
204
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
|
205
|
-
|
206
|
-
Reveal.next();
|
207
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
|
208
|
-
|
209
|
-
Reveal.next();
|
210
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );
|
211
|
-
|
212
|
-
Reveal.next();
|
213
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
|
214
|
-
});
|
215
|
-
|
216
|
-
test( 'Reveal.next at end', function() {
|
217
|
-
Reveal.slide( 3 );
|
218
|
-
|
219
|
-
// We're at the end, this should have no effect
|
220
|
-
Reveal.next();
|
221
|
-
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
222
|
-
|
223
|
-
Reveal.next();
|
224
|
-
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
225
|
-
});
|
226
|
-
|
227
|
-
|
228
|
-
// ---------------------------------------------------------------
|
229
|
-
// FRAGMENT TESTS
|
230
|
-
|
231
|
-
QUnit.module( 'Fragments' );
|
232
|
-
|
233
|
-
test( 'Sliding to fragments', function() {
|
234
|
-
Reveal.slide( 2, 0, -1 );
|
235
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );
|
236
|
-
|
237
|
-
Reveal.slide( 2, 0, 0 );
|
238
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );
|
239
|
-
|
240
|
-
Reveal.slide( 2, 0, 2 );
|
241
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );
|
242
|
-
|
243
|
-
Reveal.slide( 2, 0, 1 );
|
244
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
|
245
|
-
});
|
246
|
-
|
247
|
-
test( 'Hiding all fragments', function() {
|
248
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
249
|
-
|
250
|
-
Reveal.slide( 2, 0, 0 );
|
251
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );
|
252
|
-
|
253
|
-
Reveal.slide( 2, 0, -1 );
|
254
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
|
255
|
-
});
|
256
|
-
|
257
|
-
test( 'Current fragment', function() {
|
258
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
259
|
-
|
260
|
-
Reveal.slide( 2, 0 );
|
261
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );
|
262
|
-
|
263
|
-
Reveal.slide( 2, 0, 0 );
|
264
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );
|
265
|
-
|
266
|
-
Reveal.slide( 1, 0, 0 );
|
267
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );
|
268
|
-
|
269
|
-
Reveal.slide( 3, 0, 0 );
|
270
|
-
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );
|
271
|
-
});
|
272
|
-
|
273
|
-
test( 'Stepping through fragments', function() {
|
274
|
-
Reveal.slide( 2, 0, -1 );
|
275
|
-
|
276
|
-
// forwards:
|
277
|
-
|
278
|
-
Reveal.next();
|
279
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
|
280
|
-
|
281
|
-
Reveal.right();
|
282
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
|
283
|
-
|
284
|
-
Reveal.down();
|
285
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
|
286
|
-
|
287
|
-
Reveal.down(); // moves to f #3
|
288
|
-
|
289
|
-
// backwards:
|
290
|
-
|
291
|
-
Reveal.prev();
|
292
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
|
293
|
-
|
294
|
-
Reveal.left();
|
295
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
|
296
|
-
|
297
|
-
Reveal.up();
|
298
|
-
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
|
299
|
-
});
|
300
|
-
|
301
|
-
test( 'Stepping past fragments', function() {
|
302
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
303
|
-
|
304
|
-
Reveal.slide( 0, 0, 0 );
|
305
|
-
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
|
306
|
-
|
307
|
-
Reveal.slide( 3, 0, 0 );
|
308
|
-
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
|
309
|
-
});
|
310
|
-
|
311
|
-
test( 'Fragment indices', function() {
|
312
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(2)' );
|
313
|
-
|
314
|
-
Reveal.slide( 3, 0, 0 );
|
315
|
-
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
|
316
|
-
|
317
|
-
// This slide has three fragments, first one is index 0, second and third have index 1
|
318
|
-
Reveal.slide( 2, 2, 0 );
|
319
|
-
equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
|
320
|
-
|
321
|
-
Reveal.slide( 2, 2, 1 );
|
322
|
-
equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
|
323
|
-
});
|
324
|
-
|
325
|
-
test( 'Index generation', function() {
|
326
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
327
|
-
|
328
|
-
// These have no indices defined to start with
|
329
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
330
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
331
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
|
332
|
-
});
|
333
|
-
|
334
|
-
test( 'Index normalization', function() {
|
335
|
-
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(3)' );
|
336
|
-
|
337
|
-
// These start out as 1-4-4 and should normalize to 0-1-1
|
338
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
339
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
340
|
-
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
|
341
|
-
});
|
342
|
-
|
343
|
-
asyncTest( 'fragmentshown event', function() {
|
344
|
-
expect( 2 );
|
345
|
-
|
346
|
-
var _onEvent = function( event ) {
|
347
|
-
ok( true, 'event fired' );
|
348
|
-
}
|
349
|
-
|
350
|
-
Reveal.addEventListener( 'fragmentshown', _onEvent );
|
351
|
-
|
352
|
-
Reveal.slide( 2, 0 );
|
353
|
-
Reveal.slide( 2, 0 ); // should do nothing
|
354
|
-
Reveal.slide( 2, 0, 0 ); // should do nothing
|
355
|
-
Reveal.next();
|
356
|
-
Reveal.next();
|
357
|
-
Reveal.prev(); // shouldn't fire fragmentshown
|
358
|
-
|
359
|
-
start();
|
360
|
-
|
361
|
-
Reveal.removeEventListener( 'fragmentshown', _onEvent );
|
362
|
-
});
|
363
|
-
|
364
|
-
asyncTest( 'fragmenthidden event', function() {
|
365
|
-
expect( 2 );
|
366
|
-
|
367
|
-
var _onEvent = function( event ) {
|
368
|
-
ok( true, 'event fired' );
|
369
|
-
}
|
370
|
-
|
371
|
-
Reveal.addEventListener( 'fragmenthidden', _onEvent );
|
372
|
-
|
373
|
-
Reveal.slide( 2, 0, 2 );
|
374
|
-
Reveal.slide( 2, 0, 2 ); // should do nothing
|
375
|
-
Reveal.prev();
|
376
|
-
Reveal.prev();
|
377
|
-
Reveal.next(); // shouldn't fire fragmenthidden
|
378
|
-
|
379
|
-
start();
|
380
|
-
|
381
|
-
Reveal.removeEventListener( 'fragmenthidden', _onEvent );
|
382
|
-
});
|
383
|
-
|
384
|
-
|
385
|
-
// ---------------------------------------------------------------
|
386
|
-
// AUTO-SLIDE TESTS
|
387
|
-
|
388
|
-
QUnit.module( 'Auto Sliding' );
|
389
|
-
|
390
|
-
test( 'Reveal.isAutoSliding', function() {
|
391
|
-
strictEqual( Reveal.isAutoSliding(), false, 'false by default' );
|
392
|
-
|
393
|
-
Reveal.configure({ autoSlide: 10000 });
|
394
|
-
strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );
|
395
|
-
|
396
|
-
Reveal.configure({ autoSlide: 0 });
|
397
|
-
strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
|
398
|
-
});
|
399
|
-
|
400
|
-
test( 'Reveal.toggleAutoSlide', function() {
|
401
|
-
Reveal.configure({ autoSlide: 10000 });
|
402
|
-
|
403
|
-
Reveal.toggleAutoSlide();
|
404
|
-
strictEqual( Reveal.isAutoSliding(), false, 'false after first toggle' );
|
405
|
-
Reveal.toggleAutoSlide();
|
406
|
-
strictEqual( Reveal.isAutoSliding(), true, 'true after second toggle' );
|
407
|
-
|
408
|
-
Reveal.configure({ autoSlide: 0 });
|
409
|
-
});
|
410
|
-
|
411
|
-
asyncTest( 'autoslidepaused', function() {
|
412
|
-
expect( 1 );
|
413
|
-
|
414
|
-
var _onEvent = function( event ) {
|
415
|
-
ok( true, 'event fired' );
|
416
|
-
}
|
417
|
-
|
418
|
-
Reveal.addEventListener( 'autoslidepaused', _onEvent );
|
419
|
-
Reveal.configure({ autoSlide: 10000 });
|
420
|
-
Reveal.toggleAutoSlide();
|
421
|
-
|
422
|
-
start();
|
423
|
-
|
424
|
-
// cleanup
|
425
|
-
Reveal.configure({ autoSlide: 0 });
|
426
|
-
Reveal.removeEventListener( 'autoslidepaused', _onEvent );
|
427
|
-
});
|
428
|
-
|
429
|
-
asyncTest( 'autoslideresumed', function() {
|
430
|
-
expect( 1 );
|
431
|
-
|
432
|
-
var _onEvent = function( event ) {
|
433
|
-
ok( true, 'event fired' );
|
434
|
-
}
|
435
|
-
|
436
|
-
Reveal.addEventListener( 'autoslideresumed', _onEvent );
|
437
|
-
Reveal.configure({ autoSlide: 10000 });
|
438
|
-
Reveal.toggleAutoSlide();
|
439
|
-
Reveal.toggleAutoSlide();
|
440
|
-
|
441
|
-
start();
|
442
|
-
|
443
|
-
// cleanup
|
444
|
-
Reveal.configure({ autoSlide: 0 });
|
445
|
-
Reveal.removeEventListener( 'autoslideresumed', _onEvent );
|
446
|
-
});
|
447
|
-
|
448
|
-
|
449
|
-
// ---------------------------------------------------------------
|
450
|
-
// CONFIGURATION VALUES
|
451
|
-
|
452
|
-
QUnit.module( 'Configuration' );
|
453
|
-
|
454
|
-
test( 'Controls', function() {
|
455
|
-
var controlsElement = document.querySelector( '.reveal>.controls' );
|
456
|
-
|
457
|
-
Reveal.configure({ controls: false });
|
458
|
-
equal( controlsElement.style.display, 'none', 'controls are hidden' );
|
459
|
-
|
460
|
-
Reveal.configure({ controls: true });
|
461
|
-
equal( controlsElement.style.display, 'block', 'controls are visible' );
|
462
|
-
});
|
463
|
-
|
464
|
-
test( 'Progress', function() {
|
465
|
-
var progressElement = document.querySelector( '.reveal>.progress' );
|
466
|
-
|
467
|
-
Reveal.configure({ progress: false });
|
468
|
-
equal( progressElement.style.display, 'none', 'progress are hidden' );
|
469
|
-
|
470
|
-
Reveal.configure({ progress: true });
|
471
|
-
equal( progressElement.style.display, 'block', 'progress are visible' );
|
472
|
-
});
|
473
|
-
|
474
|
-
test( 'Loop', function() {
|
475
|
-
Reveal.configure({ loop: true });
|
476
|
-
|
477
|
-
Reveal.slide( 0, 0 );
|
478
|
-
|
479
|
-
Reveal.left();
|
480
|
-
notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
|
481
|
-
|
482
|
-
Reveal.right();
|
483
|
-
equal( Reveal.getIndices().h, 0, 'looped from end to start' );
|
484
|
-
|
485
|
-
Reveal.configure({ loop: false });
|
486
|
-
});
|
487
|
-
|
488
|
-
|
489
|
-
// ---------------------------------------------------------------
|
490
|
-
// LAZY-LOADING TESTS
|
491
|
-
|
492
|
-
QUnit.module( 'Lazy-Loading' );
|
493
|
-
|
494
|
-
test( 'img with data-src', function() {
|
495
|
-
strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
|
496
|
-
});
|
497
|
-
|
498
|
-
test( 'background images', function() {
|
499
|
-
var imageSource1 = Reveal.getSlide( 0 ).getAttribute( 'data-background-image' );
|
500
|
-
var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
|
501
|
-
|
502
|
-
// check that the images are applied to the background elements
|
503
|
-
ok( Reveal.getSlideBackground( 0 ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
|
504
|
-
ok( Reveal.getSlideBackground( 1, 0 ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
|
505
|
-
});
|
506
|
-
|
507
|
-
|
508
|
-
// ---------------------------------------------------------------
|
509
|
-
// EVENT TESTS
|
510
|
-
|
511
|
-
QUnit.module( 'Events' );
|
512
|
-
|
513
|
-
asyncTest( 'slidechanged', function() {
|
514
|
-
expect( 3 );
|
515
|
-
|
516
|
-
var _onEvent = function( event ) {
|
517
|
-
ok( true, 'event fired' );
|
518
|
-
}
|
519
|
-
|
520
|
-
Reveal.addEventListener( 'slidechanged', _onEvent );
|
521
|
-
|
522
|
-
Reveal.slide( 1, 0 ); // should trigger
|
523
|
-
Reveal.slide( 1, 0 ); // should do nothing
|
524
|
-
Reveal.next(); // should trigger
|
525
|
-
Reveal.slide( 3, 0 ); // should trigger
|
526
|
-
Reveal.next(); // should do nothing
|
527
|
-
|
528
|
-
start();
|
529
|
-
|
530
|
-
Reveal.removeEventListener( 'slidechanged', _onEvent );
|
531
|
-
|
532
|
-
});
|
533
|
-
|
534
|
-
asyncTest( 'paused', function() {
|
535
|
-
expect( 1 );
|
536
|
-
|
537
|
-
var _onEvent = function( event ) {
|
538
|
-
ok( true, 'event fired' );
|
539
|
-
}
|
540
|
-
|
541
|
-
Reveal.addEventListener( 'paused', _onEvent );
|
542
|
-
|
543
|
-
Reveal.togglePause();
|
544
|
-
Reveal.togglePause();
|
545
|
-
|
546
|
-
start();
|
547
|
-
|
548
|
-
Reveal.removeEventListener( 'paused', _onEvent );
|
549
|
-
});
|
550
|
-
|
551
|
-
asyncTest( 'resumed', function() {
|
552
|
-
expect( 1 );
|
553
|
-
|
554
|
-
var _onEvent = function( event ) {
|
555
|
-
ok( true, 'event fired' );
|
556
|
-
}
|
557
|
-
|
558
|
-
Reveal.addEventListener( 'resumed', _onEvent );
|
559
|
-
|
560
|
-
Reveal.togglePause();
|
561
|
-
Reveal.togglePause();
|
562
|
-
|
563
|
-
start();
|
564
|
-
|
565
|
-
Reveal.removeEventListener( 'resumed', _onEvent );
|
566
|
-
});
|
567
|
-
|
568
|
-
|
569
|
-
} );
|
570
|
-
|
571
|
-
Reveal.initialize();
|
572
|
-
|