summaryrefslogtreecommitdiffstats
path: root/base/file_util_unittest.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 01:19:57 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-31 01:19:57 +0000
commita92d2fd9d1fe0e74f6ca7d540858a4711b46367e (patch)
tree3ec4bb1ee681af04ee6757fa65e47b2abd5dff04 /base/file_util_unittest.cc
parent69b43bdc17d84729fca4e34595e51a88cec099af (diff)
downloadchromium_src-a92d2fd9d1fe0e74f6ca7d540858a4711b46367e.zip
chromium_src-a92d2fd9d1fe0e74f6ca7d540858a4711b46367e.tar.gz
chromium_src-a92d2fd9d1fe0e74f6ca7d540858a4711b46367e.tar.bz2
Make sure that Clipboard operations that require dispatching
of windows messages are performed on the UI thread. SetClipboardData requires the clipboard to be open with a handle to a window that will be notified when the contents are going to change again. If Windows messages are not processed, any other app writing to the clipboard will be locked while we acknowledge their request (by processing the message). The IO thread doesn't pump windows messages anymore so write clipboard operations cannot be performed from that thread and have to be posted to another thread. BUG=5823 Review URL: http://codereview.chromium.org/19733 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9003 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_unittest.cc')
-rw-r--r--base/file_util_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 8f5ce19..98c2032 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -984,7 +984,9 @@ TEST_F(FileUtilTest, Contains) {
data_dir = data_dir.Append(FILE_PATH_LITERAL("FilePathTest"));
// Create a fresh, empty copy of this directory.
- ASSERT_TRUE(file_util::Delete(data_dir, true));
+ if (file_util::PathExists(data_dir)) {
+ ASSERT_TRUE(file_util::Delete(data_dir, true));
+ }
ASSERT_TRUE(file_util::CreateDirectory(data_dir));
FilePath foo(data_dir.Append(FILE_PATH_LITERAL("foo")));