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

Unified Diff: chrome/test/data/extensions/api_test/activity_log_private/test/test.js

Issue 23629015: Add deletion to the activityLogPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undoing last commit 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
« no previous file with comments | « chrome/common/extensions/api/activity_log_private.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/activity_log_private/test/test.js
diff --git a/chrome/test/data/extensions/api_test/activity_log_private/test/test.js b/chrome/test/data/extensions/api_test/activity_log_private/test/test.js
index db6fa3f16cca4b64ec42cd8ed6a9b90305d2134a..4e5f4d53dba89e6689a485fd5edc0ec3f580b6eb 100644
--- a/chrome/test/data/extensions/api_test/activity_log_private/test/test.js
+++ b/chrome/test/data/extensions/api_test/activity_log_private/test/test.js
@@ -315,6 +315,70 @@ function checkIncognito(url, incognitoExpected) {
}
}
+testCases.push({
+ func: function checkHistoryForURL() {
+ var filter = new Object();
+ filter.extensionId = 'pknkgggnfecklokoggaggchhaebkajji';
+ filter.activityType = 'any';
+ filter.pageUrl = 'http://www.google.com';
+ chrome.activityLogPrivate.getExtensionActivities(
+ filter,
+ function(result) {
+ chrome.test.assertEq('pknkgggnfecklokoggaggchhaebkajji',
+ result['activities'][0]['extensionId']);
+ chrome.test.succeed();
+ });
+ }
+});
+
+testCases.push({
+ func: function deleteGoogleUrls() {
+ chrome.activityLogPrivate.deleteUrls(['http://www.google.com']);
+ var filter = new Object();
+ filter.extensionId = 'pknkgggnfecklokoggaggchhaebkajji';
+ filter.activityType = 'any';
+ filter.pageUrl = 'http://www.google.com';
+ chrome.activityLogPrivate.getExtensionActivities(
+ filter,
+ function(result) {
+ chrome.test.assertEq(0, result['activities'].length);
+ chrome.test.succeed();
+ });
+ }
+});
+
+testCases.push({
+ func: function deleteAllUrls() {
+ chrome.activityLogPrivate.deleteUrls([]);
+ var filter = new Object();
+ filter.extensionId = 'pknkgggnfecklokoggaggchhaebkajji';
+ filter.activityType = 'any';
+ filter.pageUrl = 'http://';
+ chrome.activityLogPrivate.getExtensionActivities(
+ filter,
+ function(result) {
+ chrome.test.assertEq(0, result['activities'].length);
+ chrome.test.succeed();
+ });
+ }
+});
+
+testCases.push({
+ func: function deleteAllHistory() {
+ chrome.activityLogPrivate.deleteDatabase();
+ var filter = new Object();
+ filter.extensionId = 'pknkgggnfecklokoggaggchhaebkajji';
+ filter.activityType = 'any';
+ filter.apiCall = '';
+ chrome.activityLogPrivate.getExtensionActivities(
+ filter,
+ function(result) {
+ chrome.test.assertEq(0, result['activities'].length);
+ chrome.test.succeed();
+ });
+ }
+});
+
// Listener to check the expected logging is done in the test cases.
var testCaseIndx = 0;
var callIndx = -1;
« no previous file with comments | « chrome/common/extensions/api/activity_log_private.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698