Bug 137581 - [iOS] DumpRenderTree fails to render every other test when pixel tests are on
Summary: [iOS] DumpRenderTree fails to render every other test when pixel tests are on
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 139314
  Show dependency treegraph
 
Reported: 2014-10-09 16:04 PDT by David Farler
Modified: 2014-12-05 14:12 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2014-12-05 10:44 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Farler 2014-10-09 16:04:56 PDT
When running DumpRenderTree with --pixel-tests, PNG data gets dumped to stdout before the test has finished rendering. This happens regardless of whether the iOS app is in the foreground or background.

The consequence:
1. When running the first pixel test "A" on a freshly launched DRT, you get a blank image.
2. Running subsequent test "B" is "one behind", and the previous contents for test "A" are dumped, although "B" does eventually appear in app.

Steps to reproduce:

Build iOS for iphonesimulator

open -a $(xcode-select --print-path)/Applications/iOS\ Simulator.app

DYLD_FRAMEWORK_PATH=/absolute/path/to/OpenSource/WebKitBuild/Release-iphonesimulator DYLD_LIBRARY_PATH=/absolute/path/to/OpenSource/WebKitBuild/Release-iphonesimulator /path/to/OpenSource/WebKitBuild/Release/LayoutTestRelay -runtime com.apple.CoreSimulator.SimRuntime.iOS-8-3 -deviceType com.apple.CoreSimulator.SimDeviceType.iPhone-5s -suffix 0 -productDir /absolute/path/to/OpenSource/WebKitBuild/Release-iphonesimulator -app /absolute/path/to/OpenSource/WebKitBuild/Release-iphonesimulator/DumpRenderTree.app -- --pixel-test - | tee /tmp/test.txt

# Now listening to stdin, paste the following twice

/absolute/path/to/OpenSource/LayoutTests/compositing/regions/fixed-in-named-flow-position-changed.html

^C

Now, there will be two PNGs in /tmp/test.txt - paste each into their own image files. Observe.
Comment 1 David Farler 2014-10-09 16:07:10 PDT
Specify your `-runtime` as necessary
Comment 2 David Farler 2014-10-15 10:07:13 PDT
Another effect that I noticed here after smfr's change to wait for the web thread is that if you keep passing in tests with pixel dumps requested, essentially every other test will do the right thing, otherwise resetting to a blank view. Before, it would always be "one behind." So, there's still some state getting in the way.

This behavior only happens with --pixel-tests passed at the command line to DumpRenderTree (all tests in server loop mode are pixel tests), or '-p is appended to individual tests in server loop mode.

In light of this, I'm retitling the bug to reflect this.
Comment 3 David Farler 2014-10-15 10:07:36 PDT
<rdar://problem/18642906>
Comment 4 Daniel Bates 2014-12-05 10:44:37 PST
Created attachment 242643 [details]
Patch
Comment 5 Daniel Bates 2014-12-05 14:12:46 PST
Comment on attachment 242643 [details]
Patch

Clearing flags on attachment: 242643

Committed r176872: <http://trac.webkit.org/changeset/176872>
Comment 6 Daniel Bates 2014-12-05 14:12:52 PST
All reviewed patches have been landed.  Closing bug.