New issue
Advanced search Search tips

Issue 634326 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Investigate possibility to remove test_runner::EnsureBlinkInitialized() in component/spellcheck unittests

Project Member Reported by timvolod...@chromium.org, Aug 4 2016

Issue description

when componentizing the chrome/renderer/spellchecker into components/spellcheck/renderer I had to add an explicit test_runner::EnsureBlinkInitialized() to avoid crashes in the following tests:
spellcheck_multilingual_unittest.cc
spellcheck_provider_test.cc
spellcheck_unittest.cc

without this initialization I get crash stacks with something like:
[ RUN      ] SpellCheckTest.CreateTextCheckingResultsAddsGrammarMarkers
ASSERTION FAILED: s_initialized
../../third_party/WebKit/Source/wtf/allocator/Partitions.h(53) : static
WTF::PartitionRootGeneric *WTF::Partitions::bufferPartition()

it looks like the explicit init is typically needed for tests in components, we
have a couple of component tests doing a similar thing:
https://cs.chromium.org/search/?q=%22test_runner::EnsureBlinkInitialized();%22&sq=package:chromium&type=cs

however it has been pointed out by groby@ that this should not be necessary, hence this bug.
 
Summary: Investigate possibility to remove test_runner::EnsureBlinkInitialized() in component/spellcheck unittests (was: Investigate possibility tot remove test_runner::EnsureBlinkInitialized() in component/spellcheck unittests)
Cc: -timvolod...@chromium.org
Owner: timvolod...@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 11 2016

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

commit 1774dc23b16b6e082f958fcc99545f18020241e1
Author: timvolodine <timvolodine@chromium.org>
Date: Thu Aug 11 00:28:44 2016

Remove dependency on test_runner from some components unittests.

Remove test_runner::EnsureBlinkInitialized() calls in some components
unittests. Instead add blink initialization to components/test/
run_all_unittests.cc via content::UnitTestTestSuite (on non-IOS
platforms). This also allows to remove the dependency on
components/test_runner from a few individual components. Also
removes dependency on //ui/events/platform/x11 from two
components/bookmarks/browser/ unit tests.

BUG= 634326 

Review-Url: https://codereview.chromium.org/2229943002
Cr-Commit-Position: refs/heads/master@{#411202}

[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/BUILD.gn
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/bookmarks/browser/BUILD.gn
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/bookmarks/browser/bookmark_node_data_unittest.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/bookmarks/browser/bookmark_utils_unittest.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/error_page/renderer/BUILD.gn
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/error_page/renderer/DEPS
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/error_page/renderer/net_error_helper_core_unittest.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/subresource_filter/content/renderer/BUILD.gn
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/test/run_all_unittests.cc
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/webcrypto/BUILD.gn
[modify] https://crrev.com/1774dc23b16b6e082f958fcc99545f18020241e1/components/webcrypto/algorithms/test_helpers.cc

Comment 5 by jam@chromium.org, Aug 12 2016

Status: Fixed (was: Untriaged)

Sign in to add a comment