[piexwasm] Add tests.html test page
Install the Piex WASM on the page & say "boo". The Puppeteer driver is watching and calls the test page function runTest(image) and waits for test done (document.title == "DONE"), then tests the next image. For each image: the test page fetches the image, sends its data to the Wasm module and renders its image preview and thumbnail results on the test page. The test page logs all processing steps and time taken, and also the hash of the test image preview and thumbnail data returned by the Piex Wasm module, then sets document.title = "DONE". An 'npm run test' test run compares the golden hash values of all test images to the hash values logged by the test page. If the hashes match tests PASS. If they do not, tests FAIL. Updating the test images would mean updating the golden files (easy to do). Small issue though, since the external Piex has tests for many more raw images. Minor: add README.md documenting install/build/test steps. Bug: 935285 Change-Id: I9a46936a7c20d242fb84f578c785833205a38c1f Reviewed-on: https://chromium-review.googlesource.com/c/1493635 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Auto-Submit: Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#636721}
Showing
Please register or sign in to comment