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

Issue 830786 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-VR
Team-Security-UX
Proj-XR
Proj-XR-VR



Sign in to add a comment

Establish fuzz testing for VR URL formatting

Project Member Reported by mmoroz@chromium.org, Apr 9 2018

Issue description

It would be great to have a fuzz target for the following API:

ElisionParameters GetElisionParameters(const GURL& gurl,
                                       const url::Parsed& parsed,
                                       gfx::RenderText* render_text,
                                       int min_path_pixels) {

https://cs.chromium.org/chromium/src/chrome/browser/vr/elements/omnibox_formatting.cc?q=omnibox_formatting&sq=package:chromium&l=61

Here is an example of its use in a test: https://cs.chromium.org/chromium/src/chrome/browser/vr/elements/omnibox_formatting_unittest.cc?sq=package:chromium&l=78


 
Owner: cjgrant@chromium.org
Status: Assigned (was: Untriaged)
mmoroz@, I have a few questions to clarify your expectations.

The general sequence is:
- Browser supplies the current URL to our UI
- We call an unrelated non-VR URL formatter method to prepare the URL for display, and generate the metadata describing where parts of the URL reside.
- Our code takes the metadata and computes the desired offset.

Testing ought to ensure that the boundary point between host and path is always visible.

The purest way to test our code in isolation would be to use a dummy string, and randomly generate metadata, allocating arbitrary parts of the string to scheme, host, path, etc.

A more end-to-end approach would be to write a URL generator, and pump the input through Chrome's formatter, then through our code, and do the same verification.  The downside is that the VR team is now fuzzing code that has nothing to do with the last-mile VR fading code.

In your view, which do you see as ideal here, and why?

Marty (mbarbella@), could you please take a look at this, as I'm quite busy right now with some code coverage bits?
Testing with metadata generated by the fuzzer rather than doing it end-to-end makes the most sense to me.

It might still make sense for us to independently fuzz the url formatter (which I'll look into), but I agree that it doesn't make a ton of sense for the fuzzer for this VR code to be the place to test that.
Acknowledged, and thanks for the quick response!

Comment 7 by ddorwin@chromium.org, Jan 18 (4 days ago)

Labels: OS-Android

Sign in to add a comment