Igalia / chromium

Old repo. See https://crbug.com/578890 instead.
https://chromium.googlesource.com/chromium/src.git
BSD 3-Clause "New" or "Revised" License
115 stars 16 forks source link

fixed crash on content_browsertests. #478

Closed jkim-julie closed 6 years ago

jkim-julie commented 6 years ago

The crash is from below. [83666:83666:0816/185636.178617:FATAL:input_method_initializer.cc(73)] Check failed: !factory || factory == g_linux_input_method_context_factory_for_testing. An unknown LinuxInputMethodContextFactory was set.

0 0x7f60feaaec6c base::debug::StackTrace::StackTrace()

1 0x7f60fe9dc7ab logging::LogMessage::~LogMessage()

2 0x7f60ff3ffaee ui::ShutdownInputMethodForTesting()

3 0x000000c3ef60 testing::TestInfo::Run()

4 0x000000c3f477 testing::TestCase::Run()

5 0x000000c4ae87 testing::internal::UnitTestImpl::RunAllTests()

6 0x000000c4a9fd testing::UnitTest::Run()

7 0x000000d95981 base::TestSuite::Run()

8 0x000000d511f7 content::ContentTestLauncherDelegate::RunTestSuite()

9 0x000000d7b775 content::LaunchTests()

10 0x000000d511b0 main

11 0x7f60f3ee41c1 __libc_start_main

12 0x0000004c502a _start

The problem is that the chromium is supposed to set LinuxInputMethodContextFactory only when it's started from Chromium, not content_shell and AuraX11 sets it on views::LinuxUI::SetInstance at chrome layer. So, tests doesn't have LinuxInputMethodContextFactory except InitializeInputMethodForTesting().

I tried to avoid adding interface at Env but I couldn't find other way to call some API at initialization. WDYT?

jkim-julie commented 6 years ago

@msisov, as we discussed, I updated this change to skip DCHECK on ozone. Please take a look.