| OLD | NEW | 
| (Empty) |  | 
 |   1 <script> | 
 |   2 // Context menu hanler method. | 
 |   3 function onRunContextMenuHandler() { | 
 |   4   return function(info, tab) { | 
 |   5     // Create a new tab | 
 |   6     chrome.tabs.create({ | 
 |   7       url: "tab.html#" + info.srcUrl | 
 |   8     }); | 
 |   9   }; | 
 |  10 }; | 
 |  11  | 
 |  12  | 
 |  13 chrome.test.runTests([function tab() { | 
 |  14   // Register a context menu (file intent) handler. | 
 |  15   chrome.contextMenus.create({ | 
 |  16     "title" : "Magic File Task", | 
 |  17     "type" : "normal", | 
 |  18     "targetUrlPatterns" : ["filesystem:*.txt" ], | 
 |  19     "contexts" : ["file"], | 
 |  20     "onclick" : onRunContextMenuHandler() | 
 |  21   }); | 
 |  22   // Finish this test. | 
 |  23   console.log("Registered contect menu handler."); | 
 |  24   chrome.test.succeed(); | 
 |  25 }]); | 
 |  26  | 
 |  27 </script> | 
| OLD | NEW |