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

Unified Diff: chrome/browser/chromeos/drive/file_system_util_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 8 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/chromeos/drive/file_system_util_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system_util_unittest.cc b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
index 500ac524c5fd9f756602bed1b48f31baf6813372..7bbbe0a0de5bad20292263779fb23087dc84fe98 100644
--- a/chrome/browser/chromeos/drive/file_system_util_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_util_unittest.cc
@@ -9,7 +9,6 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/test/base/testing_browser_process.h"
@@ -77,7 +76,11 @@ TEST_F(ProfileRelatedFileSystemUtilTest, ExtractProfileFromPath) {
base::FilePath::FromUTF8Unsafe("/special/non-drive-path")));
}
-TEST(FileSystemUtilTest, IsUnderDriveMountPoint) {
+class FileSystemUtilTest : public testing::Test {
+ content::TestBrowserThreadBundle thread_bundle_;
+};
+
+TEST_F(FileSystemUtilTest, IsUnderDriveMountPoint) {
EXPECT_FALSE(IsUnderDriveMountPoint(
base::FilePath::FromUTF8Unsafe("/wherever/foo.txt")));
EXPECT_FALSE(IsUnderDriveMountPoint(
@@ -95,7 +98,7 @@ TEST(FileSystemUtilTest, IsUnderDriveMountPoint) {
base::FilePath::FromUTF8Unsafe("/special/drive-xxx/foo.txt")));
}
-TEST(FileSystemUtilTest, ExtractDrivePath) {
+TEST_F(FileSystemUtilTest, ExtractDrivePath) {
EXPECT_EQ(base::FilePath(),
ExtractDrivePath(
base::FilePath::FromUTF8Unsafe("/wherever/foo.txt")));
@@ -117,14 +120,13 @@ TEST(FileSystemUtilTest, ExtractDrivePath) {
base::FilePath::FromUTF8Unsafe("/special/drive-xxx/foo.txt")));
}
-TEST(FileSystemUtilTest, ExtractDrivePathFromFileSystemUrl) {
+TEST_F(FileSystemUtilTest, ExtractDrivePathFromFileSystemUrl) {
TestingProfile profile;
// Set up file system context for testing.
base::ScopedTempDir temp_dir_;
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- base::MessageLoop message_loop;
scoped_refptr<storage::ExternalMountPoints> mount_points =
storage::ExternalMountPoints::CreateRefCounted();
scoped_refptr<storage::FileSystemContext> context(
@@ -188,7 +190,7 @@ TEST(FileSystemUtilTest, ExtractDrivePathFromFileSystemUrl) {
isolated_id + "/" + isolated_name))));
}
-TEST(FileSystemUtilTest, EscapeUnescapeCacheFileName) {
+TEST_F(FileSystemUtilTest, EscapeUnescapeCacheFileName) {
const std::string kUnescapedFileName(
"tmp:`~!@#$%^&*()-_=+[{|]}\\\\;\',<.>/?");
const std::string kEscapedFileName(
@@ -197,7 +199,7 @@ TEST(FileSystemUtilTest, EscapeUnescapeCacheFileName) {
EXPECT_EQ(kUnescapedFileName, UnescapeCacheFileName(kEscapedFileName));
}
-TEST(FileSystemUtilTest, NormalizeFileName) {
+TEST_F(FileSystemUtilTest, NormalizeFileName) {
EXPECT_EQ("", NormalizeFileName(""));
EXPECT_EQ("foo", NormalizeFileName("foo"));
// Slash
@@ -213,14 +215,14 @@ TEST(FileSystemUtilTest, NormalizeFileName) {
EXPECT_EQ("._", NormalizeFileName("./"));
}
-TEST(FileSystemUtilTest, GetCacheRootPath) {
+TEST_F(FileSystemUtilTest, GetCacheRootPath) {
TestingProfile profile;
base::FilePath profile_path = profile.GetPath();
EXPECT_EQ(profile_path.AppendASCII("GCache/v1"),
util::GetCacheRootPath(&profile));
}
-TEST(FileSystemUtilTest, GDocFile) {
+TEST_F(FileSystemUtilTest, GDocFile) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());

Powered by Google App Engine
This is Rietveld 408576698