| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var pass = chrome.test.callbackPass; | 5 var pass = chrome.test.callbackPass; |
| 6 var fail = chrome.test.callbackFail; | 6 var fail = chrome.test.callbackFail; |
| 7 var assertEq = chrome.test.assertEq; | 7 var assertEq = chrome.test.assertEq; |
| 8 var assertTrue = chrome.test.assertTrue; | 8 var assertTrue = chrome.test.assertTrue; |
| 9 | 9 |
| 10 var GOOGLE_URL = 'http://www.google.com/'; | 10 var GOOGLE_URL = 'http://www.google.com/'; |
| 11 var PICASA_URL = 'http://www.picasa.com/'; | 11 var PICASA_URL = 'http://www.picasa.com/'; |
| 12 | 12 |
| 13 // PORT will be changed to the port of the test server. | 13 // PORT will be changed to the port of the test server. |
| 14 var A_RELATIVE_URL = | 14 var A_RELATIVE_URL = |
| 15 'http://www.a.com:PORT/files/extensions/api_test/history/a.html'; | 15 'http://www.a.com:PORT/extensions/api_test/history/a.html'; |
| 16 var B_RELATIVE_URL = | 16 var B_RELATIVE_URL = |
| 17 'http://www.b.com:PORT/files/extensions/api_test/history/b.html'; | 17 'http://www.b.com:PORT/extensions/api_test/history/b.html'; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * A helper function to flip the setTimeout arguments and make the code | 20 * A helper function to flip the setTimeout arguments and make the code |
| 21 * more readable. | 21 * more readable. |
| 22 * @param {number} seconds The number of seconds to wait. | 22 * @param {number} seconds The number of seconds to wait. |
| 23 * @param {function} callback Closure. | 23 * @param {function} callback Closure. |
| 24 */ | 24 */ |
| 25 function waitAFewSeconds(seconds, callback) { | 25 function waitAFewSeconds(seconds, callback) { |
| 26 setTimeout(callback, seconds * 1000); | 26 setTimeout(callback, seconds * 1000); |
| 27 }; | 27 }; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 before: firstUrlTime - 100.0, | 172 before: firstUrlTime - 100.0, |
| 173 between: (firstUrlTime + secondUrlTime) / 2.0, | 173 between: (firstUrlTime + secondUrlTime) / 2.0, |
| 174 after: secondUrlTime + 100.0 | 174 after: secondUrlTime + 100.0 |
| 175 }); | 175 }); |
| 176 }); | 176 }); |
| 177 }); | 177 }); |
| 178 }); | 178 }); |
| 179 }); | 179 }); |
| 180 }); | 180 }); |
| 181 } | 181 } |
| OLD | NEW |