haikuwebkit/LayoutTests/printing/setPrinting.html

20 lines
490 B
HTML
Raw Permalink Normal View History

2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added printing/setPrinting.html to check there is the page boundary. Enabled printing/composite-layer-printing.html with setPrinting. The result of printing/media-queries-print.html shrunk because of PrintingMinimumShrinkFactor in PrintContext::begin(). * platform/mac/Skipped: * platform/mac/printing/compositing-layer-printing-expected.checksum: Added. * platform/mac/printing/compositing-layer-printing-expected.png: Added. * platform/mac/printing/compositing-layer-printing-expected.txt: Added. * platform/mac/printing/media-queries-print-expected.checksum: * platform/mac/printing/media-queries-print-expected.png: * platform/mac/printing/setPrinting-expected.checksum: Added. * platform/mac/printing/setPrinting-expected.png: Added. * platform/mac/printing/setPrinting-expected.txt: Added. * printing/compositing-layer-printing.html: * printing/setPrinting.html: Added. 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added spoolAllPagesWithBoundaries into PrintContext. Test: printing/setPrinting.html * WebCore.base.exp: * page/PrintContext.cpp: (WebCore::PrintContext::spoolAllPagesWithBoundaries): * page/PrintContext.h: 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (-[WebFrame printToCGContext:cgContext:pageWidthInPixels:]): 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * DumpRenderTree/PixelDumpSupport.cpp: (dumpWebViewAsPixelsAndCompareWithExpected): * DumpRenderTree/PixelDumpSupport.h: * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContext): This function was added to share bitmap context creation code. (createBitmapContextFromWebView): (createPagedBitmapContext): Canonical link: https://commits.webkit.org/54361@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 06:25:48 +00:00
<html>
<head>
<script>
Use testRunner instead of layoutTestController in networkinformation, perf, plugins, pointer-lock, printing, scrollbars, and security tests https://bugs.webkit.org/show_bug.cgi?id=89181 Reviewed by Kent Tamura. * perf/clone-with-focus.html: * perf/nested-combined-selectors.html: * perf/table-rows-length-caching.html: * platform/chromium/plugins/call-as-function.html: * platform/chromium/plugins/get-url-with-blank-target2.html: * platform/chromium/plugins/get-url-with-iframe-target-no-crash.html: * platform/chromium/printing/custom-page-size-style-expected.txt: * platform/chromium/printing/custom-page-size-style.html: * platform/gtk/plugins/invalidate-rect-with-null-npp-argument.html: * platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html: * platform/mac-wk2/plugins/contents-scale-factor.html: * platform/mac-wk2/plugins/mouse-events-scaled.html: * platform/mac/plugins/bindings-array-apply-crash.html: * platform/mac/plugins/bindings-objc-long-method-name.html: * platform/mac/plugins/bindings-objc-method-name-conversion.html: * platform/mac/plugins/bindings-test-objc.html: * platform/mac/plugins/call-as-function-test.html: * platform/mac/plugins/convert-point.html: * platform/mac/plugins/disable-plugins.html: * platform/mac/plugins/jsobjc-dom-wrappers.html: * platform/mac/plugins/jsobjc-simple.html: * platform/mac/plugins/pluginDocumentView-deallocated-dataSource.html-disabled: * platform/mac/plugins/root-object-premature-delete-crash.html: * platform/mac/plugins/supports-carbon-event-model.html: * platform/mac/plugins/testplugin-onnew-onpaint.html: * platform/mac/plugins/throw-on-dealloc.html: * platform/mac/plugins/undefined-property-crash.html: * platform/mac/plugins/update-widget-from-style-recalc.html: * platform/mac/plugins/webScriptObject-exception-deadlock.html: * platform/mac/scrollbars/key-window-not-first-responder.html: * platform/qt/plugins/application-plugin-plugins-disabled.html: * platform/win/plugins/call-javascript-that-destroys-plugin.html: * platform/win/plugins/get-value-netscape-window.html: * platform/win/plugins/iframe-inside-overflow.html: * platform/win/plugins/npn-invalidate-rect-invalidates-window.html: * platform/win/plugins/visibility-hidden.html: * platform/win/plugins/window-geometry-initialized-before-set-window.html: * platform/win/plugins/window-region-is-set-to-clip-rect.html: * platform/win/plugins/windowless-paint-rect-coordinates.html: * plugins/: * pointer-lock/lock-fail-responses-expected.txt: * pointer-lock/lock-fail-responses.html: * pointer-lock/pointer-lock-api.html: * pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt: * pointer-lock/pointerlockchange-pointerlockerror-events.html: * pointer-lock/pointerlocklost-event-expected.txt: * pointer-lock/pointerlocklost-event.html: * printing/compositing-layer-printing.html: * printing/css2.1/README.txt: * printing/css2.1/page-break-after-000.html: * printing/css2.1/page-break-after-001.html: * printing/css2.1/page-break-after-002.html: * printing/css2.1/page-break-after-003.html: * printing/css2.1/page-break-after-004.html: * printing/css2.1/page-break-before-000.html: * printing/css2.1/page-break-before-001.html: * printing/css2.1/page-break-before-002.html: * printing/css2.1/page-break-inside-000.html: * printing/iframe-print.html: * printing/media-queries-print.html: * printing/numberOfPages-expected.txt: * printing/page-count-layout-overflow.html: * printing/page-count-relayout-shrink.html: * printing/page-count-with-one-word.html: * printing/page-format-data-display-none.html: * printing/page-format-data-expected.txt: * printing/page-format-data.html: * printing/page-rule-css-text.html: * printing/page-rule-in-media-query.html: * printing/page-rule-selection-expected.txt: * printing/page-rule-selection.html: * printing/pageNumerForElementById-expected.txt: * printing/print-close-crash.html: * printing/pseudo-class-outside-page.html: * printing/resources/paged-media-test-utils.js: (pageNumberForElementShouldBe): (numberOfPagesShouldBe): (runPrintingTest): * printing/return-from-printing-mode.html: * printing/script-tests/numberOfPages.js: * printing/script-tests/pageNumerForElementById.js: * printing/setPrinting.html: * printing/simultaneous-position-float-change.html: * printing/single-line-must-not-be-split-into-two-pages.html: * printing/width-overflow.html: * printing/zoomed-document.html: * scrollbars/hidden-iframe-scrollbar-crash.html: * scrollbars/hidden-iframe-scrollbar-crash2.html: * scrollbars/hidden-scrollbar-prevents-layout.html: * scrollbars/overflow-custom-scrollbar-crash.html: * scrollbars/resources/hidden-iframe-scrollbar-crash2.html: * scrollbars/scroll-rtl-or-bt-layer.html: * scrollbars/scrollable-iframe-remove-crash.html: * scrollbars/scrollbar-click-does-not-blur-content.html: * scrollbars/scrollbar-crash-on-refresh.html: * scrollbars/scrollbar-drag-thumb-with-large-content.html: * scrollbars/scrollbar-gradient-crash.html: * scrollbars/scrollbar-iframe-click-does-not-blur-content.html: * scrollbars/scrollbar-initial-position.html: * scrollbars/scrollbar-middleclick-nopaste.html: * scrollbars/scrollbar-miss-mousemove-disabled.html: * scrollbars/scrollbar-miss-mousemove.html: * scrollbars/scrollbar-owning-renderer-crash.html: * scrollbars/scrollbar-part-created-with-no-parent-crash.html: * scrollbars/scrollbar-percent-padding-crash.html: * scrollbars/scrollbar-scrollbarparts-repaint-crash.html: * scrollbars/scrollevent-iframe-no-scrolling-wheel.html: * scrollbars/scrollevent-iframe-no-scrolling.html: * security/autocomplete-cleared-on-back.html: * security/block-test-no-port.html: * security/block-test.html: * security/set-form-autocomplete-attribute.html: Canonical link: https://commits.webkit.org/107031@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-06-15 07:38:37 +00:00
if (window.testRunner)
testRunner.setPrinting();
2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added printing/setPrinting.html to check there is the page boundary. Enabled printing/composite-layer-printing.html with setPrinting. The result of printing/media-queries-print.html shrunk because of PrintingMinimumShrinkFactor in PrintContext::begin(). * platform/mac/Skipped: * platform/mac/printing/compositing-layer-printing-expected.checksum: Added. * platform/mac/printing/compositing-layer-printing-expected.png: Added. * platform/mac/printing/compositing-layer-printing-expected.txt: Added. * platform/mac/printing/media-queries-print-expected.checksum: * platform/mac/printing/media-queries-print-expected.png: * platform/mac/printing/setPrinting-expected.checksum: Added. * platform/mac/printing/setPrinting-expected.png: Added. * platform/mac/printing/setPrinting-expected.txt: Added. * printing/compositing-layer-printing.html: * printing/setPrinting.html: Added. 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added spoolAllPagesWithBoundaries into PrintContext. Test: printing/setPrinting.html * WebCore.base.exp: * page/PrintContext.cpp: (WebCore::PrintContext::spoolAllPagesWithBoundaries): * page/PrintContext.h: 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (-[WebFrame printToCGContext:cgContext:pageWidthInPixels:]): 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * DumpRenderTree/PixelDumpSupport.cpp: (dumpWebViewAsPixelsAndCompareWithExpected): * DumpRenderTree/PixelDumpSupport.h: * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContext): This function was added to share bitmap context creation code. (createBitmapContextFromWebView): (createPagedBitmapContext): Canonical link: https://commits.webkit.org/54361@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 06:25:48 +00:00
</script>
</head>
<body style="margin: 0px;">
[Chromium] Need setPrinting https://bugs.webkit.org/show_bug.cgi?id=46152 Patch by Stephen Chenney <schenney@chromium.org> on 2011-10-27 Reviewed by Hajime Morita. Source/WebKit/chromium: * public/WebFrame.h: Added pure virtual prototype for printPagesWithBoundaries. Added enum and changed parameters for renderTreeAsText. * src/WebFrameImpl.cpp: (WebKit::ChromePrintContext::spoolAllPagesWithBoundaries): Added this method, based on the static in PrintContext. This uses Chromium specific page spooling and transforms. (WebKit::WebFrameImpl::renderTreeAsText): Updated to allow text dump in printed format. (WebKit::WebFrameImpl::printPagesWithBoundaries): Added method for testing printing page breaks. * src/WebFrameImpl.h: Added prototype. Tools: * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): Added logic for handling setPrinting. (LayoutTestController::reset): Clearing flags for setPrinting. (LayoutTestController::setPrinting): Set flags for setPrinting. * DumpRenderTree/chromium/LayoutTestController.h: (LayoutTestController::setIsPrinting): Added the setPrinting methods and flags. (LayoutTestController::isPrinting): Method to return the setPrinting status. * DumpRenderTree/chromium/TestShell.cpp: (dumpFramesAsPrintedText): A method for creating a text dump in printed layout. (TestShell::dump): Modified to dump setPrinting-specific output. * DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::paintPagesWithBoundaries): Handling for pixel tests when setPrinting is active. * DumpRenderTree/chromium/WebViewHost.h: Prototype for paintPagesWithBoundaries. LayoutTests: * platform/chromium/test_expectations.txt: Removing setPrinting tests from the expected failures. * platform/chromium-linux/printing/setPrinting-expected.png: Added. * platform/chromium-linux/printing/setPrinting-expected.txt: Added. * platform/chromium-linux/printing/single-line-must-not-be-split-into-two-pages-expected.png: Added. * platform/chromium-linux/printing/single-line-must-not-be-split-into-two-pages-expected.txt: Added. * platform/chromium-mac/printing/setPrinting-expected.png: Added. * platform/chromium-mac/printing/setPrinting-expected.txt: Added. * platform/chromium-mac/printing/single-line-must-not-be-split-into-two-pages-expected.png: Added. * platform/chromium-mac/printing/single-line-must-not-be-split-into-two-pages-expected.txt: Added. * platform/chromium-win/printing/setPrinting-expected.png: Added. * platform/chromium-win/printing/setPrinting-expected.txt: Added. * platform/chromium-win/printing/single-line-must-not-be-split-into-two-pages-expected.png: Added. * platform/chromium-win/printing/single-line-must-not-be-split-into-two-pages-expected.txt: Added. * platform/mac/printing/setPrinting-expected.png: Rebaselined for the change to the test html. * platform/mac/printing/setPrinting-expected.txt: Rebaselined for the change to the test html. * printing/setPrinting.html: Modified the test to make the box have a colored border instead of the solid background, as the solid background does not print on chromium. Canonical link: https://commits.webkit.org/87264@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-27 20:53:53 +00:00
<div style="width: 798px; height: 747px; border: 1px solid green;">
2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added printing/setPrinting.html to check there is the page boundary. Enabled printing/composite-layer-printing.html with setPrinting. The result of printing/media-queries-print.html shrunk because of PrintingMinimumShrinkFactor in PrintContext::begin(). * platform/mac/Skipped: * platform/mac/printing/compositing-layer-printing-expected.checksum: Added. * platform/mac/printing/compositing-layer-printing-expected.png: Added. * platform/mac/printing/compositing-layer-printing-expected.txt: Added. * platform/mac/printing/media-queries-print-expected.checksum: * platform/mac/printing/media-queries-print-expected.png: * platform/mac/printing/setPrinting-expected.checksum: Added. * platform/mac/printing/setPrinting-expected.png: Added. * platform/mac/printing/setPrinting-expected.txt: Added. * printing/compositing-layer-printing.html: * printing/setPrinting.html: Added. 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 Added spoolAllPagesWithBoundaries into PrintContext. Test: printing/setPrinting.html * WebCore.base.exp: * page/PrintContext.cpp: (WebCore::PrintContext::spoolAllPagesWithBoundaries): * page/PrintContext.h: 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * Misc/WebCoreStatistics.h: * Misc/WebCoreStatistics.mm: (-[WebFrame printToCGContext:cgContext:pageWidthInPixels:]): 2010-07-15 Shinichiro Hamaji <hamaji@chromium.org> Reviewed by Darin Adler. Printing test results differ between machines, we should use ImageDiff instead https://bugs.webkit.org/show_bug.cgi?id=20011 * DumpRenderTree/PixelDumpSupport.cpp: (dumpWebViewAsPixelsAndCompareWithExpected): * DumpRenderTree/PixelDumpSupport.h: * DumpRenderTree/mac/PixelDumpSupportMac.mm: (createBitmapContext): This function was added to share bitmap context creation code. (createBitmapContextFromWebView): (createPagedBitmapContext): Canonical link: https://commits.webkit.org/54361@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 06:25:48 +00:00
This test case should output 2 pages.
</div>
There should be a blue line above this test.
This line is the boundary of 2 pages.
As the height of green box is shorter than the height of a page by one pixel,
there should be a white line between the green box and the blue line.
</div>
</body>
</html>