mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Test for Bug 852909 - Test that the charset menu gets disabled for images and PDF.js. r=Gijs.
This commit is contained in:
parent
2a889b2de7
commit
f4fdb24845
@ -30,6 +30,8 @@ support-files =
|
||||
file_bug503832.html
|
||||
file_bug655270.html
|
||||
file_bug670318.html
|
||||
file_bug852909.pdf
|
||||
file_bug852909.png
|
||||
file_bug941562-child.html
|
||||
file_bug941562.html
|
||||
print_postdata.sjs
|
||||
@ -59,6 +61,7 @@ support-files =
|
||||
[browser_bug655273.js]
|
||||
[browser_bug670318.js]
|
||||
[browser_bug673467.js]
|
||||
[browser_bug852909.js]
|
||||
[browser_bug92473.js]
|
||||
[browser_bug941562.js]
|
||||
[browser_loadDisallowInherit.js]
|
||||
|
33
docshell/test/browser/browser_bug852909.js
Normal file
33
docshell/test/browser/browser_bug852909.js
Normal file
@ -0,0 +1,33 @@
|
||||
var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug852909.png");
|
||||
gBrowser.selectedBrowser.addEventListener("load", image, true);
|
||||
}
|
||||
|
||||
function image(event) {
|
||||
if (event.target != gBrowser.contentDocument) {
|
||||
return;
|
||||
}
|
||||
gBrowser.selectedBrowser.removeEventListener("load", image, true);
|
||||
|
||||
ok(!gBrowser.docShell.mayEnableCharacterEncodingMenu, "Docshell should say the menu should be disabled for images.");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
gBrowser.selectedTab = gBrowser.addTab(rootDir + "file_bug852909.pdf");
|
||||
gBrowser.selectedBrowser.addEventListener("load", pdf, true);
|
||||
}
|
||||
|
||||
function pdf(event) {
|
||||
if (event.target != gBrowser.contentDocument) {
|
||||
return;
|
||||
}
|
||||
gBrowser.selectedBrowser.removeEventListener("load", pdf, true);
|
||||
|
||||
ok(!gBrowser.docShell.mayEnableCharacterEncodingMenu, "Docshell should say the menu should be disabled for PDF.js.");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}
|
BIN
docshell/test/browser/file_bug852909.pdf
Normal file
BIN
docshell/test/browser/file_bug852909.pdf
Normal file
Binary file not shown.
BIN
docshell/test/browser/file_bug852909.png
Normal file
BIN
docshell/test/browser/file_bug852909.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 B |
Loading…
Reference in New Issue
Block a user