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

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

Issue 6799020: Add support for a "frame" context option to chrome.contextMenus.create/update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update docs. Created 9 years, 8 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
new file mode 100644
index 0000000000000000000000000000000000000000..65d65619c6fb2414341df246819820c260cb356b
--- /dev/null
+++ b/chrome/test/data/extensions/context_menus/frames/test.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+window.onload = function() {
+ chrome.contextMenus.create(
+ {"title":"Page item", contexts: ["page"]},
+ function() {
+ if (!chrome.extension.lastError) {
+ chrome.contextMenus.create(
+ {"title":"Frame item", contexts: ["frame"]},
+ function() {
+ if (!chrome.extension.lastError) {
+ chrome.test.sendMessage("created items");
+ }
+ });
+ }
+ });
+};

Powered by Google App Engine
This is Rietveld 408576698