• alexclarke's avatar
    Don't throttle web views until they've been in the background for 10s · 368911e4
    alexclarke authored
    Previously background web views had timer alignment throttling applied immediately
    and budget based throttling after 10s.  It looks like even the timer alignment throttling
    on it's own is causing problems for new tabs where the visibility isn't initially known.
    To fix this we're changing the policy so we don't do any throttling at all until the web
    view has been in the background for 10s and then we turn budget based throttling &
    alignment on.
    
    Note this patch removes fast/dom/timer-throttling-hidden-page.html
    because the 10s grace period means this test would be too slow.
    
    Virtual time doesn't help because Date.now() (currently) isn't
    overridden. There's no support for using a mock time source in
    layout tests.  In any event there's plenty of C++ unit test coverage
    for this so it's not too bad to remove the layout test.
    
    BUG=649942
    
    Review-Url: https://codereview.chromium.org/2620743002
    Cr-Commit-Position: refs/heads/master@{#442989}
    368911e4
TestExpectations 196 KB