summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 22:51:32 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 22:51:32 +0000
commita9435b43a24463d66f53ae232ff368b8a9b372a5 (patch)
tree6feeb74b279852cb1e4bb8cb39e2257ba8a68b91 /chrome/test/ui
parent531c465360632dacf221bb252df1eca6035b9047 (diff)
downloadchromium_src-a9435b43a24463d66f53ae232ff368b8a9b372a5.zip
chromium_src-a9435b43a24463d66f53ae232ff368b8a9b372a5.tar.gz
chromium_src-a9435b43a24463d66f53ae232ff368b8a9b372a5.tar.bz2
Only copy the plugin if it doesn't already exist.
CopyDirectory fails only on windows in this case. Not sure how it passed the try bots. TBR=stuartmorgan Review URL: http://codereview.chromium.org/2856088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/npapi_test_helper.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/test/ui/npapi_test_helper.cc b/chrome/test/ui/npapi_test_helper.cc
index 142539c..f8cc827 100644
--- a/chrome/test/ui/npapi_test_helper.cc
+++ b/chrome/test/ui/npapi_test_helper.cc
@@ -45,9 +45,11 @@ void NPAPITesterBase::SetUp() {
test_plugin_path_ = plugins_directory.AppendASCII(test_plugin_name_);
file_util::CreateDirectory(plugins_directory);
- ASSERT_TRUE(file_util::CopyDirectory(plugin_src, test_plugin_path_, true))
- << "Copy failed from " << plugin_src.value()
- << " to " << test_plugin_path_.value();
+ 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_MACOSX)
// The plugins directory isn't read by default on the Mac, so it needs to be
// explicitly registered.