The code is meant to output the current tab object for the page the user is viewing to the console but it just outputs undefined. It's run from within a browser action page.
chrome.tabs.getCurrent( function(tab){
console.log(tab);
} );
I've looked at the documentation and as far as I can tell the code seems to match what it says.
Try:
chrome.tabs.getSelected(null, function(tab){
console.log(tab);
});