Commit 19b4ec25 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Fix SpellcheckCustomDictionaryTest.SyncBeforeLoadDoesNotDuplicateWords.

Since the spellchecker code has been migrated from the FILE
thread to TaskScheduler, tests need to use
content::RunAllTasksUntilIdle() instead of
base::RunLoop().RunUntilIdle() to wait for all spellchecker-related
tasks to run.

Bug: 770653
Change-Id: I8c4ac0e1183d8e11b8d60e334140e1fc1066d787
Reviewed-on: https://chromium-review.googlesource.com/695835Reviewed-by: default avatarRachel Blum <groby@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506455}
parent c8fee977
......@@ -15,7 +15,6 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_samples.h"
#include "base/metrics/statistics_recorder.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
......@@ -31,6 +30,7 @@
#include "components/sync/model/sync_error_factory_mock.h"
#include "components/sync/protocol/sync.pb.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_utils.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -513,7 +513,7 @@ TEST_F(SpellcheckCustomDictionaryTest, SyncBeforeLoadDoesNotDuplicateWords) {
EXPECT_EQ(expected_words_in_memory, custom_dictionary->GetWords());
// Finish all writes to disk.
base::RunLoop().RunUntilIdle();
content::RunAllTasksUntilIdle();
std::string actual_contents_on_disk;
base::ReadFileToString(path, &actual_contents_on_disk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment