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..1c89503968e2eba4b39e65188824881642398bb6 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,53 @@ chrome.test.runTests([ |
]); |
chrome.tabs.create({ url: getURL('favicon/a.html') }); |
+ }, |
+ |
+ function historyReplaceState() { |
+ // No more events. Because replaceState doesn't change url. |
+ expect([ |
+ { status: 'loading', url: getURL('historyReplaceState/a.html') }, |
+ { 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' }, |
+ { url: getURL('historyReplaceStateUpdateUrl/a.html#a') }, |
+ ]); |
+ |
+ 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') }); |
} |
not at google - send to devlin
2015/07/01 15:57:15
Could you also test simple hash fragments, like lo
limasdf
2015/07/06 17:14:44
Done.
|
]); |