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

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

Issue 2962093002: [Extensions Bindings] Add activity logging of custom handling (Closed)
Patch Set: nit Created 3 years, 5 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/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 fb726a489b9b21ed33317038d2a37c48ee41c368..d4ea2bccf57990ab3d98775b54fd611767160723 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
@@ -39,9 +39,11 @@ testCases.push({
'app_bindings', function response() { });
},
expected_activity: [
- 'app.GetDetails',
- 'app.GetIsInstalled',
- 'app.getInstallState'
+ // These API calls show up differently depending on whether native bindings
+ // are enabled.
+ /app\.[gG]etDetails/,
+ /app\.[gG]etIsInstalled/,
+ /app\.(getI|i)nstallState/,
]
});
testCases.push({
@@ -482,7 +484,11 @@ chrome.activityLogPrivate.onExtensionActivity.addListener(
expectedCall = testCase.expected_activity[callIndx];
}
console.log('Logged:' + apiCall + ' Expected:' + expectedCall);
- chrome.test.assertEq(expectedCall, apiCall);
+ // Allow either a RegExp or a strict string comparison.
+ if (expectedCall instanceof RegExp)
+ chrome.test.assertTrue(expectedCall.test(apiCall));
+ else
+ chrome.test.assertEq(expectedCall, apiCall);
// Check that no real URLs are logged in incognito-mode tests. Ignore
// the initial call to windows.create opening the tab.
« no previous file with comments | « chrome/test/data/extensions/api_test/activity_log_private/PRESUBMIT.py ('k') | extensions/renderer/api_activity_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698