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.
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
Now, there will be two PNGs in /tmp/test.txt - paste each into their own image files. Observe.
Specify your `-runtime` as necessary
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.
Created attachment 242643 [details]
Comment on attachment 242643 [details]
Clearing flags on attachment: 242643
Committed r176872: <http://trac.webkit.org/changeset/176872>
All reviewed patches have been landed. Closing bug.