New issue
Advanced search Search tips

Issue 675870 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

window.onload should wait for critical resources linked from css

Project Member Reported by yhirano@chromium.org, Dec 20 2016

Issue description

Many css1/ tests compare the image output with the expected one. They expected
that tests finish when the layout result becomes stable.

But the test runner may finish tests before loading some resources. Even worse,
the document load event may be dispatched before loading some resources. They're
working by chance, and changing the loading timing a bit will break them. They're
already flaky, though the failure rate is low.

I think window.onload should wait for css1/resources/basebg.gif to be loaded.



 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d16a6bc2ccee2249dec6028140ac5792c4ca991e

commit d16a6bc2ccee2249dec6028140ac5792c4ca991e
Author: yhirano <yhirano@chromium.org>
Date: Tue Dec 20 07:44:02 2016

Most css1/ tests should wait for basebg.gif to be loaded

Many css1/ tests compare the image output with the expected one. They expected
that tests finish when the layout result becomes stable.

But the test runner may finish tests before loading some resources. Even worse,
the document load event may be dispatched before loading some resources. They're
working by chance, and changing the loading timing a bit will break them.

This CL makes those tests wait for css1/resources/basebg.gif to be loaded.

BUG= 603396 ,  675870 

Review-Url: https://codereview.chromium.org/2588283002
Cr-Commit-Position: refs/heads/master@{#439733}

[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/class_as_selector.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/comments.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/containment.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/contextual_selectors.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/grouping.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/id_as_selector.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/basic/inheritance.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_bottom.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_bottom_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_bottom_width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_bottom_width_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_color.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_color_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_left.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_left_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_left_width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_left_width_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_right.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_right_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_right_width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_right_width_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_style.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_style_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_top.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_top_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_top_width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_top_width_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/border_width_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/clear.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/clear_float.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/float.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/float_elements_in_series.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/float_margin.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/float_on_text_elements.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/height.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_bottom.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_bottom_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_left.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_left_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_right.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_right_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_top.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/margin_top_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_bottom.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_bottom_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_left.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_left_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_right.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_right_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_top.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/padding_top_inline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/box_properties/width.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/cascade/cascade_order.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/cascade/important.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/display.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/list_style.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/list_style_image.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/list_style_position.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/list_style_type.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/classification/white_space.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background_attachment.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background_color.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background_image.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background_position.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/background_repeat.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/color_and_background/color.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/conformance/forward_compatible_parsing.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font_family.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font_size.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font_style.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font_variant.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/font_properties/font_weight.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/canvas.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/floating_elements.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/height_of_lines.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/horizontal_formatting.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/inline_elements.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/replaced_elements.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/formatting_model/vertical_formatting.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/pseudo/anchor.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/pseudo/firstletter.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/pseudo/firstline.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/pseudo/multiple_pseudo_elements.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/pseudo/pseudo_elements_in_selectors.html
[add] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/resources/base.js
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/letter_spacing.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/line_height.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/text_align.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/text_decoration.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/text_indent.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/text_transform.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/vertical_align.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/text_properties/word_spacing.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/units/color_units.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/units/length_units.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/units/percentage_units.html
[modify] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/css1/units/urls.html
[add] https://crrev.com/d16a6bc2ccee2249dec6028140ac5792c4ca991e/third_party/WebKit/LayoutTests/virtual/mojo-loading/css1/README.txt

Owner: yhirano@chromium.org
Status: Started (was: Untriaged)
Owner: ----
Status: Untriaged (was: Started)
Components: -Blink>Loader
Cc: hirosh...@chromium.org yhirano@chromium.org
hiroshige@, do you have any idea? I vaguely remember you talked about something related with the EventSender removal.

I was interested in this problem because it blocked loading mojofication, but #1 fixed an existing flakiness:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=css1%2Fbasic%2Fclass_as_selector.html
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a690496daee7b7023cdacdffb572a3efb5499915

commit a690496daee7b7023cdacdffb572a3efb5499915
Author: yhirano <yhirano@chromium.org>
Date: Thu Dec 22 07:34:20 2016

Fix pixel-crack-image-background-webkit-transform-scale test with mojo-loading

Due to the issue described in  https://crbug.com/675870 , the layout test fails
with mojo-loading enabled. This CL adds a workaround for the issue.

BUG= 675870 ,  670409 , 640634

Review-Url: https://codereview.chromium.org/2593403002
Cr-Commit-Position: refs/heads/master@{#440352}

[modify] https://crrev.com/a690496daee7b7023cdacdffb572a3efb5499915/third_party/WebKit/LayoutTests/images/pixel-crack-image-background-webkit-transform-scale.html

Components: Blink>Loader
Probably the issue is not related to EventSender removal.

Images in CSSs are loaded only if necessary in ElementStyleResources::loadPendingResources().
Probably determining whether it is "necessary" requires layouting, and thus ElementStyleResources::loadPendingResources() can be called in Document::updateStyleAndLayoutTree().

If the first layout is the one in Document::updateStyleAndLayoutTree() called in Document::implicitClose(), then the subresource loadings initiated there (i.e. subresources inside CSSs) do not block Document onload, because Document::implicitClose() is already called.

To make Document onload to be blocked in such cases, we might have to call updateStyleAndLayoutTree() or something that causes layouting in the early stage of Document::implicitClose() or even in FrameLoader::checkCompleted(), and then check shouldComplete() condition again.
I'm not sure what is expected behavior though...
Er, EventSender removal in HTMLLinkElement can affect the behavior related to this, because it modifies the timings of the first layout and document onload (just as mojo-loading modifies them), but probably doesn't affect how we should fix this issue.

The key is those in Comment #7, and how the timing dependencies between
(1) CSS's loading,
(2) (first) layout,
(3) CSS subresources loading and
(4) document onload.
(There're already dependencies between (1)->(4), (2)->(3). Comment #0 looks like proposing adding dependencies between (1)->(2) and (3)->(4).)
I really don't think we want to go adding dependencies between the document load event and forcing a layout/style recalc.  The timing of when to do a layout/style/paint is not currently spec'd (at least AFAIK and I've had some discussions with various spec owners about it).

At most I think we'd want to expose a test-only interface of some kind to force (2) if there isn't already one and provide a way for the test harness to wait for all resources to finish loading independent of window.onload

Comment 10 by e...@chromium.org, Jan 2 2017

Components: -Blink>Layout Tools>Test
Status: WontFix (was: Untriaged)
OK, let's close this bug. There's no support from loading and CSS tests should handle the issue manually.

Sign in to add a comment