Hmm. We should certainly have a deterministic way of being able to tell whether the results are expected or not. The layout tests logic is (as you've seen) decidedly more complicated than your average test case, which really generally doesn't have anything other than expected="PASS" anyway.
Perhaps the best backwards-compatible way to fix this would be to change the layout tests to always set is_unexpected, and update the spec to say that determining whether a test result is unexpected is:
if "is_unexpected" in result.keys():
is_unexpected = result["is_unexpected"]
else:
is_unexpected = <the logic in steps.py>
but I'm open to other approaches ...
Comment 1 by mcgreevy@chromium.org
, Mar 21 2017