mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
Bug 1311237
- Fix the intermittent through making the observer been added earlier. r=baku
--HG-- extra : rebase_source : 3b6029ee4369e5d4762a8dc5d6a21336ec4683b5
This commit is contained in:
parent
ce4c37a7ff
commit
0130d28bc6
@ -296,14 +296,17 @@ add_task(function* test_favicon_cache_firstParty() {
|
||||
.getService(Ci.nsICacheStorageService);
|
||||
networkCache.clear();
|
||||
|
||||
// Open the tab for the first site.
|
||||
let tabInfoA = yield openTab(TEST_SITE_ONE + TEST_CACHE_PAGE);
|
||||
|
||||
// Start to observer the event of that favicon has been fully loaded and cached.
|
||||
let promiseForFaviconLoaded = waitOnFaviconLoaded(THIRD_PARTY_SITE + TEST_FAVICON_CACHE_URI);
|
||||
|
||||
// Wait for the favicon response of the first tab.
|
||||
let response = yield waitOnFaviconResponse(THIRD_PARTY_SITE + TEST_FAVICON_CACHE_URI);
|
||||
// Start to observer for the favicon response of the first tab.
|
||||
let responsePromise = waitOnFaviconResponse(THIRD_PARTY_SITE + TEST_FAVICON_CACHE_URI);
|
||||
|
||||
// Open the tab for the first site.
|
||||
let tabInfoA = yield openTab(TEST_SITE_ONE + TEST_CACHE_PAGE);
|
||||
|
||||
// Waiting for the favicon response.
|
||||
let response = yield responsePromise;
|
||||
|
||||
// Make sure the favicon is loaded through the network and its first party domain is correct.
|
||||
is(response.topic, "http-on-examine-response", "The favicon image should be loaded through network.");
|
||||
|
Loading…
Reference in New Issue
Block a user