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

Unified Diff: chrome/test/data/extensions/activity_log/options.js

Issue 12517011: Added activity logging for ext APIs with custom bindings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 9 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/test/data/extensions/activity_log/options.html ('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/activity_log/options.js
diff --git a/chrome/test/data/extensions/activity_log/options.js b/chrome/test/data/extensions/activity_log/options.js
index c0af38529e8ef59fabe9c510292691e6ddd0c779..d7d290d2e5971b3c2e20fac9d323a4b695412a65 100644
--- a/chrome/test/data/extensions/activity_log/options.js
+++ b/chrome/test/data/extensions/activity_log/options.js
@@ -54,6 +54,20 @@ function makeApiCall() {
setCompleted('makeApiCall');
}
+// Makes an API call that has a custom binding.
+function makeSpecialApiCalls() {
+ var url = chrome.extension.getURL("image/cat.jpg");
+ var noparam = chrome.extension.getViews();
+ setCompleted('makeSpecialApiCalls');
+}
+
+// Checks that we don't double-log calls that go through setHandleRequest
+// *and* the ExtensionFunction machinery.
+function checkNoDoubleLogging() {
+ chrome.omnibox.setDefaultSuggestion({description: 'hello world'});
+ setCompleted('checkNoDoubleLogging');
+}
+
// Makes an API call that the extension doesn't have permission for.
function makeBlockedApiCall() {
try {
@@ -164,12 +178,14 @@ function doWebRequestModifications() {
// Attach the tests to buttons.
function setupEvents() {
$('api_call').addEventListener('click', makeApiCall);
+ $('special_call').addEventListener('click', makeSpecialApiCalls);
$('blocked_call').addEventListener('click', makeBlockedApiCall);
$('inject_cs').addEventListener('click', injectContentScript);
$('inject_blob').addEventListener('click', injectScriptBlob);
$('background_xhr').addEventListener('click', doBackgroundXHR);
$('cs_xhr').addEventListener('click', doContentScriptXHR);
$('webrequest').addEventListener('click', doWebRequestModifications);
+ $('double').addEventListener('click', checkNoDoubleLogging);
completed = 0;
total = document.getElementsByTagName('button').length;
« no previous file with comments | « chrome/test/data/extensions/activity_log/options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698