Bug 971336 - Add test for bug 970276 (r=felipe)

This commit is contained in:
Bill McCloskey 2014-02-21 11:06:38 -08:00
parent 19f8efe4ed
commit 7cbe4f5f48
6 changed files with 51 additions and 0 deletions

View File

@ -51,6 +51,10 @@ support-files =
file_bug906190_redirected.html file_bug906190_redirected.html
file_bug906190.js file_bug906190.js
file_bug906190.sjs file_bug906190.sjs
file_bug970276_popup1.html
file_bug970276_popup2.html
file_bug970276_favicon1.ico
file_bug970276_favicon2.ico
file_dom_notifications.html file_dom_notifications.html
file_fullscreen-window-open.html file_fullscreen-window-open.html
head.js head.js
@ -312,6 +316,7 @@ skip-if = os == "linux" # bug 857427
[browser_save_video.js] [browser_save_video.js]
[browser_scope.js] [browser_scope.js]
[browser_selectTabAtIndex.js] [browser_selectTabAtIndex.js]
[browser_subframe_favicons_not_used.js]
[browser_tabDrop.js] [browser_tabDrop.js]
[browser_tabMatchesInAwesomebar_perwindowpb.js] [browser_tabMatchesInAwesomebar_perwindowpb.js]
[browser_tab_drag_drop_perwindow.js] [browser_tab_drag_drop_perwindow.js]

View File

@ -0,0 +1,20 @@
/* Make sure <link rel="..."> isn't respected in sub-frames. */
function test() {
waitForExplicitFinish();
let testPath = getRootDirectory(gTestPath);
let tab = gBrowser.addTab(testPath + "file_bug970276_popup1.html");
tab.linkedBrowser.addEventListener("load", function() {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
let expectedIcon = testPath + "file_bug970276_favicon1.ico";
is(gBrowser.getIcon(tab), expectedIcon, "Correct icon.");
gBrowser.removeTab(tab);
finish();
}, true);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test file for bug 970276.</title>
<!--Set a favicon; that's the whole point of this file.-->
<link rel="icon" href="file_bug970276_favicon1.ico">
</head>
<body>
Test file for bug 970276.
<iframe src="file_bug970276_popup2.html">
</body>
</html>

View File

@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test file for bug 970276.</title>
<!--Set a favicon; that's the whole point of this file.-->
<link rel="icon" href="file_bug970276_favicon2.ico">
</head>
<body>
Test inner file for bug 970276.
</body>
</html>