| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <script> | 
|  | 2 console.log('Starting hanler component!!!'); | 
|  | 3 var last_file_entries = null; | 
|  | 4 | 
|  | 5 function getLastFileEntries() { | 
|  | 6   return last_file_entries; | 
|  | 7 } | 
|  | 8 | 
|  | 9 chrome.fileBrowserHandler.onExecuteAction.addListener( | 
|  | 10   function(id, file_entries) { | 
|  | 11     if (id != "TestAction") { | 
|  | 12       chrome.test.fail("Unexpected action id: " + id); | 
|  | 13       return; | 
|  | 14     } | 
|  | 15     if (!file_entries || file_entries.length != 1) { | 
|  | 16       chrome.test.fail("Unexpected file url list"); | 
|  | 17       return; | 
|  | 18     } | 
|  | 19     last_file_entries = file_entries; | 
|  | 20     // Create a new tab | 
|  | 21     chrome.tabs.create({ | 
|  | 22       url: "tab.html" | 
|  | 23     }); | 
|  | 24   }); | 
|  | 25 | 
|  | 26 chrome.test.succeed(); | 
|  | 27 | 
|  | 28 </script> | 
| OLD | NEW | 
|---|