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

Unified Diff: chrome/browser/resources/google_now/utility_test_util.js

Issue 23477006: Unit tests for utility.js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing unit test + more arv@ comments Created 7 years, 3 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/browser/resources/google_now/utility_test_util.js
diff --git a/chrome/browser/resources/google_now/utility_test_util.js b/chrome/browser/resources/google_now/utility_test_util.js
new file mode 100644
index 0000000000000000000000000000000000000000..3ef36d1847641c3b343ab987ae16ecaccfeaa44a
--- /dev/null
+++ b/chrome/browser/resources/google_now/utility_test_util.js
@@ -0,0 +1,18 @@
+// Copyright 2013 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.
+
+// Mocks for globals needed for loading utility.js.
+
+var localStorage = {};
+
+chrome['alarms'] = {
+ get: emptyMock
+};
+chrome['identity'] = {
+ getAuthToken: emptyMock,
+ removeCachedAuthToken: emptyMock
+};
+
+mockChromeEvent(chrome, 'alarms.onAlarm');
+mockChromeEvent(chrome, 'runtime.onSuspend');
« no previous file with comments | « chrome/browser/resources/google_now/common_test_util.js ('k') | chrome/browser/resources/google_now/utility_unittest.gtestjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698