New issue
Advanced search Search tips

Issue 618689 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

webexposed tests should disable testing-specific APIs

Project Member Reported by rbyers@chromium.org, Jun 9 2016

Issue description

Blink's "webexposed" LayoutTests are designed to track the API surface area exposed by the browser (especially when run in the virtual/stable configuration which disables all experimental APIs).  But like other LayoutTests, they run inside of a special mode of content_shell which has a few APIs exposed for testing purposes (eg. window.internals, window.chrome).  This can cause confusion about what's really "web exposed" and creates a (small) blind spot that could in theory contribute to accidentally exposing such an internal API unintentionally.

Perhaps we could run all the webwexposed tests in a (different) virtual test suite that explicitly avoided adding test-specific APIs?  Not sure what to do about testRunner though - some minimal APIs are currently needed (like dumpAsText) to make the test behave as desired, but perhaps that could be eliminated (eg. by changing modes based on the command line flag).
 
It's tempting to think the webexposed scripts should just explicitly exclude known testing-specific APIs (would be trivial to do), but that kind of just masks the problem (doesn't change the fact that that we'd be blind to accidentally exposing one of those APIs).
Components: -Blink Blink>Infra

Comment 4 by rbyers@chromium.org, Jun 23 2016

Labels: -Hotlist-CompatTooling Hotlist-Predictability

Comment 5 by rbyers@chromium.org, Jun 23 2016

Labels: -Hotlist-Predictability Hotlist-PredictabilityInfra
Components: Blink>Infra>Predictability
Labels: -Hotlist-PredictabilityInfra
Components: -Blink>Infra
Cc: paulmeyer@chromium.org
Components: -Blink>Infra>Predictability Internals>FeatureControl
Cc: dtapu...@chromium.org
Labels: Hotlist-Input-Dev
Perhaps we should attempt to fix this next quarter?

To summarize this bug, we need to do two things:
1. hide window.{internals,testRunner) in --stable-release-mode, and
2. fix the webexposed/ tests not to use these APIs.

Step 2 would be lengthy but mechanical: we seem to have ~13 tests relying on testRunner, where we can to switch to in-html asserts (using testharness.js).
Cc: mustaq@chromium.org
Added to Feature Control code health hotlist.

Sign in to add a comment