mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1096013 - Add a test that ensures that we don't lose the favicon for background tabs that crash. r=mikedeboer
MozReview-Commit-ID: BoF62uPSfUC --HG-- extra : rebase_source : 5549eaa87adcf93b81dbebc6e7e69c3ab5fc0e78
This commit is contained in:
parent
039c9ecb61
commit
e5f75b2640
@ -246,3 +246,5 @@ skip-if = !e10s # GroupedSHistory is e10s-only
|
||||
[browser_closed_objects_changed_notifications_tabs.js]
|
||||
[browser_closed_objects_changed_notifications_windows.js]
|
||||
[browser_duplicate_history.js]
|
||||
[browser_tabicon_after_bg_tab_crash.js]
|
||||
skip-if = !e10s # Tabs can't crash without e10s
|
||||
|
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
const FAVICON = "data:image/gif;base64,R0lGODlhCwALAIAAAAAA3pn/ZiH5BAEAAAEALAAAAAALAAsAAAIUhA+hkcuO4lmNVindo7qyrIXiGBYAOw==";
|
||||
const PAGE_URL = `data:text/html,
|
||||
<html>
|
||||
<head>
|
||||
<link rel="shortcut icon" href="${FAVICON}">
|
||||
</head>
|
||||
<body>
|
||||
Favicon!
|
||||
</body>
|
||||
</html>`;
|
||||
|
||||
/**
|
||||
* Tests that if a background tab crashes that it doesn't
|
||||
* lose the favicon in the tab.
|
||||
*/
|
||||
add_task(function* test_tabicon_after_bg_tab_crash() {
|
||||
let originalTab = gBrowser.selectedTab;
|
||||
|
||||
yield BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: PAGE_URL,
|
||||
}, function*(browser) {
|
||||
Assert.equal(browser.mIconURL, FAVICON, "Favicon is correctly set.");
|
||||
yield BrowserTestUtils.switchTab(gBrowser, originalTab);
|
||||
yield BrowserTestUtils.crashBrowser(browser,
|
||||
false /* shouldShowTabCrashPage */);
|
||||
Assert.equal(browser.mIconURL, FAVICON,
|
||||
"Favicon is still set after crash.");
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user