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

Unified Diff: chrome/browser/resources/google_now/background_unittest.gtestjs

Issue 22912021: Handling errors from chrome APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 7 years, 4 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
« no previous file with comments | « chrome/browser/resources/google_now/background.js ('k') | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/google_now/background_unittest.gtestjs
diff --git a/chrome/browser/resources/google_now/background_unittest.gtestjs b/chrome/browser/resources/google_now/background_unittest.gtestjs
index 3abd4005da81abc28e06670e724e3feb32ad824e..f298348819ad6f984b0ed276d807ba48cd9bcea1 100644
--- a/chrome/browser/resources/google_now/background_unittest.gtestjs
+++ b/chrome/browser/resources/google_now/background_unittest.gtestjs
@@ -445,39 +445,6 @@ TEST_F(
TEST_F(
'GoogleNowBackgroundUnitTest',
- 'OnNotificationClicked_UrlNotString',
- function() {
- // Tests the case when selector returns a non-string, probably because of
- // a malformed server response.
- // In this case, the function should do nothing.
-
- // Setup and expectations.
- var testActionUrls = {testField: 'TEST VALUE'};
- var testNotificationId = 'TEST_ID';
- var testNotificationData = {
- notificationsData: {'TEST_ID': {actionUrls: testActionUrls}}
- };
- var testActionUrl = {};
-
- mockOnNotificationClickedDependencies(this);
- this.makeMockLocalFunctions(['selector']);
-
- var storageGetSavedArgs = new SaveMockArguments();
- this.mockApis.expects(once()).
- instrumented_storage_local_get(
- storageGetSavedArgs.match(eq('notificationsData')),
- storageGetSavedArgs.match(ANYTHING)).
- will(invokeCallback(storageGetSavedArgs, 1, testNotificationData));
- this.mockLocalFunctions.expects(once()).selector(testActionUrls).will(
- returnValue(testActionUrl));
-
- // Invoking the tested function.
- onNotificationClicked(
- testNotificationId, this.mockLocalFunctions.functions().selector);
- });
-
-TEST_F(
- 'GoogleNowBackgroundUnitTest',
'OnNotificationClicked_TabCreateSuccess',
function() {
// Tests the selected URL is OK and crome.tabs.create suceeds.
« no previous file with comments | « chrome/browser/resources/google_now/background.js ('k') | chrome/browser/resources/google_now/cards.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698