New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657589 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 651728



Sign in to add a comment

Chromium Code Search - Xrefs do not filter out *all* test code

Project Member Reported by lukasza@chromium.org, Oct 19 2016

Issue description

Repro:
1. Go to Chromium Code Search
2. Look at Xrefs of WindowOpenDisposition::NEW_POPUP
   (at https://cs.chromium.org/chromium/src/ui/base/window_open_disposition.h?l=20)
3. In "Xref Filter" dropdown check "Exclude tests" option

Expected behavior: All test code is excluded (i.e. all code from 

Actual behavior: Some test code references are still included - for example references from chrome/browser/ui/browser_navigator_browsertest_chromeos.cc or from chrome/test/base/test_browser_window.cc (note that the latter example comes from chrome/test:test_support BUILD.gn target which is marked as testonly=true).
 
Another example - Xrefs of blink::WebNavigationPolicy::WebNavigationPolicyNewPopup include components/test_runner/test_common.cc even when tests are supposedly excluded.  Note that this source file is compiled via components/test_runner/BUILD.gn which does specify testonly=true under component("test_runner").

Another example - Xrefs/Overrides of blink::EventListener::handleEvent include third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp even when tests are supposedly excluded.

Comment 3 by emso@chromium.org, Oct 26 2016

Labels: Stability
Owner: emso@chromium.org
Status: Assigned (was: Untriaged)

Comment 4 by emso@chromium.org, Oct 26 2016

These files are not being filtered out because the filter configuration is shared with internal code search. The internal convention for naming of test files is more uniform and different.

I'll investigate if we can divide the config between internal and external.

Comment 5 by emso@chromium.org, Oct 27 2016

Blockedon: 651728

Comment 6 by emso@chromium.org, Oct 27 2016

I split of how filtering is done internally and externally for test files and generated files has been submitted. The fixed filtering will be available once we have migrated to the staging version of code search. 

Comment 7 by emso@chromium.org, Feb 9 2017

Status: Verified (was: Assigned)
This fix has been released. Closing this bug but please re-open if the issue reappears.

Sign in to add a comment