diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/examples/slide-backgrounds.html | 24 | ||||
-rw-r--r-- | test/test.js | 7 |
2 files changed, 26 insertions, 5 deletions
diff --git a/test/examples/slide-backgrounds.html b/test/examples/slide-backgrounds.html index ba020cb..25beab9 100644 --- a/test/examples/slide-backgrounds.html +++ b/test/examples/slide-backgrounds.html @@ -10,6 +10,16 @@ <link rel="stylesheet" href="../../css/reveal.css"> <link rel="stylesheet" href="../../css/theme/serif.css" id="theme"> + <style type="text/css" media="screen"> + .slides section.has-dark-background, + .slides section.has-dark-background h2 { + color: #fff; + } + .slides section.has-light-background, + .slides section.has-light-background h2 { + color: #222; + } + </style> </head> <body> @@ -26,6 +36,10 @@ <h2>data-background: #bb00bb</h2> </section> + <section data-background-color="lightblue"> + <h2>data-background: lightblue</h2> + </section> + <section> <section data-background="#ff0000"> <h2>data-background: #ff0000</h2> @@ -45,25 +59,25 @@ <section> <h2>Background applied to stack</h2> </section> - <section data-background="rgba(100, 0, 0, 0.2)"> + <section data-background="rgb(66, 66, 66)"> <h2>Background applied to slide inside of stack</h2> </section> </section> - <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(255,255,255,0.9)"> + <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)"> <h2>Background image</h2> </section> <section> - <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(255,255,255,0.9)"> + <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)"> <h2>Background image</h2> </section> - <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(255,255,255,0.9)"> + <section data-background-transition="slide" data-background="assets/image1.png" style="background: rgba(0,0,0,0.9)"> <h2>Background image</h2> </section> </section> - <section data-background="assets/image2.png" data-background-size="100px" data-background-repeat="repeat" data-background-color="#111" style="background: rgba(255,255,255,0.9)"> + <section data-background="assets/image2.png" data-background-size="100px" data-background-repeat="repeat" data-background-color="#111" style="background: rgba(0,0,0,0.9)"> <h2>Background image</h2> <pre>data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"</pre> </section> diff --git a/test/test.js b/test/test.js index 6c7270f..3f93d3c 100644 --- a/test/test.js +++ b/test/test.js @@ -313,6 +313,13 @@ Reveal.addEventListener( 'ready', function() { Reveal.slide( 3, 0, 0 ); 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 ); + equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' ); + + Reveal.slide( 2, 2, 1 ); + equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' ); }); test( 'Index generation', function() { |