Closed
Bug 1288690
Opened 9 years ago
Closed 8 years ago
Add tests for XUL bindings
Categories
(L20n :: JS Library, defect)
L20n
JS Library
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Assigned: zbraniecki)
References
Details
Attachments
(1 file)
Add tests for the XUL bindings that can run in mozilla-central.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Assignee | ||
Updated•8 years ago
|
Attachment #8808838 -
Flags: review?(stas)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8808838 -
Flags: review?(stas)
Reporter | ||
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8808838 [details]
Bug 1288690 - Add tests for XUL bindings
https://reviewboard.mozilla.org/r/91572/#review91406
::: toolkit/content/tests/chrome/test_l20n.xul:25
(Diff revision 3)
> +
> + setTimeout(() => {
> + const item = document.getElementById('file-menu');
> + ok(item.hasAttribute('label'), "passed");
> + SimpleTest.finish();
> + }, 500);
Can you explain to me the consequences of waiting 500ms here? In particular:
- will it cause the suite to run .5s longer?
- can it cause intermittent failures if l20n's logic happens to take longer than 500ms?
::: toolkit/content/tests/chrome/test_l20n.xul:32
(Diff revision 3)
> + </script>
> +
> + <menuitem id="file-menu" data-l10n-id="file-menu" />
> + <body xmlns="http://www.w3.org/1999/xhtml">
> + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id="
> + target="_blank">Mozilla Bug </a>
Either remove this or fill in the bug number, please. Same in line 5 and line 7.
Comment 5•8 years ago
|
||
The timeout is showing our lack of "yeah, do stuff with the localized UI" that matjaz is also missing for pontoon.
Assignee | ||
Comment 6•8 years ago
|
||
yes, I'm happy to update the test once we have document.l10n.ready.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8808838 [details]
Bug 1288690 - Add tests for XUL bindings
https://reviewboard.mozilla.org/r/91572/#review91406
> Can you explain to me the consequences of waiting 500ms here? In particular:
>
> - will it cause the suite to run .5s longer?
> - can it cause intermittent failures if l20n's logic happens to take longer than 500ms?
Yes, at this point we don't seem to have a better way to verify that the translations have been applied.
Once we have document.l10n.ready promise that gets resolved after translateRoot completes, I'll switch to it.
Reporter | ||
Comment 9•8 years ago
|
||
Since there's no rush to get this one test in, can we first fix bug 1316083, then add `document.l10n.ready` in a new bug, and then land this bug?
I don't see much benefit in landing this right now knowing that we'll want to fix it anyways.
Reporter | ||
Comment 10•8 years ago
|
||
(In reply to Staś Małolepszy :stas from comment #9)
> Since there's no rush to get this one test in, can we first fix bug 1316083,
> then add `document.l10n.ready` in a new bug, and then land this bug?
Forgot that Matjaz already filed bug 1315811 for the second item on this list.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•8 years ago
|
||
:stas, this is ready for your review now.
Assignee | ||
Updated•8 years ago
|
Attachment #8808838 -
Flags: review?(stas) → review?(l10n)
Comment 13•8 years ago
|
||
mozreview-review |
Comment on attachment 8808838 [details]
Bug 1288690 - Add tests for XUL bindings
https://reviewboard.mozilla.org/r/91572/#review96512
::: toolkit/content/tests/chrome/test_l20n.xul:10
(Diff revision 5)
> +<window title="L20n.js XUL bindings test"
> + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
> + <script type="application/javascript"
> + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
> +
> + <link rel="localization" href="/browser/menubar.ftl"/>
Let's see if we can use a data uri here.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8808838 [details]
Bug 1288690 - Add tests for XUL bindings
Oh, MozReview...
Attachment #8808838 -
Flags: review?(stas) → review?(l10n)
Comment 16•8 years ago
|
||
mozreview-review |
Comment on attachment 8808838 [details]
Bug 1288690 - Add tests for XUL bindings
https://reviewboard.mozilla.org/r/91572/#review97104
Attachment #8808838 -
Flags: review?(l10n) → review+
Assignee | ||
Comment 17•8 years ago
|
||
https://hg.mozilla.org/projects/larch/rev/eb2dcb26ca17fb40c02e2ae70730ef45774ac9b6
Bug 1288690 - Add tests for XUL bindings. r=pike
Assignee | ||
Updated•8 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•