diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2015-05-06 11:25:50 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2015-05-06 11:25:58 +0200 |
commit | 207b0c71ede4a37ec06797802c22e7c5d61346f6 (patch) | |
tree | 82adb5c2337b857b33c8a53ea1013a56cfaa513f /test | |
parent | e67dc9251a38d19cf588eb226d32a67f4d71c7d7 (diff) | |
download | fosdem-2018-presentation-207b0c71ede4a37ec06797802c22e7c5d61346f6.tar fosdem-2018-presentation-207b0c71ede4a37ec06797802c22e7c5d61346f6.tar.gz |
fix lazy load selector error
Diffstat (limited to 'test')
-rw-r--r-- | test/test.html | 2 | ||||
-rw-r--r-- | test/test.js | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/test.html b/test/test.html index 93de5b1..34cf832 100644 --- a/test/test.html +++ b/test/test.html @@ -22,6 +22,8 @@ <section data-background-image="examples/assets/image1.png"> <h1>1</h1> <img data-src="fake-url.png"> + <video data-src="fake-url.mp4"></video> + <audio data-src="fake-url.mp3"></audio> </section> <section> diff --git a/test/test.js b/test/test.js index ff32ee8..79ff81e 100644 --- a/test/test.js +++ b/test/test.js @@ -495,6 +495,14 @@ Reveal.addEventListener( 'ready', function() { strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' ); }); + test( 'video with data-src', function() { + strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' ); + }); + + test( 'audio with data-src', function() { + strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' ); + }); + test( 'iframe with data-src', function() { Reveal.slide( 0, 0 ); strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' ); |