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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc

Issue 2129083002: Explicitly check various sync_file_system classes live on the IO thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests, remove unneeded check Created 4 years, 5 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
Index: chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
index 8b1d453516e8dd6279ab1516df28285036fff660..d043dbe8adfe8d9931d3ecbcbcbb7d71a493d40d 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_status_unittest.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/sync_file_system/local/local_file_sync_status.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -27,7 +28,16 @@ FileSystemURL URL(const char* spec) {
} // namespace
-TEST(LocalFileSyncStatusTest, WritingSimple) {
+class LocalFileSyncStatusTest : public testing::Test {
+ public:
+ LocalFileSyncStatusTest()
+ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+
+ private:
+ content::TestBrowserThreadBundle thread_bundle_;
+};
+
+TEST_F(LocalFileSyncStatusTest, WritingSimple) {
LocalFileSyncStatus status;
status.StartWriting(URL(kFile));
@@ -61,7 +71,7 @@ TEST(LocalFileSyncStatusTest, WritingSimple) {
EXPECT_FALSE(status.IsWriting(URL(kChild)));
}
-TEST(LocalFileSyncStatusTest, SyncingSimple) {
+TEST_F(LocalFileSyncStatusTest, SyncingSimple) {
LocalFileSyncStatus status;
status.StartSyncing(URL(kFile));
@@ -86,7 +96,7 @@ TEST(LocalFileSyncStatusTest, SyncingSimple) {
EXPECT_TRUE(status.IsWritable(URL(kChild)));
}
-TEST(LocalFileSyncStatusTest, WritingOnPathsWithPeriod) {
+TEST_F(LocalFileSyncStatusTest, WritingOnPathsWithPeriod) {
LocalFileSyncStatus status;
status.StartWriting(URL(kParent));
@@ -100,7 +110,7 @@ TEST(LocalFileSyncStatusTest, WritingOnPathsWithPeriod) {
EXPECT_TRUE(status.IsChildOrParentWriting(URL(kParent)));
}
-TEST(LocalFileSyncStatusTest, SyncingOnPathsWithPeriod) {
+TEST_F(LocalFileSyncStatusTest, SyncingOnPathsWithPeriod) {
LocalFileSyncStatus status;
status.StartSyncing(URL(kParent));

Powered by Google App Engine
This is Rietveld 408576698