• Mike Frysinger's avatar
    externs: refactor the list of generated externs · b08ce7a3
    Mike Frysinger authored
    This makes the externs util code easier to use by other presubmit
    tests by reducing a lot of boilerplate.
    
    This also enforces a rule that was being used in practice: the input
    & output names have to match (other than file extension).  So instead
    of letting the code map "downloads.idl" to the externs "whatever.js"
    name, the output must now always be "downloads.js".
    
    If we ignore the Chromecast & app_shell forks of the Chromium project,
    this rule holds.  Those forks cause problems by providing extensions
    to a few APIs and thus use duplicate source names.  imo, those forks
    should be providing their own separate externs tree if they want to
    provide externs (which they don't currently), although I suspect the
    users are so few that no one will bother.
    
    Bug: 469920
    Change-Id: Icb9d2ba4ad78c3c607a09402c82841fb745b4b78
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215901
    Commit-Queue: Mike Frysinger <vapier@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#771917}
    b08ce7a3
PRESUBMIT.py 755 Bytes