/** @override */
extraLibraries: [
+ 'common_test_util.js',
'cards.js'
]
};
var testActionUrlsB = {testField: 'TEST VALUE B'};
var testDismissalA = {testDismissalField: 'TEST DISMISSAL VALUE A'};
var testDismissalB = {testDismissalField: 'TEST DISMISSAL VALUE B'};
-var LOCATION_CARDS_LINK_THRESHOLD = 10;
-var localStorage = {locationCardsShown: 0};
+var EXPLANATORY_CARDS_LINK_THRESHOLD = 4;
+var localStorage = {explanatoryCardsShown: 0};
var notificationUpdateSuccessful = true;
var notificationUpdateFailed = false;
'chrome.alarms.create',
'instrumented.notifications.clear',
'chrome.storage.local.set',
- 'countLocationCard',
+ 'countExplanatoryCard',
'instrumented.alarms.onAlarm.addListener',
'instrumented.notifications.create',
'instrumented.notifications.update',
chromeNotificationsUpdateSavedArgs.match(ANYTHING)).
will(invokeCallback(
chromeNotificationsUpdateSavedArgs, 2, notificationUpdateSuccessful));
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300001}));
// Call tested method.
this.mockLocalFunctions.expects(once()).
onCardShown(eqJSON(testUncombinedNotification.receivedNotification));
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300001}));
// Call tested method.
this.mockApis.expects(once()).
chrome_alarms_clear(expectedAlarmId);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
instrumented_notifications_clear(testCardId, ANYTHING);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300001}));
// Call tested method.
var test = setUpCardManagerTest(this);
this.mockApis.expects(once()).
chrome_alarms_clear(expectedAlarmId);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
instrumented_notifications_clear(testCardId, ANYTHING);
var groups = {
chromeNotificationsUpdateSavedArgs.match(ANYTHING)).
will(invokeCallback(
chromeNotificationsUpdateSavedArgs, 2, notificationUpdateSuccessful));
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300001}));
// Call tested method.
var test = setUpCardManagerTest(this);
this.mockApis.expects(once()).
chrome_alarms_clear(expectedAlarmId);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
instrumented_notifications_clear(testCardId, ANYTHING);
var groups = {
var test = setUpCardManagerTest(this);
this.mockApis.expects(once()).
chrome_alarms_clear(expectedAlarmId);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
instrumented_notifications_clear(testCardId, ANYTHING);
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300010}));
// Call tested method.
chromeNotificationsUpdateSavedArgs.match(ANYTHING)).
will(invokeCallback(
chromeNotificationsUpdateSavedArgs, 2, notificationUpdateSuccessful));
- this.mockApis.expects(once()).
+ this.mockApis.expects(once()).
chrome_alarms_create(expectedAlarmId, eqJSON({when: 300001}));
this.mockApis.expects(once()).
chrome_storage_local_set(eqJSON({