[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-15 Thread Julie Parent
Another class of layout tests with bad setTimeouts in them -

Tests of the form:
body onload=runTest();
img
...

function runTest() {
  // Wait for img to load
  setTimeout(step2, 200);
}

These tests are not flaky, but the setTimeouts are completely
unnecessary (body onload always fires AFTER the img loads) and are just
leading to longer cycle times.  If you encounter these, feel free to
eliminate the setTimeout and waitUntilDone calls.

Julie

On Tue, Oct 13, 2009 at 11:48 PM, Andrew Scherkus scher...@chromium.orgwrote:

 On Tue, Oct 13, 2009 at 3:55 PM, Ojan Vafai o...@chromium.org wrote:

 On Tue, Oct 13, 2009 at 3:50 PM, Andrew Scherkus 
 scher...@chromium.orgwrote:

 What's happening is loadstart fires and the video reloads which should
 cause an abort event.  For some reason load will occasionally fire after
 loadstart, ending the test.

 I know we can patch the test, but I've been digging through the event
 dispatching code to verify that the flakiness isn't limited to Chromium.


 Even if it is just limited to Chromium, it is still a bug, right? Unless
 I'm not understanding, there's no case under which we should be patching the
 test in the above case. I don't know anything about video events, so I don't
 really know what event order guarantees there should be.

 Ojan


 Yeah it's has to be a bug somewhere, just tricky to track down due to the
 thread interaction between the video subsystem and the renderer thread.

 Andrew


--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-14 Thread Andrew Scherkus
On Tue, Oct 13, 2009 at 3:55 PM, Ojan Vafai o...@chromium.org wrote:

 On Tue, Oct 13, 2009 at 3:50 PM, Andrew Scherkus scher...@chromium.orgwrote:

 What's happening is loadstart fires and the video reloads which should
 cause an abort event.  For some reason load will occasionally fire after
 loadstart, ending the test.

 I know we can patch the test, but I've been digging through the event
 dispatching code to verify that the flakiness isn't limited to Chromium.


 Even if it is just limited to Chromium, it is still a bug, right? Unless
 I'm not understanding, there's no case under which we should be patching the
 test in the above case. I don't know anything about video events, so I don't
 really know what event order guarantees there should be.

 Ojan


Yeah it's has to be a bug somewhere, just tricky to track down due to the
thread interaction between the video subsystem and the renderer thread.

Andrew

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-13 Thread Andrew Scherkus
This might only apply to the media layout tests, but I'll give the heads up
anyway...
We found flakiness even when using load if the test is explicitly trying to
test for stalled/progress/abort events before the load is completed:
http://svn.webkit.org/repository/webkit/trunk/LayoutTests/media/video-error-abort.html
What's happening is loadstart fires and the video reloads which should cause
an abort event.  For some reason load will occasionally fire after
loadstart, ending the test.

I know we can patch the test, but I've been digging through the event
dispatching code to verify that the flakiness isn't limited to Chromium.

Andrew

On Fri, Oct 9, 2009 at 8:16 PM, Amanda Walker ama...@chromium.org wrote:

 Most awesome.  Very good catch.

 On Fri, Oct 9, 2009 at 9:52 PM, Julie Parent jpar...@chromium.org wrote:

 For those of you looking into flaky tests -
 I've found a surprising number of tests that are flaky because they use a
 setTimeout to guarantee that a resource (usually an iframe) has loaded.
  This leads to slower running, flaky tests.  To address this, change the
 tests upstream to use onload instead and make the world a better place :)
  I'm converting all of the editing tests now.

 Julie





 --
 Portability is generally the result of advance planning rather than trench
 warfare involving #ifdef -- Henry Spencer (1992)



 


--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-13 Thread Ojan Vafai
On Tue, Oct 13, 2009 at 3:50 PM, Andrew Scherkus scher...@chromium.orgwrote:

 What's happening is loadstart fires and the video reloads which should
 cause an abort event.  For some reason load will occasionally fire after
 loadstart, ending the test.

 I know we can patch the test, but I've been digging through the event
 dispatching code to verify that the flakiness isn't limited to Chromium.


Even if it is just limited to Chromium, it is still a bug, right? Unless I'm
not understanding, there's no case under which we should be patching the
test in the above case. I don't know anything about video events, so I don't
really know what event order guarantees there should be.

Ojan

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-09 Thread Eric Seidel

YAY! :)  Begone ye setTimeout!

setTimeout is also lame because it makes the tests run slower.

-eric

On Fri, Oct 9, 2009 at 9:52 PM, Julie Parent jpar...@chromium.org wrote:
 For those of you looking into flaky tests -
 I've found a surprising number of tests that are flaky because they use a
 setTimeout to guarantee that a resource (usually an iframe) has loaded.
  This leads to slower running, flaky tests.  To address this, change the
 tests upstream to use onload instead and make the world a better place :)
  I'm converting all of the editing tests now.
 Julie
 


--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [LTTF] Flaky tests and setTimeout

2009-10-09 Thread Amanda Walker
Most awesome.  Very good catch.

On Fri, Oct 9, 2009 at 9:52 PM, Julie Parent jpar...@chromium.org wrote:

 For those of you looking into flaky tests -
 I've found a surprising number of tests that are flaky because they use a
 setTimeout to guarantee that a resource (usually an iframe) has loaded.
  This leads to slower running, flaky tests.  To address this, change the
 tests upstream to use onload instead and make the world a better place :)
  I'm converting all of the editing tests now.

 Julie

 



-- 
Portability is generally the result of advance planning rather than trench
warfare involving #ifdef -- Henry Spencer (1992)

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---