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

Unified Diff: chrome/test/data/extensions/api_test/filesystem_handler/background.html

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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/api_test/filesystem_handler/background.html
===================================================================
--- chrome/test/data/extensions/api_test/filesystem_handler/background.html (revision 0)
+++ chrome/test/data/extensions/api_test/filesystem_handler/background.html (revision 0)
@@ -0,0 +1,27 @@
+<script>
+// Context menu hanler method.
+function onRunContextMenuHandler() {
+ return function(info, tab) {
+ // Create a new tab
+ chrome.tabs.create({
+ url: "tab.html#" + info.srcUrl
+ });
+ };
+};
+
+
+chrome.test.runTests([function tab() {
+ // Register a context menu (file intent) handler.
+ chrome.contextMenus.create({
+ "title" : "Magic File Task",
+ "type" : "normal",
+ "targetUrlPatterns" : ["filesystem:*.txt" ],
+ "contexts" : ["file"],
+ "onclick" : onRunContextMenuHandler()
+ });
+ // Finish this test.
+ console.log("Registered contect menu handler.");
+ chrome.test.succeed();
+}]);
+
+</script>
Property changes on: chrome/test/data/extensions/api_test/filesystem_handler/background.html
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698