Bug 1450538 - Browser test to ensure that the StatusPanel displays an IDN. r=Gijs
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sat, 14 Apr 2018 21:27:11 +0900
changeset 413902 4213de0783d3f5f9f22c7fe24e1d23e5fb0a606e
parent 413901 aee0f2f18cde9801a95357c309bcdce7adf0f4f6
child 413903 37c73a2ce762bdc99cc946914193ae55cffe4cfb
push id33853
push usercbrindusan@mozilla.com
push dateTue, 17 Apr 2018 09:51:13 +0000
treeherdermozilla-central@8b0ba3f7d099 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1450538
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1450538 - Browser test to ensure that the StatusPanel displays an IDN. r=Gijs MozReview-Commit-ID: 2DFZgqQTN7K
browser/base/content/test/statuspanel/browser.ini
browser/base/content/test/statuspanel/browser_show_statuspanel_idn.js
--- a/browser/base/content/test/statuspanel/browser.ini
+++ b/browser/base/content/test/statuspanel/browser.ini
@@ -1,5 +1,7 @@
 [DEFAULT]
 support-files =
   head.js
 
 [browser_show_statuspanel_twice.js]
+[browser_show_statuspanel_idn.js]
+skip-if = webrender && verify
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/statuspanel/browser_show_statuspanel_idn.js
@@ -0,0 +1,23 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_PAGE_URL = encodeURI(`data:text/html;charset=utf-8,<a id="foo" href="http://nic.xn--rhqv96g/">abc</a><span id="bar">def</span>`);
+const TEST_STATUS_TEXT = "nic.\u4E16\u754C";
+
+/**
+ * Test that if the StatusPanel displays an IDN
+ * (Bug 1450538).
+ */
+add_task(async function test_show_statuspanel_twice() {
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE_URL);
+
+  let promise = promiseStatusPanelShown(window, TEST_STATUS_TEXT);
+  ContentTask.spawn(tab.linkedBrowser, null, async () => {
+    content.document.links[0].focus();
+  });
+  await promise;
+
+  await BrowserTestUtils.removeTab(tab);
+});