New issue
Advanced search Search tips

Issue 764873 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 760320



Sign in to add a comment

Content_Unittests-Viz: NoTransportImageTransportFactory

Project Member Reported by jonr...@chromium.org, Sep 13 2017

Issue description

NoTransportImageTransportFactory has dependencies on:
  -  viz::GLHelper
  -  viz::FrameSinkManagerImpl
  -  viz::HostFrameSinkManager
  -  viz::ContextProvider

Find out how the Viz process split impacts this test, and update.
 

Comment 1 by laforge@google.com, Nov 8 2017

Components: -Internals>Viz Internals>Services>Viz
Migrating from Internals>Viz to Internals>Services>Viz.
NoTransportImageTransportFactory is not being triggered by any of the content_browsertests. 

For content_unittest usage, we will need to make sure that it creates the needed components in-process. For calls that occur over mojo there are two main options here.
  - mock them out, allowing testing code to set expected callbacks
  - run a loop locally to handle the asynchronous nature of these calls
Cc: kylec...@chromium.org
NoTransportImageTransportFactory::GetFrameSinkManager() needs to trigger NOTREACHED() with --enable-viz. That will give us a better idea of what is failing here.
Blocking: -760181 760320
Summary: Content_Unittests-Viz: NoTransportImageTransportFactory (was: ContentBrowserTests-Viz: NoTransportImageTransportFactory)
This is only applicable for content_unittests.
Also, it's not NoTransportImageTransportFactory that has the FrameSinkManager related functions. It has an InProcessContextFactory, so it's InProcessContextFactory::GetFrameSinkManager() that would need to be changed.

https://cs.chromium.org/chromium/src/ui/compositor/test/in_process_context_factory.cc?l=376&rcl=a4d3d14cdef6779e7eaabe74aeb3ad10fec2a17a
Owner: kylec...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f356bafaabfd43ede92c6285dbcc4878b09f0e8d

commit f356bafaabfd43ede92c6285dbcc4878b09f0e8d
Author: kylechar <kylechar@chromium.org>
Date: Wed Dec 20 19:16:46 2017

viz: Implement TestProcessTransportFactory.

The current NoTransportImageTransportFactory implementation isn't
appropriate for running content_unittests with --enable-viz. Replace it
with TestImageTransportFactory with a few differences:

1. Create FakeLayerTreeFrameSinks. The tests don't need a working a
   display compositor anyways.
2. Change behavior based on the --enable-viz flag to mimic
   GpuProcessTransportFactory or VizProcessTransportFactory. The main
   difference is how HostFrameSinkManager is connected to a
   FrameSinkManagerImpl.

Bug:  764873 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I951b34ae489390689a7e97b07e897fbfc57419e9
Reviewed-on: https://chromium-review.googlesource.com/833149
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525400}
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/components/viz/test/test_frame_sink_manager.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/components/viz/test/test_frame_sink_manager.h
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/compositor/reflector_impl_unittest.cc
[delete] https://crrev.com/2f5d7c022afb7dd746af5d0a68f2930d09e76468/content/browser/compositor/test/no_transport_image_transport_factory.cc
[delete] https://crrev.com/2f5d7c022afb7dd746af5d0a68f2930d09e76468/content/browser/compositor/test/no_transport_image_transport_factory.h
[add] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/compositor/test/test_image_transport_factory.cc
[add] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/compositor/test/test_image_transport_factory.h
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/frame_host/navigator_impl_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/renderer_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/public/test/test_renderer_host.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/content/test/BUILD.gn
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/services/ui/ws/test_gpu_host.cc
[modify] https://crrev.com/f356bafaabfd43ede92c6285dbcc4878b09f0e8d/testing/buildbot/filters/viz.content_unittests.filter

As a heads up the CL in #7 has introduced a failure in content_unittests ReflectorImplTest.CheckOverlaySWMirroring when running with --enable-viz

However this test only runs on Ozone configs, such as Chrome OS.

Error:

test_image_transport_factory.cc(175)] Check failed: false. 
#0 0x7ff556cfa18d base::debug::StackTrace::StackTrace()
#1 0x7ff556cf870c base::debug::StackTrace::StackTrace()
#2 0x7ff556d7cb3d logging::LogMessage::~LogMessage()
#3 0x0000031a476d content::TestImageTransportFactory::GetGLHelper()
#4 0x7ff5528ad072 content::ReflectorTexture::ReflectorTexture()
#5 0x000000b67a09 content::(anonymous namespace)::TestOutputSurface::OnReflectorChanged()
#6 0x7ff552890270 content::BrowserCompositorOutputSurface::SetReflector()
#7 0x7ff5528aa3dc content::ReflectorImpl::OnSourceSurfaceReady()
#8 0x000000b6bd5f content::ReflectorImplTest::SetUpReflector()
#9 0x000000b6893b content::(anonymous namespace)::ReflectorImplTest_CheckOverlaySWMirroring_Test::TestBody()
#10 0x0000012d619e _ZN7testing8internal12InvokeHelperIdNSt3__15tupleIJEEEE12InvokeMethodIN5media23VirtualAudioInputStreamEMS8_FdvEEEdPT_T0_RKS4_
#11 0x000002755b42 testing::internal::HandleExceptionsInMethodIfSupported<>()
#12 0x000002740e16 testing::Test::Run()
#13 0x00000274174d testing::TestInfo::Run()
#14 0x0000027421ac testing::TestCase::Run()
#15 0x00000274dd0c testing::internal::UnitTestImpl::RunAllTests()
#16 0x0000012d541e _ZN7testing8internal12InvokeHelperIbNSt3__15tupleIJEEEE12InvokeMethodIN5media23VirtualAudioInputStreamEMS8_FbvEEEbPT_T0_RKS4_
#17 0x0000027570d2 testing::internal::HandleExceptionsInMethodIfSupported<>()
#18 0x00000274d91e testing::UnitTest::Run()
#19 0x0000031d0611 RUN_ALL_TESTS()
#20 0x0000031cd6e2 base::TestSuite::Run()
#21 0x00000312892d content::UnitTestTestSuite::Run()
#22 0x0000007ab41d _ZN4base8internal13FunctorTraitsIMN7content26AppCacheRequestHandlerTestEFvvEvE6InvokeIPS3_JEEEvS5_OT_DpOT0_
#23 0x0000007ab364 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIMN7content26AppCacheRequestHandlerTestEFvvEJPS5_EEEvOT_DpOT0_
#24 0x0000021349f5 _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE7RunImplIRKS6_RKNSt3__15tupleIJS8_EEEJLm0EEEEiOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE
#25 0x00000213493c _ZN4base8internal7InvokerINS0_9BindStateIMN7content17UnitTestTestSuiteEFivEJNS0_17UnretainedWrapperIS4_EEEEEFivEE3RunEPNS0_13BindStateBaseE
#26 0x0000008cdded _ZNKR4base17RepeatingCallbackIFvvEE3RunEv
#27 0x0000031f283f base::(anonymous namespace)::LaunchUnitTestsInternal()
#28 0x0000031f26d5 base::LaunchUnitTests()
#29 0x0000021347e3 main
#30 0x7ff5459edf45 __libc_start_main
#31 0x0000006d8a8a _start

It looks like ReflectorTexture reaches directly into ImageTransportFactory. I'll disable for now
Status: Fixed (was: Assigned)
Thanks for disabling the test. There is crbug.com/601869 for figuring out how to make reflector work with viz. Otherwise this task is all wrapped up.

Sign in to add a comment