summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 18:00:19 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 18:00:19 +0000
commitaacd6561b7eacd2743a6be0d429f9230cdf85554 (patch)
treebf1c03553874d43b267545b4378f3270400c71b5
parente3ebba0fbbfb2c7eec286a964717859aa70b9fcf (diff)
downloadchromium_src-aacd6561b7eacd2743a6be0d429f9230cdf85554.zip
chromium_src-aacd6561b7eacd2743a6be0d429f9230cdf85554.tar.gz
chromium_src-aacd6561b7eacd2743a6be0d429f9230cdf85554.tar.bz2
Better fix for Windows test failure. Delete the old file
before trying to copy the plugin files over. Review URL: http://codereview.chromium.org/3052041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55096 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/ui/npapi_test_helper.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/test/ui/npapi_test_helper.cc b/chrome/test/ui/npapi_test_helper.cc
index f8cc827..d5a2143 100644
--- a/chrome/test/ui/npapi_test_helper.cc
+++ b/chrome/test/ui/npapi_test_helper.cc
@@ -45,11 +45,13 @@ void NPAPITesterBase::SetUp() {
test_plugin_path_ = plugins_directory.AppendASCII(test_plugin_name_);
file_util::CreateDirectory(plugins_directory);
- if (!file_util::PathExists(test_plugin_path_)) {
- ASSERT_TRUE(file_util::CopyDirectory(plugin_src, test_plugin_path_, true))
- << "Copy failed from " << plugin_src.value()
- << " to " << test_plugin_path_.value();
- }
+#if defined(OS_WIN)
+ file_util::DieFileDie(test_plugin_path_, false);
+#endif
+ ASSERT_TRUE(file_util::CopyDirectory(plugin_src, test_plugin_path_, true))
+ << "Copy failed from " << plugin_src.value()
+ << " to " << test_plugin_path_.value();
+
#if defined(OS_MACOSX)
// The plugins directory isn't read by default on the Mac, so it needs to be
// explicitly registered.