Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: polymer_1.0.4/bower_components/google-youtube/tests/google-youtube-custom-thumbnail.html

Issue 1205703007: Add polymer 1.0 to npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Renamed folder to 1.0.4 Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698