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

Unified Diff: polymer_1.0.4/bower_components/ga-api-utils/test/metadata/stubs/gapi.js

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/ga-api-utils/test/metadata/stubs/gapi.js
diff --git a/polymer_1.0.4/bower_components/ga-api-utils/test/metadata/stubs/gapi.js b/polymer_1.0.4/bower_components/ga-api-utils/test/metadata/stubs/gapi.js
new file mode 100644
index 0000000000000000000000000000000000000000..a80612f78ebb0668e922e9cd9357c4b2dbf69447
--- /dev/null
+++ b/polymer_1.0.4/bower_components/ga-api-utils/test/metadata/stubs/gapi.js
@@ -0,0 +1,36 @@
+// Copyright 2015 Google Inc. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/* global gapi:true, Promise:true */
+
+var fixtures = require('../fixtures/columns.json');
+var namespace = require('mout/object/namespace');
+
+// Polyfill Promises for node.
+Promise = require('native-promise-only');
+
+// Assign this globally because that's how it is IRL.
+namespace(global, 'gapi.client.analytics.metadata.columns');
+
+gapi.client.analytics.metadata.columns.list = function() {
+
+ var response = { result: fixtures };
+
+ return {
+ then: function(fn) {
+ return Promise.resolve(fn(response));
+ }
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698