Having different extensions on the sidebar tests
ltilve opened this issue · 4 comments
By the comments from Devlin https://codereview.chromium.org/1168383002/#msg20
What about testing multiple extensions with sidebars?
Also review if we can manage to have the tests running inside of unittests instead of the browser ones
There are still some problems by turning the browsertest to BrowserWithTestWindowTest browser_action_test_util_ Using the approach of existing unittest at e7f7bed
[ RUN ] SidebarTest.CreateSidebar
Received signal 11 000000000000
#0 0x000002600efe base::debug::StackTrace::StackTrace()
#1 0x00000260139b base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fbf03d638d0
#3 0x000002208940 (anonymous namespace)::GetContainer()
#4 0x000002208a99 BrowserActionTestUtil::GetToolbarActionsBar()
#5 0x000000fea709 extensions::SidebarTest_CreateSidebar_Test::TestBody()
#6 0x0000021d1902 testing::Test::Run()
#7 0x0000021d1ac8 testing::TestInfo::Run()
#8 0x0000021d1c1d testing::TestCase::Run()
#9 0x0000021d2d35 testing::internal::UnitTestImpl::RunAllTests()
#10 0x0000021d2f55 testing::UnitTest::Run()
#11 0x000005452b65 base::TestSuite::Run()
#12 0x00000544faec base::(anonymous namespace)::LaunchUnitTestsInternal()
#13 0x00000544ffb6 base::LaunchUnitTests()
#14 0x0000004f8247 main
#15 0x7fbf0245fb45 __libc_start_main
#16 0x0000004f94e7
Now the browsertests are also checking the proper behaviour with several extensions df0dcfe Apart from other issues with the unittests and BrowserWithTestWindowTest, it seems that the cause for is_showing_popup failing(), even for the case of creating the extension and setting open_in_popup:true, is because the created extension was failing to have a proper default_popup.
Having now again all the checks done using unittests seems to have some problems, as we were creating manually the sidebar using the CreateSidebar(browser()->tab_strip_model()->GetActiveWebContents()) of the former sidebarManager. As we don't have it any more, ExtensionActionViewController::ExecuteAction returns ExtensionAction::ACTION_NONE due to !(web_contents) so no latter TriggerSidebar|PopupWithUrl is called.