| Index: chrome/test/data/extensions/api_test/tabs/on_updated/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/tabs/on_updated/test.js b/chrome/test/data/extensions/api_test/tabs/on_updated/test.js
|
| index 05bf7e97bbff827b125fda2d6680e74faccd20b7..287e68d8b1e37d74ead7bc67989c1cc3f0c198cc 100644
|
| --- a/chrome/test/data/extensions/api_test/tabs/on_updated/test.js
|
| +++ b/chrome/test/data/extensions/api_test/tabs/on_updated/test.js
|
| @@ -119,5 +119,69 @@ chrome.test.runTests([
|
| ]);
|
|
|
| chrome.tabs.create({ url: getURL('favicon/a.html') });
|
| - }
|
| + },
|
| +
|
| + function historyReplaceState() {
|
| + expect([
|
| + { status: 'loading', url: getURL('historyReplaceState/a.html') },
|
| + { status: 'complete' },
|
| + { status: 'loading' },
|
| + { status: 'complete' },
|
| + ]);
|
| +
|
| + chrome.tabs.create({ url: getURL('historyReplaceState/a.html') });
|
| + },
|
| +
|
| + function historyReplaceStateUpdateUrl() {
|
| + // url status is updated. Because history.replaceState updates url.
|
| + expect([
|
| + { status: 'loading', url: getURL('historyReplaceStateUpdateUrl/a.html') },
|
| + { status: 'complete' },
|
| + { status: 'loading',
|
| + url: getURL('historyReplaceStateUpdateUrl/a.html#a') },
|
| + { status: 'complete' },
|
| + ]);
|
| +
|
| + chrome.tabs.create({ url: getURL('historyReplaceStateUpdateUrl/a.html') });
|
| + },
|
| +
|
| + function historyPushState() {
|
| + // - a.html starts loading and complete.
|
| + // - historyPushState doesn't updates current url.
|
| + expect([
|
| + { status: 'loading', url: getURL('historyPushState/a.html') },
|
| + { status: 'complete' },
|
| + { status: 'loading' },
|
| + { status: 'complete' },
|
| + ]);
|
| +
|
| + chrome.tabs.create({ url: getURL('historyPushState/a.html') });
|
| + },
|
| +
|
| + function historyPushStateUpdateUrl() {
|
| + // - a.html starts loading and complete.
|
| + // - historyPushState updates current url. so that 'loading' and 'complete'
|
| + // are fired with updated url.
|
| + expect([
|
| + { status: 'loading', url: getURL('historyPushStateUpdateUrl/a.html') },
|
| + { status: 'complete' },
|
| + { status: 'loading', url: getURL('historyPushStateUpdateUrl/a.html#a') },
|
| + { status: 'complete' },
|
| + ]);
|
| +
|
| + chrome.tabs.create({ url: getURL('historyPushStateUpdateUrl/a.html') });
|
| + },
|
| +
|
| + function locationReplace() {
|
| + // location.replace("#foo") updates current url. so that 'loading' and
|
| + // 'complete' are fired with updated url.
|
| + expect([
|
| + { status: 'loading', url: getURL('locationReplace/a.html') },
|
| + { status: 'complete' },
|
| + { status: 'loading', url: getURL('locationReplace/a.html#foo') },
|
| + { status: 'complete' },
|
| + ]);
|
| +
|
| + chrome.tabs.create({ url: getURL('locationReplace/a.html') });
|
| + },
|
| ]);
|
|
|