haikuwebkit/LayoutTests/fast/hidpi/broken-image-with-size-hidp...

20 lines
607 B
HTML
Raw Permalink Normal View History

https://bugs.webkit.org/show_bug.cgi?id=70050 DRT and WRT should have HiDPI testing capabilities Reviewed by Darin Adler. Source/WebKit/mac: New method _backingScaleFactor matches SPI of a similar name that I added recently to WKPage in WebKit2. Equivalent functionality is needed for DumpRenderTree's HiDPI support. * WebView/WebView.mm: (-[WebView _backingScaleFactor]): * WebView/WebViewPrivate.h: Tools: New layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function to call once the backing scale factor has successfully been set for the view. * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): On Mac, setBackingScaleFactor calls WebView _setCustomBackingScaleFactor. Other platforms do nothing. * DumpRenderTree/LayoutTestController.h: * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): Reset the backing scale factor by calling _setCutsomBackingScaleFactor with a value of 0, which resets to the system default. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): When generating the pixel dump, create a Bitmap of the appropriate size based on the backing scale factor. If it is a HiDPI view, paint into the context using displayRectIgnoringOpacity. * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContextFromWebView): And now the same stuff for WK2. Again, new layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function. * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: The InjectedBundle sends a message to the UI process to set the backing scale factor. It also processes a message the UI process will send back once it completes this task, and at that time, the InjectedBundle calls the callback. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Again, reset the backing scale factor by calling WKPageSetCustomBackingScaleFactor with a value of 0, which resets to the system default. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Upon receiving the SetBackingScaleFactor message, call WKPageSetCustomBackingScaleFactor to the given scale factor, and post a message back to InjectedBundle to say it has been done. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Don't use window snapshotting for the HiDPI tests. We don't have a way to fake a window's scale factor so we have to avoid that. * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): LayoutTests: New HiDPI tests and results. These should be skipped on all non-Lion platforms. * fast/hidpi: Added. * fast/hidpi/broken-image-icon-hidpi.html: Added. * fast/hidpi/broken-image-with-size-hidpi.html: Added. * fast/hidpi/clip-text-in-hidpi.html: Added. * fast/hidpi/resize-corner-hidpi.html: Added. * fast/hidpi/video-controls-in-hidpi.html: Added. * platform/gtk-wk2/Skipped: * platform/gtk/Skipped: * platform/mac-leopard/Skipped: * platform/mac-snowleopard/Skipped: * platform/mac/fast/hidpi: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.png: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: Added. * platform/qt-mac/Skipped: * platform/qt-wk2/Skipped: * platform/qt/Skipped: * platform/win-wk2/Skipped: * platform/win/Skipped: * platform/wincairo/Skipped: Canonical link: https://commits.webkit.org/86136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-13 22:09:33 +00:00
<html>
<script>
function startTest() {
Use testRunner instead of layoutTestController in fast/hidpi, history, html, images, inline, inline-block, innerHTML, inspector-support, invalid tests https://bugs.webkit.org/show_bug.cgi?id=89744 Reviewed by Kent Tamura. * fast/hidpi/broken-image-icon-hidpi.html: * fast/hidpi/broken-image-with-size-hidpi.html: * fast/hidpi/clip-text-in-hidpi.html: * fast/hidpi/device-scale-factor-paint.html: * fast/hidpi/focus-rings.html: * fast/hidpi/image-set-as-background.html: * fast/hidpi/image-set-background-dynamic.html: * fast/hidpi/image-set-background-repeat-without-size.html: * fast/hidpi/image-set-background-repeat.html: * fast/hidpi/image-set-border-image-comparison.html: * fast/hidpi/image-set-border-image-dynamic.html: * fast/hidpi/image-set-border-image-simple.html: * fast/hidpi/image-set-in-content-dynamic.html: * fast/hidpi/image-set-out-of-order.html: * fast/hidpi/image-set-simple.html: * fast/hidpi/image-set-without-specified-width.html: * fast/hidpi/resize-corner-hidpi.html: * fast/hidpi/video-controls-in-hidpi.html: * fast/history/back-forward-reset-after-error-handling.html: * fast/history/form-submit-in-frame-via-onclick.html: * fast/history/form-submit-in-frame.html: * fast/history/forward-during-load.html: * fast/history/gesture-before-onload-form-submit.html: * fast/history/gesture-before-onload-location-href.html: * fast/history/go-back-to-changed-name.html: * fast/history/history-back-initial-vs-final-url.html: * fast/history/history-back-twice-with-subframes-assert.html: * fast/history/history-back-within-subframe-hash.html: * fast/history/history-back-within-subframe-url.html: * fast/history/history-length.html: * fast/history/history-replace-updates-current-item.html: * fast/history/history-subframe-with-name.html: * fast/history/history_reload.html: * fast/history/location-replace-hash.html: * fast/history/multiple-classes-visited.html: * fast/history/nested-visited-test.html: * fast/history/redirect-via-iframe.html: * fast/history/resources/clicked-link-is-visited-2.html: * fast/history/resources/history-back-within-subframe-hash-2.html: * fast/history/resources/history-replace-updates-current-item-done.html: * fast/history/resources/history_reload_window.html: * fast/history/resources/redirect-target.html: * fast/history/same-document-iframes-changing-fragment.html: * fast/history/same-document-iframes-changing-pushstate.html: * fast/history/saves-state-after-fragment-nav.html: * fast/history/saves-state-after-frame-nav.html: * fast/history/self-is-visited.html: * fast/history/sibling-visited-test.html: * fast/history/timed-refresh-in-cached-frame.html: * fast/history/visited-generated-content-test.html: * fast/history/visited-link-background-color.html: * fast/history/window-open.html: * fast/html/adopt-parent-frame.html: * fast/html/body-offset-properties.html: * fast/html/crash-style-first-letter.html: * fast/html/details-add-summary-1-and-click.html: * fast/html/details-add-summary-10-and-click.html: * fast/html/details-add-summary-2-and-click.html: * fast/html/details-add-summary-3-and-click.html: * fast/html/details-add-summary-4-and-click.html: * fast/html/details-add-summary-5-and-click.html: * fast/html/details-add-summary-6-and-click.html: * fast/html/details-add-summary-7-and-click.html: * fast/html/details-add-summary-8-and-click.html: * fast/html/details-add-summary-9-and-click.html: * fast/html/details-children-merge-crash.html: * fast/html/details-element-render-inline-crash.html: * fast/html/details-mouse-click.html: * fast/html/details-remove-summary-1-and-click.html: * fast/html/details-remove-summary-2-and-click.html: * fast/html/details-remove-summary-3-and-click.html: * fast/html/details-remove-summary-4-and-click.html: * fast/html/details-remove-summary-5-and-click.html: * fast/html/details-remove-summary-6-and-click.html: * fast/html/details-replace-summary-child.html: * fast/html/details-replace-text.html: * fast/html/details-summary-document-child.html: * fast/html/draggable.html: * fast/html/empty-fragment-id-goto-top.html: * fast/html/font-face-empty-should-not-crash.html: * fast/html/marquee-scrollamount.html: * fast/html/nav-element.html: * fast/html/object-image-nested-fallback.html: * fast/html/pending-stylesheet-crash.html: * fast/html/process-end-tag-for-inbody-crash.html: * fast/html/script-allowed-types-languages.html: * fast/html/select-dropdown-consistent-background-color.html: * fast/html/set-text-direction.html: * fast/html/tab-order.html: * fast/html/tabindex-removal.html: * fast/html/text-field-input-types.html: * fast/html/xhtml-serialize.html: * fast/images/animated-background-image-crash.html: * fast/images/animated-gif-restored-from-bfcache.html: * fast/images/bad-png.html: * fast/images/busted-oval-does-not-render.html: * fast/images/destroyed-image-load-event.html: * fast/images/dont-crash-with-null-gif-frames.html: * fast/images/drag-pdf-as-image.html: * fast/images/embed-does-not-propagate-dimensions-to-object-ancestor.html: * fast/images/embed-image.html: * fast/images/exif-orientation-css.html: * fast/images/exif-orientation.html: * fast/images/extra-image-in-image-document.html: * fast/images/gif-loop-count.html: * fast/images/image-empty-data.html: * fast/images/image-invalid-data.html: * fast/images/image-load-event-in-fragment.html: * fast/images/image-map-multiple-xhtml.xhtml: * fast/images/image-map-multiple.html: * fast/images/image-map-zoom.html: * fast/images/imagemap-scroll.html: * fast/images/jpeg-with-color-profile.html: * fast/images/large-size-image-crash.html: * fast/images/link-body-content-imageDimensionChanged-crash.html: * fast/images/load-img-with-empty-src.html: * fast/images/paletted-png-with-color-profile.html: * fast/images/percent-height-image.html: * fast/images/png-extra-row-crash.html: * fast/images/png-suite/test.html: * fast/images/png-with-color-profile.html: * fast/images/read-past-end-of-buffer.html: * fast/images/rgb-jpeg-endian-pixels.html: * fast/images/rgb-jpeg-with-adobe-marker-only.html: * fast/images/rgb-png-with-cmyk-color-profile.html: * fast/images/script-counter-imageDimensionChanged-crash.html: * fast/images/script-tests/move-image-to-new-document.js: * fast/images/size-failure.html: * fast/images/style-access-during-imageChanged-crash.html: * fast/images/style-access-during-imageChanged-style-freeze.html: * fast/images/support-broken-image-delegate.html: * fast/images/text-content-crash-2.html: * fast/images/text-content-crash.html: * fast/images/webp-image-decoding.html: * fast/images/ycbcr-with-cmyk-color-profile.html: * fast/images/zoomed-img-size.html: * fast/inline-block/anonymous-block-crash.html: * fast/inline-block/inline-block-vertical-align-2.html: * fast/inline-block/relative-positioned-rtl-crash.html: * fast/inline/boundingBox-with-continuation.html: * fast/inline/clean-after-removing-temp-boxes.html: * fast/inline/continuation-positioned-reparenting.html: * fast/inline/crash-new-continuation-with-outline.html: * fast/inline/dirtyLinesForInline.html: * fast/inline/inline-body-crash.html: * fast/inline/inline-body-with-scrollbar-crash.html: * fast/inline/inline-box-adjust-position-crash.html: * fast/inline/inline-box-adjust-position-crash2.html: * fast/inline/inline-child-height-width-calc-crash.html: * fast/inline/inline-destroy-dirty-lines-crash.html: * fast/inline/inline-marquee-crash.html: * fast/inline/relative-positioned-overflow.html: * fast/inline/skipped-whitespace-boundingBox.html: * fast/inline/skipped-whitespace-client-rect.html: * fast/inline/update-always-create-line-boxes-full-layout-crash.html: * fast/innerHTML/004-expected.txt: * fast/innerHTML/004.xhtml: * fast/innerHTML/005-expected.txt: * fast/innerHTML/005.html: * fast/innerHTML/additional-inline-style.html: * fast/innerHTML/innerHTML-case.html: * fast/innerHTML/innerHTML-changing-document-properties.xhtml: * fast/innerHTML/innerHTML-custom-tag.html: * fast/innerHTML/innerHTML-iframe.html: * fast/innerHTML/innerHTML-nbsp.xhtml: * fast/innerHTML/innerHTML-script-tag-crash.xhtml: * fast/innerHTML/javascript-url.html: * fast/inspector-support/cssURLQuotes.html: * fast/inspector-support/style.html: * fast/inspector-support/uncaught-dom1-exception.html: * fast/inspector-support/uncaught-dom3-exception.html: * fast/inspector-support/uncaught-dom8-exception.html: * fast/invalid/invalidSVGFont.html: * fast/invalid/nestedh3s-rapidweaver.html: * fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html: * platform/gtk/fast/images/exif-orientation-css-expected.txt: * platform/gtk/fast/images/exif-orientation-expected.txt: * platform/mac/fast/images/exif-orientation-css-expected.txt: * platform/mac/fast/images/exif-orientation-expected.txt: * platform/qt/fast/history/back-to-unreachable-url-then-forward.html: * platform/qt/fast/history/resources/check-scroll-position.html: Canonical link: https://commits.webkit.org/107595@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-22 08:52:23 +00:00
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.setBackingScaleFactor(2, finishTest);
Unreviewed, rolling out r120541, r120547, and r120548. http://trac.webkit.org/changeset/120541 http://trac.webkit.org/changeset/120547 http://trac.webkit.org/changeset/120548 https://bugs.webkit.org/show_bug.cgi?id=89383 This approach doesn't work for WebKit2 (Requested by abarth on #webkit). Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-18 Source/WebCore: * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): Tools: * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController): * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/wx/LayoutTestControllerWx.cpp: (LayoutTestController::setBackingScaleFactor): * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: (LayoutTestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): LayoutTests: * compositing/tiled-layers-hidpi.html: * fast/canvas/2d.backingStorePixelRatio.html: * fast/canvas/2d.imageDataHD.html: * fast/hidpi/broken-image-icon-hidpi.html: * fast/hidpi/broken-image-with-size-hidpi.html: * fast/hidpi/clip-text-in-hidpi.html: * fast/hidpi/focus-rings.html: * fast/hidpi/image-set-as-background.html: * fast/hidpi/image-set-background-dynamic.html: * fast/hidpi/image-set-background-repeat-without-size.html: * fast/hidpi/image-set-background-repeat.html: * fast/hidpi/image-set-border-image-comparison.html: * fast/hidpi/image-set-border-image-dynamic.html: * fast/hidpi/image-set-border-image-simple.html: * fast/hidpi/image-set-in-content-dynamic.html: * fast/hidpi/image-set-out-of-order.html: * fast/hidpi/image-set-simple.html: * fast/hidpi/image-set-without-specified-width.html: * fast/hidpi/resize-corner-hidpi.html: * fast/hidpi/video-controls-in-hidpi.html: * platform/mac-wk2/plugins/contents-scale-factor.html: * svg/as-image/image-respects-deviceScaleFactor.html: Canonical link: https://commits.webkit.org/107239@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-18 21:38:09 +00:00
}
https://bugs.webkit.org/show_bug.cgi?id=70050 DRT and WRT should have HiDPI testing capabilities Reviewed by Darin Adler. Source/WebKit/mac: New method _backingScaleFactor matches SPI of a similar name that I added recently to WKPage in WebKit2. Equivalent functionality is needed for DumpRenderTree's HiDPI support. * WebView/WebView.mm: (-[WebView _backingScaleFactor]): * WebView/WebViewPrivate.h: Tools: New layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function to call once the backing scale factor has successfully been set for the view. * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): On Mac, setBackingScaleFactor calls WebView _setCustomBackingScaleFactor. Other platforms do nothing. * DumpRenderTree/LayoutTestController.h: * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): Reset the backing scale factor by calling _setCutsomBackingScaleFactor with a value of 0, which resets to the system default. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): When generating the pixel dump, create a Bitmap of the appropriate size based on the backing scale factor. If it is a HiDPI view, paint into the context using displayRectIgnoringOpacity. * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContextFromWebView): And now the same stuff for WK2. Again, new layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function. * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: The InjectedBundle sends a message to the UI process to set the backing scale factor. It also processes a message the UI process will send back once it completes this task, and at that time, the InjectedBundle calls the callback. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Again, reset the backing scale factor by calling WKPageSetCustomBackingScaleFactor with a value of 0, which resets to the system default. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Upon receiving the SetBackingScaleFactor message, call WKPageSetCustomBackingScaleFactor to the given scale factor, and post a message back to InjectedBundle to say it has been done. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Don't use window snapshotting for the HiDPI tests. We don't have a way to fake a window's scale factor so we have to avoid that. * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): LayoutTests: New HiDPI tests and results. These should be skipped on all non-Lion platforms. * fast/hidpi: Added. * fast/hidpi/broken-image-icon-hidpi.html: Added. * fast/hidpi/broken-image-with-size-hidpi.html: Added. * fast/hidpi/clip-text-in-hidpi.html: Added. * fast/hidpi/resize-corner-hidpi.html: Added. * fast/hidpi/video-controls-in-hidpi.html: Added. * platform/gtk-wk2/Skipped: * platform/gtk/Skipped: * platform/mac-leopard/Skipped: * platform/mac-snowleopard/Skipped: * platform/mac/fast/hidpi: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.png: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: Added. * platform/qt-mac/Skipped: * platform/qt-wk2/Skipped: * platform/qt/Skipped: * platform/win-wk2/Skipped: * platform/win/Skipped: * platform/wincairo/Skipped: Canonical link: https://commits.webkit.org/86136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-13 22:09:33 +00:00
}
Unreviewed, rolling out r120541, r120547, and r120548. http://trac.webkit.org/changeset/120541 http://trac.webkit.org/changeset/120547 http://trac.webkit.org/changeset/120548 https://bugs.webkit.org/show_bug.cgi?id=89383 This approach doesn't work for WebKit2 (Requested by abarth on #webkit). Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-18 Source/WebCore: * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): Tools: * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController): * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/wx/LayoutTestControllerWx.cpp: (LayoutTestController::setBackingScaleFactor): * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: (LayoutTestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): LayoutTests: * compositing/tiled-layers-hidpi.html: * fast/canvas/2d.backingStorePixelRatio.html: * fast/canvas/2d.imageDataHD.html: * fast/hidpi/broken-image-icon-hidpi.html: * fast/hidpi/broken-image-with-size-hidpi.html: * fast/hidpi/clip-text-in-hidpi.html: * fast/hidpi/focus-rings.html: * fast/hidpi/image-set-as-background.html: * fast/hidpi/image-set-background-dynamic.html: * fast/hidpi/image-set-background-repeat-without-size.html: * fast/hidpi/image-set-background-repeat.html: * fast/hidpi/image-set-border-image-comparison.html: * fast/hidpi/image-set-border-image-dynamic.html: * fast/hidpi/image-set-border-image-simple.html: * fast/hidpi/image-set-in-content-dynamic.html: * fast/hidpi/image-set-out-of-order.html: * fast/hidpi/image-set-simple.html: * fast/hidpi/image-set-without-specified-width.html: * fast/hidpi/resize-corner-hidpi.html: * fast/hidpi/video-controls-in-hidpi.html: * platform/mac-wk2/plugins/contents-scale-factor.html: * svg/as-image/image-respects-deviceScaleFactor.html: Canonical link: https://commits.webkit.org/107239@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-18 21:38:09 +00:00
function finishTest() {
Use testRunner instead of layoutTestController in fast/hidpi, history, html, images, inline, inline-block, innerHTML, inspector-support, invalid tests https://bugs.webkit.org/show_bug.cgi?id=89744 Reviewed by Kent Tamura. * fast/hidpi/broken-image-icon-hidpi.html: * fast/hidpi/broken-image-with-size-hidpi.html: * fast/hidpi/clip-text-in-hidpi.html: * fast/hidpi/device-scale-factor-paint.html: * fast/hidpi/focus-rings.html: * fast/hidpi/image-set-as-background.html: * fast/hidpi/image-set-background-dynamic.html: * fast/hidpi/image-set-background-repeat-without-size.html: * fast/hidpi/image-set-background-repeat.html: * fast/hidpi/image-set-border-image-comparison.html: * fast/hidpi/image-set-border-image-dynamic.html: * fast/hidpi/image-set-border-image-simple.html: * fast/hidpi/image-set-in-content-dynamic.html: * fast/hidpi/image-set-out-of-order.html: * fast/hidpi/image-set-simple.html: * fast/hidpi/image-set-without-specified-width.html: * fast/hidpi/resize-corner-hidpi.html: * fast/hidpi/video-controls-in-hidpi.html: * fast/history/back-forward-reset-after-error-handling.html: * fast/history/form-submit-in-frame-via-onclick.html: * fast/history/form-submit-in-frame.html: * fast/history/forward-during-load.html: * fast/history/gesture-before-onload-form-submit.html: * fast/history/gesture-before-onload-location-href.html: * fast/history/go-back-to-changed-name.html: * fast/history/history-back-initial-vs-final-url.html: * fast/history/history-back-twice-with-subframes-assert.html: * fast/history/history-back-within-subframe-hash.html: * fast/history/history-back-within-subframe-url.html: * fast/history/history-length.html: * fast/history/history-replace-updates-current-item.html: * fast/history/history-subframe-with-name.html: * fast/history/history_reload.html: * fast/history/location-replace-hash.html: * fast/history/multiple-classes-visited.html: * fast/history/nested-visited-test.html: * fast/history/redirect-via-iframe.html: * fast/history/resources/clicked-link-is-visited-2.html: * fast/history/resources/history-back-within-subframe-hash-2.html: * fast/history/resources/history-replace-updates-current-item-done.html: * fast/history/resources/history_reload_window.html: * fast/history/resources/redirect-target.html: * fast/history/same-document-iframes-changing-fragment.html: * fast/history/same-document-iframes-changing-pushstate.html: * fast/history/saves-state-after-fragment-nav.html: * fast/history/saves-state-after-frame-nav.html: * fast/history/self-is-visited.html: * fast/history/sibling-visited-test.html: * fast/history/timed-refresh-in-cached-frame.html: * fast/history/visited-generated-content-test.html: * fast/history/visited-link-background-color.html: * fast/history/window-open.html: * fast/html/adopt-parent-frame.html: * fast/html/body-offset-properties.html: * fast/html/crash-style-first-letter.html: * fast/html/details-add-summary-1-and-click.html: * fast/html/details-add-summary-10-and-click.html: * fast/html/details-add-summary-2-and-click.html: * fast/html/details-add-summary-3-and-click.html: * fast/html/details-add-summary-4-and-click.html: * fast/html/details-add-summary-5-and-click.html: * fast/html/details-add-summary-6-and-click.html: * fast/html/details-add-summary-7-and-click.html: * fast/html/details-add-summary-8-and-click.html: * fast/html/details-add-summary-9-and-click.html: * fast/html/details-children-merge-crash.html: * fast/html/details-element-render-inline-crash.html: * fast/html/details-mouse-click.html: * fast/html/details-remove-summary-1-and-click.html: * fast/html/details-remove-summary-2-and-click.html: * fast/html/details-remove-summary-3-and-click.html: * fast/html/details-remove-summary-4-and-click.html: * fast/html/details-remove-summary-5-and-click.html: * fast/html/details-remove-summary-6-and-click.html: * fast/html/details-replace-summary-child.html: * fast/html/details-replace-text.html: * fast/html/details-summary-document-child.html: * fast/html/draggable.html: * fast/html/empty-fragment-id-goto-top.html: * fast/html/font-face-empty-should-not-crash.html: * fast/html/marquee-scrollamount.html: * fast/html/nav-element.html: * fast/html/object-image-nested-fallback.html: * fast/html/pending-stylesheet-crash.html: * fast/html/process-end-tag-for-inbody-crash.html: * fast/html/script-allowed-types-languages.html: * fast/html/select-dropdown-consistent-background-color.html: * fast/html/set-text-direction.html: * fast/html/tab-order.html: * fast/html/tabindex-removal.html: * fast/html/text-field-input-types.html: * fast/html/xhtml-serialize.html: * fast/images/animated-background-image-crash.html: * fast/images/animated-gif-restored-from-bfcache.html: * fast/images/bad-png.html: * fast/images/busted-oval-does-not-render.html: * fast/images/destroyed-image-load-event.html: * fast/images/dont-crash-with-null-gif-frames.html: * fast/images/drag-pdf-as-image.html: * fast/images/embed-does-not-propagate-dimensions-to-object-ancestor.html: * fast/images/embed-image.html: * fast/images/exif-orientation-css.html: * fast/images/exif-orientation.html: * fast/images/extra-image-in-image-document.html: * fast/images/gif-loop-count.html: * fast/images/image-empty-data.html: * fast/images/image-invalid-data.html: * fast/images/image-load-event-in-fragment.html: * fast/images/image-map-multiple-xhtml.xhtml: * fast/images/image-map-multiple.html: * fast/images/image-map-zoom.html: * fast/images/imagemap-scroll.html: * fast/images/jpeg-with-color-profile.html: * fast/images/large-size-image-crash.html: * fast/images/link-body-content-imageDimensionChanged-crash.html: * fast/images/load-img-with-empty-src.html: * fast/images/paletted-png-with-color-profile.html: * fast/images/percent-height-image.html: * fast/images/png-extra-row-crash.html: * fast/images/png-suite/test.html: * fast/images/png-with-color-profile.html: * fast/images/read-past-end-of-buffer.html: * fast/images/rgb-jpeg-endian-pixels.html: * fast/images/rgb-jpeg-with-adobe-marker-only.html: * fast/images/rgb-png-with-cmyk-color-profile.html: * fast/images/script-counter-imageDimensionChanged-crash.html: * fast/images/script-tests/move-image-to-new-document.js: * fast/images/size-failure.html: * fast/images/style-access-during-imageChanged-crash.html: * fast/images/style-access-during-imageChanged-style-freeze.html: * fast/images/support-broken-image-delegate.html: * fast/images/text-content-crash-2.html: * fast/images/text-content-crash.html: * fast/images/webp-image-decoding.html: * fast/images/ycbcr-with-cmyk-color-profile.html: * fast/images/zoomed-img-size.html: * fast/inline-block/anonymous-block-crash.html: * fast/inline-block/inline-block-vertical-align-2.html: * fast/inline-block/relative-positioned-rtl-crash.html: * fast/inline/boundingBox-with-continuation.html: * fast/inline/clean-after-removing-temp-boxes.html: * fast/inline/continuation-positioned-reparenting.html: * fast/inline/crash-new-continuation-with-outline.html: * fast/inline/dirtyLinesForInline.html: * fast/inline/inline-body-crash.html: * fast/inline/inline-body-with-scrollbar-crash.html: * fast/inline/inline-box-adjust-position-crash.html: * fast/inline/inline-box-adjust-position-crash2.html: * fast/inline/inline-child-height-width-calc-crash.html: * fast/inline/inline-destroy-dirty-lines-crash.html: * fast/inline/inline-marquee-crash.html: * fast/inline/relative-positioned-overflow.html: * fast/inline/skipped-whitespace-boundingBox.html: * fast/inline/skipped-whitespace-client-rect.html: * fast/inline/update-always-create-line-boxes-full-layout-crash.html: * fast/innerHTML/004-expected.txt: * fast/innerHTML/004.xhtml: * fast/innerHTML/005-expected.txt: * fast/innerHTML/005.html: * fast/innerHTML/additional-inline-style.html: * fast/innerHTML/innerHTML-case.html: * fast/innerHTML/innerHTML-changing-document-properties.xhtml: * fast/innerHTML/innerHTML-custom-tag.html: * fast/innerHTML/innerHTML-iframe.html: * fast/innerHTML/innerHTML-nbsp.xhtml: * fast/innerHTML/innerHTML-script-tag-crash.xhtml: * fast/innerHTML/javascript-url.html: * fast/inspector-support/cssURLQuotes.html: * fast/inspector-support/style.html: * fast/inspector-support/uncaught-dom1-exception.html: * fast/inspector-support/uncaught-dom3-exception.html: * fast/inspector-support/uncaught-dom8-exception.html: * fast/invalid/invalidSVGFont.html: * fast/invalid/nestedh3s-rapidweaver.html: * fast/invalid/test-case-tr-th-td-should-not-close-dl-list.html: * platform/gtk/fast/images/exif-orientation-css-expected.txt: * platform/gtk/fast/images/exif-orientation-expected.txt: * platform/mac/fast/images/exif-orientation-css-expected.txt: * platform/mac/fast/images/exif-orientation-expected.txt: * platform/qt/fast/history/back-to-unreachable-url-then-forward.html: * platform/qt/fast/history/resources/check-scroll-position.html: Canonical link: https://commits.webkit.org/107595@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-22 08:52:23 +00:00
setTimeout(function() { testRunner.notifyDone(); }, 0);
Unreviewed, rolling out r120541, r120547, and r120548. http://trac.webkit.org/changeset/120541 http://trac.webkit.org/changeset/120547 http://trac.webkit.org/changeset/120548 https://bugs.webkit.org/show_bug.cgi?id=89383 This approach doesn't work for WebKit2 (Requested by abarth on #webkit). Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-06-18 Source/WebCore: * testing/InternalSettings.cpp: (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::restoreTo): * testing/InternalSettings.h: (InternalSettings): Tools: * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): * DumpRenderTree/LayoutTestController.h: (LayoutTestController): * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/efl/LayoutTestControllerEfl.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/wx/LayoutTestControllerWx.cpp: (LayoutTestController::setBackingScaleFactor): * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): (WTR): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: (LayoutTestController): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): LayoutTests: * compositing/tiled-layers-hidpi.html: * fast/canvas/2d.backingStorePixelRatio.html: * fast/canvas/2d.imageDataHD.html: * fast/hidpi/broken-image-icon-hidpi.html: * fast/hidpi/broken-image-with-size-hidpi.html: * fast/hidpi/clip-text-in-hidpi.html: * fast/hidpi/focus-rings.html: * fast/hidpi/image-set-as-background.html: * fast/hidpi/image-set-background-dynamic.html: * fast/hidpi/image-set-background-repeat-without-size.html: * fast/hidpi/image-set-background-repeat.html: * fast/hidpi/image-set-border-image-comparison.html: * fast/hidpi/image-set-border-image-dynamic.html: * fast/hidpi/image-set-border-image-simple.html: * fast/hidpi/image-set-in-content-dynamic.html: * fast/hidpi/image-set-out-of-order.html: * fast/hidpi/image-set-simple.html: * fast/hidpi/image-set-without-specified-width.html: * fast/hidpi/resize-corner-hidpi.html: * fast/hidpi/video-controls-in-hidpi.html: * platform/mac-wk2/plugins/contents-scale-factor.html: * svg/as-image/image-respects-deviceScaleFactor.html: Canonical link: https://commits.webkit.org/107239@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-18 21:38:09 +00:00
}
</script>
https://bugs.webkit.org/show_bug.cgi?id=70050 DRT and WRT should have HiDPI testing capabilities Reviewed by Darin Adler. Source/WebKit/mac: New method _backingScaleFactor matches SPI of a similar name that I added recently to WKPage in WebKit2. Equivalent functionality is needed for DumpRenderTree's HiDPI support. * WebView/WebView.mm: (-[WebView _backingScaleFactor]): * WebView/WebViewPrivate.h: Tools: New layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function to call once the backing scale factor has successfully been set for the view. * DumpRenderTree/LayoutTestController.cpp: (setBackingScaleFactorCallback): (LayoutTestController::staticFunctions): On Mac, setBackingScaleFactor calls WebView _setCustomBackingScaleFactor. Other platforms do nothing. * DumpRenderTree/LayoutTestController.h: * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::setBackingScaleFactor): * DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::setBackingScaleFactor): Reset the backing scale factor by calling _setCutsomBackingScaleFactor with a value of 0, which resets to the system default. * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebViewToConsistentStateBeforeTesting): When generating the pixel dump, create a Bitmap of the appropriate size based on the backing scale factor. If it is a HiDPI view, paint into the context using displayRectIgnoringOpacity. * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContextFromWebView): And now the same stuff for WK2. Again, new layoutTestController function setBackingScaleFactor takes a double for a scale factor and a callback function. * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setBackingScaleFactor): (WTR::LayoutTestController::callSetBackingScaleFactorCallback): * WebKitTestRunner/InjectedBundle/LayoutTestController.h: The InjectedBundle sends a message to the UI process to set the backing scale factor. It also processes a message the UI process will send back once it completes this task, and at that time, the InjectedBundle calls the callback. * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessage): (WTR::InjectedBundle::postSetBackingScaleFactor): * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Again, reset the backing scale factor by calling WKPageSetCustomBackingScaleFactor with a value of 0, which resets to the system default. * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Upon receiving the SetBackingScaleFactor message, call WKPageSetCustomBackingScaleFactor to the given scale factor, and post a message back to InjectedBundle to say it has been done. * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Don't use window snapshotting for the HiDPI tests. We don't have a way to fake a window's scale factor so we have to avoid that. * WebKitTestRunner/cg/TestInvocationCG.cpp: (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): LayoutTests: New HiDPI tests and results. These should be skipped on all non-Lion platforms. * fast/hidpi: Added. * fast/hidpi/broken-image-icon-hidpi.html: Added. * fast/hidpi/broken-image-with-size-hidpi.html: Added. * fast/hidpi/clip-text-in-hidpi.html: Added. * fast/hidpi/resize-corner-hidpi.html: Added. * fast/hidpi/video-controls-in-hidpi.html: Added. * platform/gtk-wk2/Skipped: * platform/gtk/Skipped: * platform/mac-leopard/Skipped: * platform/mac-snowleopard/Skipped: * platform/mac/fast/hidpi: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-icon-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.png: Added. * platform/mac/fast/hidpi/broken-image-with-size-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/clip-text-in-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.png: Added. * platform/mac/fast/hidpi/resize-corner-hidpi-expected.txt: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png: Added. * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: Added. * platform/qt-mac/Skipped: * platform/qt-wk2/Skipped: * platform/qt/Skipped: * platform/win-wk2/Skipped: * platform/win/Skipped: * platform/wincairo/Skipped: Canonical link: https://commits.webkit.org/86136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-13 22:09:33 +00:00
</head>
<body onload="startTest();">
<div>This test passes if the broken image icon appears high-resolution in HiDPI and is the appropriate size.</div>
<img src="not-there.png" width=300 height=150></img>
</body>
</html>