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

Unified Diff: chrome/test/data/extensions/context_menus/frames/test.js

Issue 1772513002: Add frameId to contextMenus.onClicked / onclick. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/test/data/extensions/context_menus/frames/test.js
diff --git a/chrome/test/data/extensions/context_menus/frames/test.js b/chrome/test/data/extensions/context_menus/frames/test.js
index 2a2bad1701a3dda0d86c2112e8ec85324b5dfda5..f6d9872ba97b95fae46fcacb7068e93e21dab1dc 100644
--- a/chrome/test/data/extensions/context_menus/frames/test.js
+++ b/chrome/test/data/extensions/context_menus/frames/test.js
@@ -3,8 +3,13 @@
// found in the LICENSE file.
window.onload = function() {
+ function onclick(info, tab) {
+ chrome.test.sendMessage('pageUrl=' + info.pageUrl +
+ ', frameUrl=' + info.frameUrl +
+ ', frameId=' + info.frameId);
+ }
chrome.contextMenus.create(
- {"title":"Page item", contexts: ["page"]},
+ {'title':'Page item', contexts: ['page'], id: 'item1', onclick: onclick},
function() {
if (!chrome.runtime.lastError) {
chrome.contextMenus.create(

Powered by Google App Engine
This is Rietveld 408576698