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

Unified Diff: chrome/renderer/resources/extensions/notifications_test_util.js

Issue 291193009: Reland: Allow high-res bitmaps to be passed in from notifications API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test post-rebase. Created 6 years, 7 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: chrome/renderer/resources/extensions/notifications_test_util.js
diff --git a/chrome/renderer/resources/extensions/notifications_test_util.js b/chrome/renderer/resources/extensions/notifications_test_util.js
new file mode 100644
index 0000000000000000000000000000000000000000..85a30eee2bc1eeca029744e8ad0fca4885edbae6
--- /dev/null
+++ b/chrome/renderer/resources/extensions/notifications_test_util.js
@@ -0,0 +1,53 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// NotificationsTestUtil contains stubs for the global classes and
+// variables used by notifications_custom_bindings.js that are not
+// available with gtestjs tests.
+var require = function(library) {
+ return {
+ binding: {
+ 'Binding': {
+ 'create': function () {
+ return {
+ registerCustomHook: function () {},
+ generate: function () {}
+ };
+ }
+ }
+ },
+ sendRequest: {
+ sendRequest: function () {}
+ },
+ }[library];
+};
+
+var requireNative = function(library) {
+ return {
+ notifications_private: {
+ GetNotificationImageSizes: function () {
+ return {
+ scaleFactor: 0,
+ icon: { width: 0, height: 0 },
+ image: { width: 0, height: 0 },
+ buttonIcon: { width: 0, height: 0}
+ };
+ }
+ }
+ }[library];
+}
+
+var exports = {};
+
+var $Array = {
+ push: function (ary, val) {
+ ary.push(val);
+ }
+};
+
+var $Function = {
+ bind: function (fn, context) {
+ return fn.bind(context);
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698