Bug 139314

Summary: [iOS] DumpRenderTree produces many reference test mismatches
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: iOS 8.1   
Bug Depends on: 137581    
Bug Blocks:    
Attachments:
Description Flags
Patch simon.fraser: review+

Description Daniel Bates 2014-12-05 14:02:35 PST
Many reference tests fail due to a scale factor mismatch in the snapshot of the test and the snapshot of its expected result. You can see such mismatches by using run-webkit-tests to run the following set of tests in the iOS Simulator with --fully-parallel, --child-processes=3, --no-retry-failures, --no-sample-on-timeout (*): LayoutTests/css2.1/20110323/at-import-001.htm, LayoutTests/css2.1/20110323/at-import-002.htm, LayoutTests/css2.1/20110323/at-import-003.htm, and LayoutTests/css2.1/20110323/at-import-004.htm.

(*) Pass these tests as command line arguments of a single run-webkit-tests run. That is, run something of the form: Tools/Scripts/run-webkit-tests --ios-sim --fully-parallel --child-processes=3 --no-retry-failures --no-sample-on-timeout ... LayoutTests/css2.1/20110323/at-import-001.htm LayoutTests/css2.1/20110323/at-import-002.htm LayoutTests/css2.1/20110323/at-import-003.htm LayoutTests/css2.1/20110323/at-import-004.htm.
Comment 1 Daniel Bates 2014-12-05 14:07:49 PST
Created attachment 242661 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-12-05 14:24:26 PST
Comment on attachment 242661 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=242661&action=review

> Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm:88
> +    UIGraphicsBeginImageContextWithOptions([[mainFrame webView] frame].size, TRUE, WKGetScreenScaleFactor());

TRUE -> YES

> Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:31
> +OTHER_LDFLAGS_iphoneos = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework QuartzCore -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework GraphicsServices -framework ImageIO -framework MobileCoreServices -lMobileGestalt -framework UIKit -framework WebCore -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_FONTS);

Why this change?
Comment 3 Daniel Bates 2014-12-05 15:24:59 PST
(In reply to comment #2)
> > Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm:88
> > +    UIGraphicsBeginImageContextWithOptions([[mainFrame webView] frame].size, TRUE, WKGetScreenScaleFactor());
> 
> TRUE -> YES
> 

Will fix.

> > Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig:31
> > +OTHER_LDFLAGS_iphoneos = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY) -lWebCoreTestSupport -force_load $(BUILT_PRODUCTS_DIR)/libDumpRenderTree.a -framework QuartzCore -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework Foundation -framework GraphicsServices -framework ImageIO -framework MobileCoreServices -lMobileGestalt -framework UIKit -framework WebCore -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_FONTS);
> 
> Why this change?

Will revert this change. Will fix WebKitSystemInterface for iOS to avoid linking library MobileGestalt.
Comment 4 Daniel Bates 2014-12-05 15:33:25 PST
Committed r176880: <http://trac.webkit.org/changeset/176880>
Comment 5 Daniel Bates 2014-12-05 15:40:17 PST
<rdar://problem/18642889>