Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Issue 560023002: gpu: Add test for losing a context in a background tab (Closed)

Created:
6 years, 3 months ago by Sami
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org, bajones, Zhenyao Mo, hartmanng, dshwang
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

gpu: Add test for losing a context in a background tab This patch introduces a WebGL test that ensures we don't hit an assertion failure in DrawingBuffer when the context is lost in a background tab. Depends on the Blink fix from https://codereview.chromium.org/556303002. BUG=411372 Committed: https://crrev.com/e9975d5fc9666b81726aec835c26ce895bbf6d07 Cr-Commit-Position: refs/heads/master@{#294417}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -25 lines) Patch
M content/test/data/gpu/webgl.html View 1 chunk +17 lines, -2 lines 0 comments Download
M content/test/gpu/gpu_tests/context_lost.py View 10 chunks +55 lines, -23 lines 2 comments Download

Messages

Total messages: 11 (3 generated)
Sami
6 years, 3 months ago (2014-09-10 14:54:44 UTC) #2
Ken Russell (switch to Gerrit)
This is superb. Thank you for improving the test coverage in this area. LGTM
6 years, 3 months ago (2014-09-10 22:49:55 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/560023002/1
6 years, 3 months ago (2014-09-11 16:45:34 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1) as 35d9ebe1ad5a07266a24ab014178dee39bcbc763
6 years, 3 months ago (2014-09-11 17:53:21 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/e9975d5fc9666b81726aec835c26ce895bbf6d07 Cr-Commit-Position: refs/heads/master@{#294417}
6 years, 3 months ago (2014-09-11 18:42:55 UTC) #7
picksi1
https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/context_lost.py File content/test/gpu/gpu_tests/context_lost.py (right): https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/context_lost.py#newcode215 content/test/gpu/gpu_tests/context_lost.py:215: self.hide_tab_and_lose_context = False It looks like this has already ...
6 years, 3 months ago (2014-09-12 09:05:25 UTC) #9
Sami
https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/context_lost.py File content/test/gpu/gpu_tests/context_lost.py (right): https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/context_lost.py#newcode215 content/test/gpu/gpu_tests/context_lost.py:215: self.hide_tab_and_lose_context = False On 2014/09/12 09:05:25, picksi1 wrote: > ...
6 years, 3 months ago (2014-09-12 09:56:28 UTC) #10
Ken Russell (switch to Gerrit)
6 years, 3 months ago (2014-09-13 06:18:36 UTC) #11
Message was sent while issue was closed.
On 2014/09/12 09:56:28, Sami wrote:
>
https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/c...
> File content/test/gpu/gpu_tests/context_lost.py (right):
> 
>
https://codereview.chromium.org/560023002/diff/1/content/test/gpu/gpu_tests/c...
> content/test/gpu/gpu_tests/context_lost.py:215: self.hide_tab_and_lose_context
=
> False
> On 2014/09/12 09:05:25, picksi1 wrote:
> > It looks like this has already landed, but as an observation for future
> > refactoring this (ever increasing!) and often repeated list of bools seem to
> > really be defining a mode or state. Their use-cases are [mostly] mutually
> > exclusive.
> > 
> > It might be more scalable, and make the code more explicit, to change these
> into
> > an enum.
> > 
> > The only slight hiccup is kill_gpu_process & check_crash_count are slightly
> > entwined, but this could be easily fixed [currently check_crash_count being
> true
> > implies kill_gpu_process is true, so check_crash_count could be a standalone
> > state].
> 
> Right, what I'd really want to do here is have a custom validator class just
for
> this page, but I need to look at a few other page sets to see how that is
> usually done.

I'm not sure it's currently possible -- or at least easy. It would be much
better to refactor these tests to have a separate validator per test. The
validator's logic has gotten out of hand because of the need to handle all of
the variants of the test. Please see Issue 352807 -- filed a while ago -- about
making it easier to write Telemetry based tests.

Powered by Google App Engine
This is Rietveld 408576698