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

Issue 304403002: Gamepad: add test support for page visibility behavior (Closed)

Created:
6 years, 6 months ago by kbalazs
Modified:
5 years, 9 months ago
Reviewers:
bajones, jam
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Gamepad: make page visibility behavior layout testable This CL refactors testing infrastructure for gamepad so that we can actually write a layout test that would fail if Blink doesn't honor visibility state. Now Platform::setGamepadListener is now hooked to GamepadController. BUG=344556 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278723

Patch Set 1 #

Patch Set 2 : reworked #

Patch Set 3 : with new file #

Patch Set 4 : do not help Blink to do it's job from the testing code #

Patch Set 5 : rebase (trivial) #

Patch Set 6 : trivial rebase #

Total comments: 8

Patch Set 7 : fixed comments #

Total comments: 2

Patch Set 8 : fix nits #

Patch Set 9 : add missing override's #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -127 lines) Patch
A content/public/renderer/renderer_gamepad_provider.h View 1 2 3 4 5 6 7 1 chunk +30 lines, -0 lines 0 comments Download
M content/public/test/layouttest_support.h View 1 2 3 4 5 2 chunks +3 lines, -9 lines 0 comments Download
M content/renderer/gamepad_shared_memory_reader.h View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -6 lines 0 comments Download
M content/renderer/gamepad_shared_memory_reader.cc View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 3 4 5 4 chunks +7 lines, -11 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 5 4 chunks +6 lines, -35 lines 0 comments Download
M content/shell/renderer/test_runner/WebTestDelegate.h View 1 2 3 4 5 6 2 chunks +3 lines, -8 lines 0 comments Download
M content/shell/renderer/test_runner/gamepad_controller.h View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -3 lines 0 comments Download
M content/shell/renderer/test_runner/gamepad_controller.cc View 1 2 3 10 chunks +20 lines, -21 lines 0 comments Download
M content/shell/renderer/webkit_test_runner.h View 1 2 3 1 chunk +1 line, -5 lines 0 comments Download
M content/shell/renderer/webkit_test_runner.cc View 1 2 3 4 1 chunk +3 lines, -14 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 4 5 1 chunk +3 lines, -10 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
kbalazs
With this I will be able to add a test case for a minor issue ...
6 years, 6 months ago (2014-05-29 22:31:35 UTC) #1
kbalazs
Take this as WIP, I'm reworking it.
6 years, 6 months ago (2014-05-31 00:28:06 UTC) #2
kbalazs
Rework done, PTAL
6 years, 6 months ago (2014-06-02 17:26:08 UTC) #3
kbalazs
On 2014/06/02 17:26:08, kbalazs wrote: > Rework done, PTAL Changed my mind again. Actually there ...
6 years, 6 months ago (2014-06-03 21:45:54 UTC) #4
kbalazs
This is now ready together with https://codereview.chromium.org/306363002/
6 years, 6 months ago (2014-06-05 22:46:23 UTC) #5
kbalazs
On 2014/06/05 22:46:23, kbalazs wrote: > This is now ready together with https://codereview.chromium.org/306363002/ In case ...
6 years, 6 months ago (2014-06-13 00:09:21 UTC) #6
bajones
On 2014/06/13 at 00:09:21, b.kelemen wrote: > On 2014/06/05 22:46:23, kbalazs wrote: > > This ...
6 years, 6 months ago (2014-06-13 00:16:44 UTC) #7
jam
https://codereview.chromium.org/304403002/diff/100001/content/public/renderer/renderer_gamepad_provider.h File content/public/renderer/renderer_gamepad_provider.h (right): https://codereview.chromium.org/304403002/diff/100001/content/public/renderer/renderer_gamepad_provider.h#newcode18 content/public/renderer/renderer_gamepad_provider.h:18: virtual void SetGamepadListener(blink::WebGamepadListener*) = 0; nit: name the parameter. ...
6 years, 6 months ago (2014-06-18 23:23:43 UTC) #8
kbalazs
https://codereview.chromium.org/304403002/diff/100001/content/shell/renderer/DEPS File content/shell/renderer/DEPS (right): https://codereview.chromium.org/304403002/diff/100001/content/shell/renderer/DEPS#newcode2 content/shell/renderer/DEPS:2: "+content/renderer", On 2014/06/18 23:23:42, jam wrote: > this isn't ...
6 years, 6 months ago (2014-06-19 00:18:41 UTC) #9
jam
lgtm with nits https://codereview.chromium.org/304403002/diff/100001/content/renderer/gamepad_shared_memory_reader.h File content/renderer/gamepad_shared_memory_reader.h (right): https://codereview.chromium.org/304403002/diff/100001/content/renderer/gamepad_shared_memory_reader.h#newcode22 content/renderer/gamepad_shared_memory_reader.h:22: , public RendererGamepadProvider { On 2014/06/18 ...
6 years, 6 months ago (2014-06-19 16:21:11 UTC) #10
kbalazs
The CQ bit was checked by b.kelemen@samsung.com
6 years, 6 months ago (2014-06-19 19:04:04 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/304403002/140001
6 years, 6 months ago (2014-06-19 19:05:43 UTC) #12
kbalazs
The CQ bit was checked by b.kelemen@samsung.com
6 years, 6 months ago (2014-06-19 22:43:17 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/304403002/160001
6 years, 6 months ago (2014-06-19 22:43:26 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 06:59:08 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-20 07:13:03 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/85845)
6 years, 6 months ago (2014-06-20 07:13:04 UTC) #17
kbalazs
The CQ bit was checked by b.kelemen@samsung.com
6 years, 6 months ago (2014-06-20 13:45:27 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/304403002/160001
6 years, 6 months ago (2014-06-20 13:46:57 UTC) #19
commit-bot: I haz the power
Change committed as 278723
6 years, 6 months ago (2014-06-20 16:57:09 UTC) #20
loislo
On 2014/06/20 16:57:09, I haz the power (commit-bot) wrote: > Change committed as 278723 ASAN ...
6 years, 6 months ago (2014-06-23 06:46:04 UTC) #21
kbalazs
On 2014/06/23 06:46:04, loislo wrote: > On 2014/06/20 16:57:09, I haz the power (commit-bot) wrote: ...
6 years, 5 months ago (2014-06-27 21:14:56 UTC) #22
kbalazs
6 years, 5 months ago (2014-06-27 21:16:15 UTC) #23
Message was sent while issue was closed.
On 2014/06/27 21:14:56, kbalazs wrote:
> On 2014/06/23 06:46:04, loislo wrote:
> > On 2014/06/20 16:57:09, I haz the power (commit-bot) wrote:
> > > Change committed as 278723
> > 
> > ASAN bot is unhappy with this patch because TestInterfaces calls SetDelegate
> > with null pointer.
> > 
> > 23:00:40.631 5143   ==13==ERROR: AddressSanitizer: SEGV on unknown address
> > 0x000000000000 (pc 0x000000616467 sp 0x7fffcb97f160 bp 0x7fffcb97f160 T0)
> > 23:00:40.631 5143       #0 0x616466 in
> > content::GamepadController::SetDelegate(content::WebTestDelegate*)
> >
>
/mnt/data/b/build/slave/WebKit_Linux_ASAN/build/src/out/Release/../../content/shell/renderer/test_runner/gamepad_controller.cc:157:0
> > 23:00:40.631 5143       #1 0x5d901d in
> > content::TestInterfaces::~TestInterfaces()
> >
>
/mnt/data/b/build/slave/WebKit_Linux_ASAN/build/src/out/Release/../../content/shell/renderer/test_runner/TestInterfaces.cpp:59:0
> > 23:00:40.631 5143       #2 0x58fb35 in
> >
>
base::DefaultDeleter<content::TestInterfaces>::operator()(content::TestInterfaces*)
> > const
> >
>
/mnt/data/b/build/slave/WebKit_Linux_ASAN/build/src/out/Release/../../base/memory/scoped_ptr.h:137:0
> > 2
> 
> This has been fixed by a blink side revert and reland with fix. Now this
cannot
> happen in practice, although technically it would be cleaner to not rely blink
> behavior, so I should add some null checks.

Err, @loislo already handled that, I forgot... Thanks again.

Powered by Google App Engine
This is Rietveld 408576698