[QuickLook] Update quicklook test expectations
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jan 2017 21:29:57 +0000 (21:29 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Jan 2017 21:29:57 +0000 (21:29 +0000)
commit06acc3276a9a5d35b22f5adfa1203e3409b7cd41
treee3b51a73bfea716e4ee1c09d0d2201c2be1369f2
parent4762f0bba66fffe6a56c484b70c72dd710d13145
[QuickLook] Update quicklook test expectations
https://bugs.webkit.org/show_bug.cgi?id=166798
<rdar://problem/26477735>

Reviewed by Alex Christensen.

Source/WebCore:

QuickLook uses UUIDs to generate x-apple-ql-id: URLs, so they will differ each time a
document is previewed. Since these URLs are included in QuickLook layout test results,
WebArchiveDumpSupport needs to replace them with predictable values when dumping a web
archive.

* testing/cocoa/WebArchiveDumpSupport.mm:
(WebCoreTestSupport::quickLookURLReplacements): Created a static Vector of CFStringRef pairs
to store x-apple-ql-id: URLs and their replacement values.
(WebCoreTestSupport::normalizeWebResourceURL): If the URL starts with “x-apple-ql-id://”,
replace the text between the scheme and the file extension with “resource”. Store the
original URL along with its replacement in quickLookURLReplacements().
(WebCoreTestSupport::createXMLStringFromWebArchiveData): Replaced all QuickLook URLs in the
final XML text with their replacement URLs.

LayoutTests:

For documents that generate HTML previews, updated the expected results to be web archives.
Web archives capture the same information that the expected HTML files did, but allow for
easy rebasing with --reset-results.

For documents that generate PDF previews, a webarchive expected result is inappropriate
since the generated PDF will differ between runs due to changing metadata (e.g. creation
date). These tests were kept as reftests but with updated expected results.

* platform/ios-simulator/TestExpectations: Unskipped quicklook/.
* quicklook/excel-expected.html: Removed.
* quicklook/excel-expected.txt: Added.
* quicklook/excel-legacy-expected.html: Removed.
* quicklook/excel-legacy-expected.txt: Added.
* quicklook/excel-legacy.html: Updated to dump as webarchive.
* quicklook/excel.html: Ditto.
* quicklook/keynote-09-expected.html: Removed.
* quicklook/keynote-09-expected.txt: Added.
* quicklook/keynote-09.html: Updated to dump as webarchive.
* quicklook/numbers-09-expected.html: Removed.
* quicklook/numbers-09-expected.txt: Added.
* quicklook/numbers-09.html: Updated to dump as webarchive.
* quicklook/pages-09-expected.html: Removed.
* quicklook/pages-09-expected.txt: Added.
* quicklook/pages-09.html: Updated to dump as webarchive.
* quicklook/powerpoint-expected.html: Removed.
* quicklook/powerpoint-expected.txt: Added.
* quicklook/powerpoint-legacy-expected.html: Removed.
* quicklook/powerpoint-legacy-expected.txt: Added.
* quicklook/powerpoint-legacy.html: Updated to dump as webarchive.
* quicklook/powerpoint.html: Updated to dump as webarchive.
* quicklook/resources/excel-expected.html: Removed.
* quicklook/resources/excel-legacy-expected.html: Removed.
* quicklook/resources/keynote-09-expected/index.css: Removed.
* quicklook/resources/keynote-09-expected/index.html: Removed.
* quicklook/resources/keynote-09-expected/index.js: Removed.
* quicklook/resources/keynote-expected.pdf: Updated.
* quicklook/resources/numbers-09-expected/canvas.js: Removed.
* quicklook/resources/numbers-09-expected/index.html: Removed.
* quicklook/resources/numbers-09-expected/navigation.css: Removed.
* quicklook/resources/numbers-09-expected/navigation.html: Removed.
* quicklook/resources/numbers-09-expected/sheet_1.html: Removed.
* quicklook/resources/numbers-expected.pdf: Updated.
* quicklook/resources/pages-09-expected/index.css: Removed.
* quicklook/resources/pages-09-expected/index.html: Removed.
* quicklook/resources/pages-expected.pdf: Updated.
* quicklook/resources/powerpoint-expected.html: Removed.
* quicklook/resources/powerpoint-legacy-expected.html: Removed.
* quicklook/resources/webkit-icon.pdf: Removed.
* quicklook/resources/webkit-icon.png: Removed.
* quicklook/resources/webkit-icon.tiff: Removed.
* quicklook/resources/word-expected.html: Removed.
* quicklook/resources/word-legacy-expected.html: Removed.
* quicklook/word-expected.html: Removed.
* quicklook/word-expected.txt: Added.
* quicklook/word-legacy-expected.html: Removed.
* quicklook/word-legacy-expected.txt: Added.
* quicklook/word-legacy.html: Updated to dump as webarchive.
* quicklook/word.html: Updated to dump as webarchive.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
53 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/quicklook/excel-expected.html [deleted file]
LayoutTests/quicklook/excel-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/excel-legacy-expected.html [deleted file]
LayoutTests/quicklook/excel-legacy-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/excel-legacy.html
LayoutTests/quicklook/excel.html
LayoutTests/quicklook/keynote-09-expected.html [deleted file]
LayoutTests/quicklook/keynote-09-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/keynote-09.html
LayoutTests/quicklook/numbers-09-expected.html [deleted file]
LayoutTests/quicklook/numbers-09-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/numbers-09.html
LayoutTests/quicklook/pages-09-expected.html [deleted file]
LayoutTests/quicklook/pages-09-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/pages-09.html
LayoutTests/quicklook/powerpoint-expected.html [deleted file]
LayoutTests/quicklook/powerpoint-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/powerpoint-legacy-expected.html [deleted file]
LayoutTests/quicklook/powerpoint-legacy-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/powerpoint-legacy.html
LayoutTests/quicklook/powerpoint.html
LayoutTests/quicklook/resources/excel-expected.html [deleted file]
LayoutTests/quicklook/resources/excel-legacy-expected.html [deleted file]
LayoutTests/quicklook/resources/keynote-09-expected/index.css [deleted file]
LayoutTests/quicklook/resources/keynote-09-expected/index.html [deleted file]
LayoutTests/quicklook/resources/keynote-09-expected/index.js [deleted file]
LayoutTests/quicklook/resources/keynote-expected.pdf
LayoutTests/quicklook/resources/numbers-09-expected/canvas.js [deleted file]
LayoutTests/quicklook/resources/numbers-09-expected/index.html [deleted file]
LayoutTests/quicklook/resources/numbers-09-expected/navigation.css [deleted file]
LayoutTests/quicklook/resources/numbers-09-expected/navigation.html [deleted file]
LayoutTests/quicklook/resources/numbers-09-expected/sheet_1.html [deleted file]
LayoutTests/quicklook/resources/numbers-expected.pdf
LayoutTests/quicklook/resources/pages-09-expected/index.css [deleted file]
LayoutTests/quicklook/resources/pages-09-expected/index.html [deleted file]
LayoutTests/quicklook/resources/pages-expected.pdf
LayoutTests/quicklook/resources/powerpoint-expected.html [deleted file]
LayoutTests/quicklook/resources/powerpoint-legacy-expected.html [deleted file]
LayoutTests/quicklook/resources/webkit-icon.pdf [deleted file]
LayoutTests/quicklook/resources/webkit-icon.png [deleted file]
LayoutTests/quicklook/resources/webkit-icon.tiff [deleted file]
LayoutTests/quicklook/resources/word-expected.html [deleted file]
LayoutTests/quicklook/resources/word-legacy-expected.html [deleted file]
LayoutTests/quicklook/word-expected.html [deleted file]
LayoutTests/quicklook/word-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/word-legacy-expected.html [deleted file]
LayoutTests/quicklook/word-legacy-expected.txt [new file with mode: 0644]
LayoutTests/quicklook/word-legacy.html
LayoutTests/quicklook/word.html
Source/WebCore/ChangeLog
Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm