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

Issue 770333 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 785053
Owner:
Last visit > 30 days ago
Closed: Nov 2017
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Spurious presubmit warning (calling test functions) for ssl_browser_tests.cc

Project Member Reported by lgar...@chromium.org, Sep 29 2017

Issue description

Uploading patch 12 of https://chromium-review.googlesource.com/c/chromium/src/+/679937 shows:

** Presubmit Warnings **
You might be calling functions intended only for testing from
production code.  It is OK to ignore this warning if you know what
you are doing, as the heuristics used to detect the situation are
not perfect.  The commit queue will not block on this warning.
  chrome/browser/ssl/ssl_browser_tests.cc:3527
    interstitial_page->GetDelegateForTesting()->GetTypeForTesting()); \
  chrome/browser/ssl/ssl_browser_tests.cc:3564
    interstitial_page->GetDelegateForTesting()->GetTypeForTesting());

This is obviously inside a test file. I thought I'd at least report it. :-)
 

Comment 1 by aga...@chromium.org, Oct 20 2017

Components: -Infra>SDK
Owner: lgar...@chromium.org
Status: Assigned (was: Untriaged)
The PRESUBMIT tests configured for chromium/src are specific to chromium/src, and can be modified in src.git's PRESUBMIT.py and the helpers it calls. You can modify this particular check here: https://chromium.googlesource.com/chromium/src/+/f1291948c56d6a1c63a7ecd72516e02431d48732/PRESUBMIT.py#496
Mergedinto: 785053
Status: Duplicate (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 16 2017

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

commit 5598d4051e60e269b841fed69068535a27cdfb2c
Author: Lucas Garron <lgarron@chromium.org>
Date: Thu Nov 16 20:46:39 2017

Rename browser tests in chrome/browser/ssl to *_browsertest.cc

This should allow the presubmit to know that *ForTesting() functions are
okay to call from ssl_browsertest.cc

Files have been reformatted using `git cl format` to make `git cl upload` happy,
but there have been no other changes to the test files.

Bug:  770333 ,  785053 
Change-Id: I01c4cb43ab8fea3b4ef7fe1a5f9abfccb49fe67d
Reviewed-on: https://chromium-review.googlesource.com/774118
Reviewed-by: Mustafa Emre Acer <meacer@chromium.org>
Commit-Queue: Lucas Garron <lgarron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517175}
[rename] https://crrev.com/5598d4051e60e269b841fed69068535a27cdfb2c/chrome/browser/ssl/chrome_expect_ct_reporter_browsertest.cc
[rename] https://crrev.com/5598d4051e60e269b841fed69068535a27cdfb2c/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
[rename] https://crrev.com/5598d4051e60e269b841fed69068535a27cdfb2c/chrome/browser/ssl/ssl_browsertest.cc
[modify] https://crrev.com/5598d4051e60e269b841fed69068535a27cdfb2c/chrome/test/BUILD.gn

Sign in to add a comment