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

Unified Diff: polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.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-calendar/tests/google-calendar-list-basic.html
diff --git a/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html b/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html
new file mode 100644
index 0000000000000000000000000000000000000000..6d52247b9e984c03f6a8c78c94836d9bdfa0f5dc
--- /dev/null
+++ b/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<!-- Copyright (c) 2014 Google Inc. All rights reserved. -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name='viewport' content='width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes'>
+ <title>google-plusone Basic Tests</title>
+ <script src="../../webcomponentsjs/webcomponentsjs.min.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <link rel="import" href="../google-calendar.html">
+ </head>
+ <body>
+
+ <google-calendar-list title="What I'm up to"></google-calendar-list>
+
+ <script>
+
+ function testFetchesCalendars(calendarListEl) {
+ var testCalendar = {
+ 'kind': 'calendar#calendarListEntry',
+ 'id': 'test_id',
+ 'summary': 'test summary',
+ 'description': 'test description',
+ 'timeZone': 'Asia/Calcutta',
+ 'backgroundColor': '#000'
+ };
+
+ // Stub out calendar request call.
+ var api = calendarListEl.$.calendar.api;
+ var request = {
+ 'execute': function(callback) {
+ var resp = {
+ 'items': [testCalendar]
+ };
+ callback(resp);
+ }
+ };
+ sinon.stub(api.calendarList, 'list').returns(request);
+
+ calendarListEl.displayCalendars();
+ Platform.flush();
+
+ // Check if calendars get updated.
+ chai.expect(calendarListEl.calendars).to.eql([testCalendar]);
+ };
+
+ document.addEventListener('polymer-ready', function() {
+ var this = document.querySelector('google-calendar-list');
+
+ // Fake user's sign in.
+ var signin = cal.shadowRoot.querySelector('google-signin-aware');
+ signin.dispatchEvent(new Event('google-signin-aware-success'));
+
+ // Run tests.
+ this.addEventListener('google-api-load', function() {
+ testFetchesCalendars(this);
+ done();
+ });
+ });
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698