|
| 1 | +2015-09-28 Carlos Garcia Campos < [email protected]> |
| 2 | + |
| 3 | + [WTR] Pixel tests generate the snapshots twice in Web and UI processes |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=149595 |
| 5 | + |
| 6 | + Reviewed by Tim Horton. |
| 7 | + |
| 8 | + All ports except IOS implement |
| 9 | + PlatformWebView::windowSnapshotImage() to generate the snapshot |
| 10 | + for the pixel tests in the UI process. But we are still generating |
| 11 | + a snapshot for pixel tests in the Web process too, that is passed |
| 12 | + to the UI process but ignored. |
| 13 | + Whether a pixel result is needed or not, is only known by the web |
| 14 | + process depending on whether the test called dumpAsText with |
| 15 | + dumpPixels == true or not. Since the pixels are now dump in the UI |
| 16 | + process, we need to pass that information to the UI process when |
| 17 | + the test is done. For that we set a PixelResultIsPending bool |
| 18 | + parameter to the Done message, and we only add the PixelResult |
| 19 | + when UI process doesn't need to generate the pixels dump. |
| 20 | + |
| 21 | + * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: |
| 22 | + (WTR::InjectedBundle::didReceiveMessageToPage): Set |
| 23 | + m_pixelResultIsPending to false on reset. |
| 24 | + (WTR::InjectedBundle::done): Add PixelResultIsPending parameter to the |
| 25 | + Done message, and set the PixelResult if m_pixelResultIsPending is false. |
| 26 | + * WebKitTestRunner/InjectedBundle/InjectedBundle.h: |
| 27 | + (WTR::InjectedBundle::setPixelResult): Set m_pixelResultIsPending to false. |
| 28 | + (WTR::InjectedBundle::setNeedsPixelResult): Set m_pixelResultIsPending. |
| 29 | + * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: |
| 30 | + (WTR::InjectedBundlePage::dump): Only create a snapshot for IOS |
| 31 | + port. |
| 32 | + * WebKitTestRunner/TestInvocation.cpp: |
| 33 | + (WTR::TestInvocation::dumpResults): Use either the pixel result |
| 34 | + from the web process or generate a pixel result from the web view |
| 35 | + if need it. |
| 36 | + (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): |
| 37 | + * WebKitTestRunner/TestInvocation.h: Add SnapshotResultType enum |
| 38 | + parameter to dumpPixelsAndCompareWithExpected, since the snapshot |
| 39 | + is created by the caller now, but the CG implementation needs to |
| 40 | + know if it's a Web or UI process snapshot. |
| 41 | + * WebKitTestRunner/cairo/TestInvocationCairo.cpp: |
| 42 | + (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a |
| 43 | + cairo surface for the given image. |
| 44 | + * WebKitTestRunner/cg/TestInvocationCG.cpp: |
| 45 | + (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Create a |
| 46 | + CGContext for the given image. |
| 47 | + |
1 | 48 | 2015-09-28 Dean Johnson < [email protected]>
|
2 | 49 |
|
3 | 50 | Fix JS errors on dashboard metrics page
|
|
0 commit comments