5f938c237602fe3d2f427d95f5311c4e22eb4408 |
|
05-Sep-2014 |
Mussa <mussa@chromium.org> |
Create ImageComparison Factory. Fall back to rgb comparison when bp is not available. Video tests have longed used image comparison to detect glitches. Recently we brought image comparison logic to ui/SystemTray. The factory logic that was once used in video tests was coupled with responsibilites that were specific to video tests. We couldn't reuse the factory to create just image comparison objects in ui tests. This change extracts the image comparison object making responsibility of the video test factory to its own factory: image_comparison_factory. We also modify the clients, both video and ui tests to use this new lightweight image comparison factory. Also, we have noticed that sometimes bp service is not available. This causes the test to fail because when it tries to create the bp_comparer an exception is thrown. Add logic to the image comparison factory that returns an rgb comparer when an attempt to create a bp_comparer fails. BUG=chromium:410890 TEST=Ran video_GlitchDetection test on link, verify they passed. Ran ui_SystemTray test on link, verify they also passed. Made bp_comparer raise an exception in its __init__ (simulating what would happen if bp service were not available). Ensured rgb_comparer was used although the test had asked for bp_comparer. Change-Id: I08a9a1d5b6a7fc25b2013ecc95204910f8871267 Reviewed-on: https://chromium-review.googlesource.com/216773 Commit-Queue: Mussa Kiroga <mussa@chromium.org> Tested-by: Mussa Kiroga <mussa@chromium.org> Reviewed-by: Mussa Kiroga <mussa@chromium.org>
/external/autotest/client/cros/image_comparison/upload_on_fail_comparer.py
|