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 |