Test for Bug 852909 - Test that the charset menu gets disabled for images and PDF.js. r=Gijs.
authorHenri Sivonen <hsivonen@hsivonen.fi>
Tue, 26 Nov 2013 09:31:52 +0200
changeset 157486 99479edbee2a
parent 157485 a85ba1d0caee
child 157502 4a8c40940659
child 157525 f8e20098163c
push id25713
push usercbook@mozilla.com
push dateTue, 26 Nov 2013 11:36:06 +0000
treeherdermozilla-central@99479edbee2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs852909
milestone28.0a1
first release with
nightly linux32
99479edbee2a / 28.0a1 / 20131126052050 / files
nightly linux64
99479edbee2a / 28.0a1 / 20131126052050 / files
nightly mac
99479edbee2a / 28.0a1 / 20131126052050 / files
nightly win32
99479edbee2a / 28.0a1 / 20131126052050 / files
nightly win64
99479edbee2a / 28.0a1 / 20131126052050 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Test for Bug 852909 - Test that the charset menu gets disabled for images and PDF.js. r=Gijs.
docshell/test/browser/browser.ini
docshell/test/browser/browser_bug852909.js
docshell/test/browser/file_bug852909.pdf
docshell/test/browser/file_bug852909.png
--- a/docshell/test/browser/browser.ini
+++ b/docshell/test/browser/browser.ini
@@ -25,16 +25,18 @@ support-files =
   file_bug234628-8-child.html
   file_bug234628-8.html
   file_bug234628-9-child.html
   file_bug234628-9.html
   file_bug420605.html
   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
   test-form_sjis.html
 
 [browser_bug134911.js]
 [browser_bug234628-1.js]
 [browser_bug234628-10.js]
@@ -54,13 +56,14 @@ support-files =
 [browser_bug422543.js]
 [browser_bug441169.js]
 [browser_bug503832.js]
 [browser_bug554155.js]
 [browser_bug655270.js]
 [browser_bug655273.js]
 [browser_bug670318.js]
 [browser_bug673467.js]
+[browser_bug852909.js]
 [browser_bug92473.js]
 [browser_bug941562.js]
 [browser_loadDisallowInherit.js]
 [browser_loadURI.js]
 [browser_search_notification.js]
new file mode 100644
--- /dev/null
+++ b/docshell/test/browser/browser_bug852909.js
@@ -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();
+}
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..89066463f1013406536fec88813da93abca5483a
GIT binary patch
literal 1568
zc$~FVL2eT<6osu%z|xya?IQ8m6VHsRs*7eCT0v>rR063&XfoqWTr%U-aY*0@oQfMD
zw%mdpJFwkJGQwrSf+$k#=jZ?5fB!ps!*tNW-4Fr{11QIL;OGdTVOH`5BnG(#=;q^`
zL)6c7Hj^bdJ_fulERnP>JaF7KfL@4V0dHYwufw+h_2shG5Vx*|k6yKT6*tr-@ikw_
zrOJ&G%X@P<zT>$zYlzOP046THiHU|v<|D3Qv_&p>A+i&>hPQ#iaAdw#hmvz2l(jZF
z7qHh<J6%>|h_T!46!%(+U-G)tQ%E<Ig;qSPz&*fLf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