Closed Bug 1221976 Opened 4 years ago Closed 4 years ago

Intermittent test_input_textarea_set_value_no_scroll.html | sanity check: screenshots should be the same

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox45 --- fixed
firefox46 --- fixed

People

(Reporter: cbook, Unassigned)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer.html#?job_id=2597691&repo=mozilla-central

 04:33:34     INFO -  561 INFO TEST-UNEXPECTED-FAIL | dom/html/test/forms/test_input_textarea_set_value_no_scroll.html | sanity check: screenshots should be the same
 04:33:34     INFO -      test@dom/html/test/forms/test_input_textarea_set_value_no_scroll.html:35:5
 04:33:34     INFO -      runTest@dom/html/test/forms/test_input_textarea_set_value_no_scroll.html:94:5
 04:33:34     INFO -      @dom/html/test/forms/test_input_textarea_set_value_no_scroll.html:107:5
 04:33:34     INFO -      SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@SimpleTest/SimpleTest.js:735:59
Component: General → DOM: Core & HTML
Duplicate of this bug: 1222266
Depends on: 1223198
Comment on attachment 8709101 [details] [diff] [review]
Disable resizing and themed rendering of textarea/input in mochitest test_input_textarea_set_value_no_scroll.html to work around unreliable Gtk3 themed-widget rendering

Review of attachment 8709101 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/html/test/forms/test_input_textarea_set_value_no_scroll.html
@@ +112,5 @@
>  <body>
>  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829606">Mozilla Bug 829606</a>
>  <p id="display"></p>
>  <div id="content">
> +  <textarea rows='1' cols='5' style='resize:none; -moz-appearance:none;'>this is a \n long text</textarea>

Do we really need both "resize:none" *and* "-moz-appearance: none" on this textarea?

IIRC:
 - For textareas with differences of this sort, usually it's just the resizer that differs
 - So, we can probably just get away with using "resize: none" (by itself)
 - But regardless, the differences seem to have started with GTK3 theming, so we should definintely be able to get away with using "-moz-appearance:none" (by itself).

r=me with one or the other, or with an explanation for why we need both.  (and if you adjust the patch, make sure the commit message remains accurate)
Attachment #8709101 - Flags: review?(dholbert) → review+
(In reply to Daniel Holbert [:dholbert] from comment #22)
> Comment on attachment 8709101 [details] [diff] [review]
> Disable resizing and themed rendering of textarea/input in mochitest
> test_input_textarea_set_value_no_scroll.html to work around unreliable Gtk3
> themed-widget rendering
> 
> Review of attachment 8709101 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/html/test/forms/test_input_textarea_set_value_no_scroll.html
> @@ +112,5 @@
> >  <body>
> >  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829606">Mozilla Bug 829606</a>
> >  <p id="display"></p>
> >  <div id="content">
> > +  <textarea rows='1' cols='5' style='resize:none; -moz-appearance:none;'>this is a \n long text</textarea>
> 
> Do we really need both "resize:none" *and* "-moz-appearance: none" on this
> textarea?

Probably not. TBH, I don't even know if it's the <textarea> or the <input> that's causing the discrepancy in any given failure, as AFAICS the mochitest logs don't capture the two screenshots for us. So I just aimed a sledgehammer at the test in general, hoping it'd keep things quiet. :)

But I think you're right, just applying -moz-appearance:none ought to be sufficient.
If you like, you could replace this file's "compareSnapshots" invocations (and the "ok" checks right after them) with "assertSnapshots" -- that's a handy wrapper that jwatt added which dumps the screenshots in reftest-analyzer format on failure.

It's defined here:
  http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/WindowSnapshot.js#55

No big deal if you don't have cycles to get that working, though.
https://hg.mozilla.org/integration/mozilla-inbound/rev/a257bedc71baf54e258086fb7431fe99f0309c56
Bug 1221976 - Use -moz-appearance:none on textarea and input elements in mochitest test_input_textarea_set_value_no_scroll.html to work around unreliable Gtk3 themed-widget rendering. r=dholbert
https://hg.mozilla.org/mozilla-central/rev/a257bedc71ba
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.