Index: polymer_1.0.4/bower_components/google-youtube/tests/google-youtube-custom-thumbnail.html |
diff --git a/polymer_1.0.4/bower_components/google-youtube/tests/google-youtube-custom-thumbnail.html b/polymer_1.0.4/bower_components/google-youtube/tests/google-youtube-custom-thumbnail.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9e6d0fb2b6b6ba471db2609fe9f68c7fb91be8ae |
--- /dev/null |
+++ b/polymer_1.0.4/bower_components/google-youtube/tests/google-youtube-custom-thumbnail.html |
@@ -0,0 +1,41 @@ |
+<!doctype html> |
+<!-- Copyright (c) 2014 Google Inc. All rights reserved. --> |
+<html> |
+ <head> |
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> |
+ <title>google-youtube Basic Tests</title> |
+ <script src="../../platform/platform.js"></script> |
+ <link rel="import" href="../../polymer-test-tools/tools.html"> |
+ <script src="../../polymer-test-tools/htmltest.js"></script> |
+ <link rel="import" href="../google-youtube.html"> |
+ </head> |
+ <body> |
+ <google-youtube thumbnail="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFElEQVQIHWP4z8DwHwyBNJDN8B8AQNEG+t5Ik2kAAAAASUVORK5CYII="></google-youtube> |
+ |
+ <script> |
+ function testThumbnailImgPresent(googleYouTube) { |
+ assert.ok(googleYouTube.shadowRoot.querySelector('img'), 'thumbnail <img> is present.'); |
+ } |
+ |
+ function testTapHandlerLoadsEmbed(googleYouTube) { |
+ googleYouTube.addEventListener('google-youtube-ready', function(e) { |
+ assert.notOk(googleYouTube.shadowRoot.querySelector('img'), 'thumbnail <img> is no longer present.'); |
+ |
+ assert.ok(googleYouTube.shadowRoot.querySelector('iframe'), 'YouTube embed <iframe> is present.'); |
+ |
+ done(); |
+ }); |
+ |
+ // Trigger the on-tap handler. |
+ googleYouTube.handleThumbnailTap(); |
+ } |
+ |
+ document.addEventListener('polymer-ready', function() { |
+ var googleYouTube = document.querySelector('google-youtube'); |
+ |
+ testThumbnailImgPresent(googleYouTube); |
+ testTapHandlerLoadsEmbed(googleYouTube); |
+ }); |
+ </script> |
+ </body> |
+</html> |