New issue
Advanced search Search tips

Issue 687492 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 703331



Sign in to add a comment

Change the definition of all PASS for testharness tests to ignore console logging.

Project Member Reported by r...@igalia.com, Feb 1 2017

Issue description


Hi, I'm importing css-grid-1 test suite from csswg-test repo.
One of the tests that is currently passing has a special output:
https://test.csswg.org/shepherd/testcase/grid-support-grid-template-areas-001/spec/css-grid-1/name/grid-support-grid-template-areas-001/

I guess the issue is that it has two lines like this:
  PASS 'grid' with: grid-template-areas: "a b"
  "c d"; 

I guess that might be considered like a failure for testharness.js.

What should we do regarding this?

One option would be to change the test, so it avoids the "new lines";
but I'm wondering if we should find a proper solution for this.

Another temporal option could be to write the "-expected" manually.

 

Comment 1 by r...@igalia.com, Feb 1 2017

grid-support-grid-template-areas-001-actual.txt
2.7 KB View Download
Cc: -qyears...@chromium.org
Owner: qyears...@chromium.org
Status: Started (was: Untriaged)
I think that in this case it makes sense to update our logic that says whether a testharness test is considered "passing" - right now, if there are any "unexpected" lines that aren't pass or fail or console messages, that's considered a fail, but we could change the logic to accept that:

https://codereview.chromium.org/2668973002

Comment 3 by r...@igalia.com, Feb 1 2017

Cc: r...@igalia.com
Note: the temporary solution of adding a -expected.txt SGTM.
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a8bd98b223f058a993bbfebbbfd5225544907fda

commit a8bd98b223f058a993bbfebbbfd5225544907fda
Author: qyearsley <qyearsley@chromium.org>
Date: Fri Feb 03 19:28:53 2017

Consider any testharness result with >= 1 PASS and no FAIL to be passing.

This changes the rule about testharness test results to make
it less conservative and simpler - so that newlines and text
in the output are OK, and the test is considered passing as
long as there's at least one PASS and no FAIL.

BUG= 687492 

Review-Url: https://codereview.chromium.org/2668973002
Cr-Commit-Position: refs/heads/master@{#448045}

[modify] https://crrev.com/a8bd98b223f058a993bbfebbbfd5225544907fda/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/a8bd98b223f058a993bbfebbbfd5225544907fda/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py
[modify] https://crrev.com/a8bd98b223f058a993bbfebbbfd5225544907fda/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py

Status: Fixed (was: Started)
Should now be fixed.

Comment 7 by cha...@chromium.org, Feb 15 2017

Status: Assigned (was: Fixed)
The fix for this issue has changed the behaviour for a presubmit check:
https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/check-testharness-expected-pass?q=is_all_pass_testharness_result&l=23&dr=C

I made a minor change to an existing layout test, and now the presubmit check will not allow it to be uploaded:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html

I'll admit the test is probably unusual it that there are no asserts, and instead relies on matching console output to the -expected.txt. I may restructure the test for other reasons, so I could work around this problem.

However, was the intent here to change this presubmit check for all layout tests? I don't know how many tests might be affected. If the change is intended, then some kind of PSA/documentation might be helpful. If not intended, it seems further consideration might be needed.
Labels: -Pri-3 Pri-2
Good point -- Technically, I think a testharness.js test with one PASS plus console messages should be considered an "all-pass testharness.js test result", so this change was intended -- although I didn't make a PSA.

I think that in general for testharness.js, console logs should be for diagnostic purposes, and shouldn't determine whether the test passes or fails; this is how results for testharness tests in web-platform-tests are treated in Mozilla. Furthermore, based on the discussion in bug 679742, I think that we actually want to change the behavior of the test runner to totally ignore all parts of testharness.js test output that are not PASS/FAIL results for specific subtests; I think that for testharness.js tests we don't want to look at console messages.

But, after taking a look at what tests are affected, I see that there are hundreds of affected tests (https://codereview.chromium.org/2696083004). Next step: start a discussion on blink-dev, and reach a conclusion about whether console messages in testharness test results can be ignored.
Cc: cha...@chromium.org
It has just become a little bit more difficult to revert that CL now, since hundreds of new tests have just been imported (in external/wpt) with only a single PASS.

After starting a discussion on blink-dev[1] (a little later than I should have), it seems like it's probably OK to go-ahead with this new rule. Jason, do you think it's OK to not revert this change, and to go forward with the new rule?

If so, the next step is to clean up the all-PASS -expected.txt files.

[1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3Ob2lq14KEs
Sorry, late response. I'm guessing you're not waiting for me, but agreed to not reverting.
Project Member

Comment 11 by bugdroid1@chromium.org, Feb 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a99dd6adb183a1a501035ccd9777e189087de82

commit 2a99dd6adb183a1a501035ccd9777e189087de82
Author: chasej <chasej@chromium.org>
Date: Sat Feb 25 04:11:35 2017

Use asserts in origin trials layout tests

The layout tests for exposure of interfaces were using console messages
with comparisons against -expected.txt files. Although they were using
testharness.js, the tests were not using asserts.

This CL changes the tests to use asserts, and remove the -expected.txt
files wherever possible.

Discussion on console messages in testharness tests can be found here:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3Ob2lq14KEs

BUG= 687492 

Review-Url: https://codereview.chromium.org/2712843005
Cr-Commit-Position: refs/heads/master@{#453063}

[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/foreignfetch-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/foreignfetch-origin-trial-interfaces.html
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces-script-added-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces-script-added.html
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces.html
[add] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/foreignfetch-origin-trial-interfaces-worker-disabled.js
[add] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/resources/foreignfetch-origin-trial-interfaces-worker-enabled.php
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces-script-added-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces-script-added.html
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces.html
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces-script-added-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces-script-added.html
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces.html
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/http/tests/resources/origin-trials-helper.js
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/foreignfetch-origin-trial-interfaces-expected.txt
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/imagecapture-origin-trial-interfaces-script-added-expected.txt
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/rootscroller-origin-trial-interfaces-script-added-expected.txt
[delete] https://crrev.com/6761779daf843b5afefd405fc3761e961d04313c/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/2a99dd6adb183a1a501035ccd9777e189087de82/third_party/WebKit/LayoutTests/virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/webusb-origin-trial-interfaces-script-added-expected.txt

The list of baselines that would now be removed according to the new rules about passing testharness tests is in https://codereview.chromium.org/2702133002.

Inspecting these tests individually, I think that:

The tests for these baselines should be updated to use asserts:
  csspaint/invalidation-background-image-expected.txt
  csspaint/invalidation-border-image-expected.txt
  csspaint/invalidation-content-image-expected.txt

The definition of all-PASS should be changed to exclude tests with harness errors so that these are kept:
  external/wpt/streams/piping/pipe-through.serviceworker.https-expected.txt
  external/wpt/streams/piping/pipe-through.sharedworker-expected.txt
  fast/dom/promise-rejection-events-console-expected.txt
  fast/dom/promise-rejection-events-lifetime-expected.txt

These should just be removed now:
  external/wpt/dom/nodes/Node-removeChild-expected.txt
  external/wpt/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-expected.txt
  external/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt

And these should maybe be removed, but also maybe the tests should be modified:
  fast/css/getComputedStyle/getComputedStyle-backgroundImage-expected.txt
  http/tests/feature-policy/vibrate-enabledforself-expected.txt
  http/tests/loading/css-no-cache-revalidation-expected.txt
  http/tests/loading/doc-write-async-third-party-script-expected.txt
  http/tests/loading/download_only_supported_stylesheet_types-expected.txt
  http/tests/loading/image-picture-download-after-shrink-expected.txt
  http/tests/loading/image-picture-no-download-after-picture-removal-expected.txt
  http/tests/loading/image-picture-no-download-after-removal-expected.txt
  http/tests/loading/image-picture-no-download-after-source-removal-expected.txt
  http/tests/security/vibrate_in_same_origin_iframe_allowed-expected.txt
  platform/android/fast/text/hyphens/can-hyphenate-locale-expected.txt
  platform/android/fast/text/hyphens/hyphens-parsing-001-expected.txt
  platform/mac/fast/text/hyphens/can-hyphenate-locale-expected.txt
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b9268f9f83df19ad02d9d45d7b37f2616a88c93

commit 8b9268f9f83df19ad02d9d45d7b37f2616a88c93
Author: qyearsley <qyearsley@chromium.org>
Date: Tue Feb 28 16:00:31 2017

Remove baselines in external/wpt that are now considered all-PASS.

Background: for  https://crbug.com/687492 , I simplified the logic
that determines whether a baseline is considered "all-PASS" so that
as long as there's at least one PASS and no FAIL, then it's all-PASS,
even if some of the test descriptions take multiple lines.

This change removes baselines that are now considered "all-PASS";
this shouldn't affect whether any tests pass or fail.

BUG= 687492 

Review-Url: https://codereview.chromium.org/2715243007
Cr-Commit-Position: refs/heads/master@{#453609}

[delete] https://crrev.com/c658afcd2005e816e487af04aabe3141a286d68a/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Node-removeChild-expected.txt
[delete] https://crrev.com/c658afcd2005e816e487af04aabe3141a286d68a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-expected.txt
[delete] https://crrev.com/c658afcd2005e816e487af04aabe3141a286d68a/third_party/WebKit/LayoutTests/platform/mac/external/wpt/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt

Labels: Test-Layout
Summary: Change the definition of all PASS for testharness tests to ignore console logging (was: testharness.js test with all PASS is considered to be failing)
Before considering this "done", I think that I should follow up with the things in #c12.
Labels: -Type-Bug Type-Feature
Summary: Change the definition of all PASS for testharness tests to ignore console logging. (was: Change the definition of all PASS for testharness tests to ignore console logging)
Blockedon: 703331
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f6af158631b459dee6bba39d3802aae8205f9d0

commit 4f6af158631b459dee6bba39d3802aae8205f9d0
Author: qyearsley <qyearsley@chromium.org>
Date: Tue Apr 18 19:14:58 2017

Remove remaining unnecessary all-PASS baseline files.

BUG= 687492 

Review-Url: https://codereview.chromium.org/2824453004
Cr-Commit-Position: refs/heads/master@{#465318}

[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/getComputedStyle-backgroundImage-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/feature-policy/vibrate-enabledforself-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/css-no-cache-revalidation-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-download-after-shrink-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-picture-removal-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-removal-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/loading/image-picture-no-download-after-source-removal-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/http/tests/security/vibrate_in_same_origin_iframe_allowed-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/platform/android/fast/text/hyphens/can-hyphenate-locale-expected.txt
[delete] https://crrev.com/c1ef2baa3dc05e2879e28bc22301e6bd713adad3/third_party/WebKit/LayoutTests/platform/android/fast/text/hyphens/hyphens-parsing-001-expected.txt

Status: Fixed (was: Assigned)

Sign in to add a comment