Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2391)

Unified Diff: cc/tiles/image_controller_unittest.cc

Issue 2749933002: cc: Fix a flake in ImageControllerTest.QueueImageDecodeChangeControllerWithTaskQueued (Closed)
Patch Set: threadcheckerimpl Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/image_controller_unittest.cc
diff --git a/cc/tiles/image_controller_unittest.cc b/cc/tiles/image_controller_unittest.cc
index 90b708f30471c8ad34f886d3e0f2e1cec0028686..ccd9066aad1fe9c263964ce5d817b2be4ffc25be 100644
--- a/cc/tiles/image_controller_unittest.cc
+++ b/cc/tiles/image_controller_unittest.cc
@@ -8,6 +8,7 @@
#include "base/run_loop.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/sequenced_task_runner_handle.h"
+#include "base/threading/thread_checker_impl.h"
#include "cc/test/skia_common.h"
#include "cc/tiles/image_decode_cache.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -212,7 +213,8 @@ class BlockingTask : public TileTask {
private:
~BlockingTask() override = default;
- base::ThreadChecker thread_checker_;
+ // Use ThreadCheckerImpl, so that release builds also get correct behavior.
+ base::ThreadCheckerImpl thread_checker_;
bool has_run_ = false;
base::Lock lock_;
base::ConditionVariable run_cv_;
@@ -222,8 +224,7 @@ class BlockingTask : public TileTask {
};
// For tests that exercise image controller's thread, this is the timeout value
-// to
-// allow the worker thread to do its work.
+// to allow the worker thread to do its work.
int kDefaultTimeoutSeconds = 10;
class ImageControllerTest : public testing::Test {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698