Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/sessions/sessions.js |
| diff --git a/chrome/test/data/extensions/api_test/sessions/sessions.js b/chrome/test/data/extensions/api_test/sessions/sessions.js |
| index 431edbec72fb11ed0a052bebb3a721a68cc1e13f..31a9c570b2233d3a8563fedc2aa45ef2e9d1db7b 100644 |
| --- a/chrome/test/data/extensions/api_test/sessions/sessions.js |
| +++ b/chrome/test/data/extensions/api_test/sessions/sessions.js |
| @@ -108,6 +108,16 @@ chrome.test.runTests([ |
| function retrieveClosedTabs() { |
| // Check that the recently closed list contains what we expect |
| // after removing tabs. |
| + var expectedCallbackCount = 2, callbackCount = 0; |
|
not at google - send to devlin
2014/03/17 14:21:18
what does this actually test?
wjywbs
2014/03/17 19:27:24
Lines 63-79 of this file describe that this retrie
|
| + var doneListening = chrome.test.listenForever( |
| + chrome.sessions.onRecentlyClosed, |
| + function() { |
| + callbackCount++; |
| + if (callbackCount == expectedCallbackCount) |
| + doneListening(); |
| + } |
| + ); |
| + |
| callForEach( |
| chrome.tabs.remove, |
| firstWindowTabIds.slice(0, 2).reverse(), |
| @@ -134,6 +144,16 @@ chrome.test.runTests([ |
| function retrieveClosedWindows() { |
| // Check that the recently closed list contains what we expect |
| // after removing windows. |
| + var expectedCallbackCount = 2, callbackCount = 0; |
| + var doneListening = chrome.test.listenForever( |
| + chrome.sessions.onRecentlyClosed, |
| + function() { |
| + callbackCount++; |
| + if (callbackCount == expectedCallbackCount) |
| + doneListening(); |
| + } |
| + ); |
| + |
| callForEach( |
| chrome.windows.remove, |
| windowIds.slice(1, 3).reverse(), |