Chromium Code Reviews| Index: chrome/browser/resources/ntp_search/mock/mockOld.js |
| diff --git a/chrome/browser/resources/ntp_search/mock/mockOld.js b/chrome/browser/resources/ntp_search/mock/mockOld.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1325eb20f137ca641fb8e20ef33c94e2deb40e2d |
| --- /dev/null |
| +++ b/chrome/browser/resources/ntp_search/mock/mockOld.js |
| @@ -0,0 +1,74 @@ |
| +ntpMock = {}; |
|
jeremycho_google
2012/07/31 03:09:16
Is this file still needed?
pedrosimonetti2
2012/08/03 18:14:01
No. This was the old version of the Super-Awesome-
|
| + |
| +ntpMock.getMostVisited = { |
| + context: ntp, |
| + callback: ntp.setMostVisitedPages, |
| + args: [ |
| + // data |
| + [ |
| + { |
| + "direction": "ltr", |
| + "title": "The New York Times - Breaking News, World News & Multimedia", |
| + "url": "http://nytimes.com/", |
| + "thumbnail": "chrome---thumb-http---www.nytimes.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "YouTube - Broadcast Yourself.", |
| + "url": "http://www.youtube.com/", |
| + "thumbnail": "chrome---thumb-http---www.youtube.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "CNN.com - Breaking News, U.S., World, Weather, Entertainment & Video News", |
| + "url": "http://cnn.com/", |
| + "thumbnail": "chrome---thumb-http---www.cnn.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "Electronics, Cars, Fashion, Collectibles, Coupons and More Online Shopping | eBay", |
| + "url": "http://ebay.com/", |
| + "thumbnail": "chrome---thumb-http---www.ebay.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "WEFUNK Radio - Hip-Hop & The Original Funk", |
| + "url": "http://wefunkradio.com/", |
| + "thumbnail": "chrome---thumb-http---www.wefunkradio.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "Google Maps", |
| + "url": "http://maps.google.com/", |
| + "thumbnail": "chrome---thumb-http---maps.google.com-" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "Welcome to Google Chrome", |
| + "url": "http://www.google.com/chrome/intl/en/welcome.html", |
| + "thumbnail": "http---www.google.com-chrome-intl-en-welcome.html" |
| + }, |
| + { |
| + "direction": "ltr", |
| + "title": "Chrome Web Store", |
| + "url": "https://chrome.google.com/webstore?hl=en", |
| + "thumbnail": "chrome---thumb-https---chrome.google.com-webstore-category-home" |
| + } |
| + ], |
| + // hasBlacklistedUrls |
| + false |
| + ] |
| +}; |
| + |
| +chrome.send_ = chrome.send; |
| + |
| +chrome.send = function(message) { |
| + var mock = ntpMock[message]; |
| + if (mock) { |
| + setTimeout(function(){ |
| + mock.callback.apply(mock.context, mock.args); |
| + }, 0); |
| + } else { |
| + chrome.send_(message); |
| + } |
| +} |