summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/extensions/api_test/connect/page.js
blob: d70f4157d58b9135fb5e6e3abceba9918d45f0dd (plain)
1
2
3
4
5
6
7
8
9
10
// For test onRequest.
chrome.extension.sendRequest({step: 1}, function(response) {
  if (response.nextStep)
    chrome.extension.sendRequest({step: 2});
});

// For test sendRequest.
chrome.extension.onRequest.addListener(function(request, sendResponse) {
  sendResponse({success: (request.step2 == 1)});
});