summaryrefslogtreecommitdiffstats
path: root/components/visitedlink
diff options
context:
space:
mode:
authormtomasz <mtomasz@chromium.org>2014-09-15 09:23:46 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-15 16:28:08 +0000
commitf7d99a5c7cf7d2286061cc7edc87a1f5451f880c (patch)
treeb7115896161cd341eef15acc5262391ef3aabacd /components/visitedlink
parente15af4283ff44218f2b1a351cc07395c6807de10 (diff)
downloadchromium_src-f7d99a5c7cf7d2286061cc7edc87a1f5451f880c.zip
chromium_src-f7d99a5c7cf7d2286061cc7edc87a1f5451f880c.tar.gz
chromium_src-f7d99a5c7cf7d2286061cc7edc87a1f5451f880c.tar.bz2
Use content::RunBlockingPoolTask() in tests.
The new utility function should be used instead of manually flushing the blocking pool. This CL replaces BlockingPool::FlushForTesting and RunLoop::RunUntilIdle() wherever it was obvious. Along the way lint errors have been fixed. TEST=Refactoring only. All current tests should pass. BUG=392716 Review URL: https://codereview.chromium.org/409743003 Cr-Commit-Position: refs/heads/master@{#294835}
Diffstat (limited to 'components/visitedlink')
-rw-r--r--components/visitedlink/test/visitedlink_unittest.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
index 747c128..9ced29a 100644
--- a/components/visitedlink/test/visitedlink_unittest.cc
+++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -26,6 +26,7 @@
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_renderer_host.h"
+#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -59,7 +60,6 @@ class TestVisitedLinkDelegate : public VisitedLinkDelegate {
void AddURLForRebuild(const GURL& url);
private:
-
URLs rebuild_urls_;
};
@@ -159,7 +159,7 @@ class VisitedLinkTest : public testing::Test {
master_.reset(NULL);
// Wait for all pending file I/O to be completed.
- BrowserThread::GetBlockingPool()->FlushForTesting();
+ content::RunAllBlockingPoolTasksUntilIdle();
}
// Loads the database from disk and makes sure that the same URLs are present
@@ -585,7 +585,6 @@ class VisitedLinkRenderProcessHostFactory
}
private:
-
DISALLOW_COPY_AND_ASSIGN(VisitedLinkRenderProcessHostFactory);
};
@@ -766,7 +765,6 @@ TEST_F(VisitedLinkEventsTest, IgnoreRendererCreationFromDifferentContext) {
WaitForCoalescense();
EXPECT_EQ(0, different_context.new_table_count());
-
}
} // namespace visitedlink