Re: [css-ui-3-tests] [css-ui-3] Add tests for text-overflow (#5285)

Originally posted as https://github.com/w3c/csswg-test/pull/1196#issuecomment-289198561 by @frivoal on 25 Mar 2017, 08:45 UTC:

> @fantasai 
> 
> > Most of your tests are optimized to make a green square at a great cost to understandability. [...] Please re-review your green square tests and rewrite as needed.
> 
> They did not feel that convoluted when I wrote them, but re-reading after having had enough time to forget, I agree that it takes more effort to figure out what they do than it should. I'll review and rework them in that light.
> 
> > 018 is a pretty good test, but [...] Alternately maybe that qualifies as a fail. I'm not sure.
> 
> It qualifies as a fail. You are trying to select the whole elided text to see if it copy&pastes fine, while the spec says that selecting the ellipsis itself should select the elided text. Firefox doesn't do that, which is what makes selecting everything hard. so it's a fail. Do you think it would be enough to clarify the text of the test to make it clear that you're only supposed to try and select the visible "...", or do you think deeper changes to the test are needed?
> 
> > 019 says “are selected” ... there are two things to check here -- one is whether they appear highlighted, the other is whether they will copy when a copy command is initiated. You need to check both, explicitly.
> 
> Hmm, not sure about that. The spec says "If all of the ellipsed text is selected, UAs should show selection of the ellipsis". If the whole text is selected, and the ellipsis is highlighted, and something doesn't copy, that certainly does not sound like a nice behavior, but I don't see which part of css-ui-3 it would violate. If `selectAllChildren()` fails to select everything, that sounds like a spec violation of the Selection API spec, but I am not testing that here. Based on that, I think the test is correct as is, maybe just with a rephrasing from "are selected" to "are highlighted" (or "appear selected" to avoid making assumptions about how UAs show that things are selected). No?
> 
> I suppose I could also write a text that checks that selectAllChildren is unaffected text-overflow, but that feels like something the Selection API spec should test.
> 
> > 021 needs shorter text
> 
> Fixed. It did fit when my OS was configured to use overlay scrollbars, but depending on that was wrong.
> 
> > and using a left margin instead of space characters to ensure that the word PASS is positioned “offscreen”.
> 
> I'm using a monospace font, and sizing things in ch, so the  word PASS is guaranteed to be "offscreen". After that, spaces vs left margin feels subjective, and I find the test easier to read with spaces, so I've left it as is for now. If you have an objective reason (or if you insist that your subjective feeling trumps mine), I'm OK with changing.
> 



View on GitHub: https://github.com/w3c/web-platform-tests/pull/5285#issuecomment-290707884

Received on Friday, 31 March 2017 13:11:43 UTC