OLD | NEW |
1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 7 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
8 // Use of this source code is governed by a BSD-style license that can be | 8 // Use of this source code is governed by a BSD-style license that can be |
9 // found in the LICENSE file. | 9 // found in the LICENSE file. |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // We need to copy our test-plugin into the plugins directory so that | 38 // We need to copy our test-plugin into the plugins directory so that |
39 // the browser can load it. | 39 // the browser can load it. |
40 // TODO(tc): We should copy the plugins as a build step, not during | 40 // TODO(tc): We should copy the plugins as a build step, not during |
41 // the tests. Then we don't have to clean up after the copy in the test. | 41 // the tests. Then we don't have to clean up after the copy in the test. |
42 FilePath plugins_directory = GetPluginsDirectory(); | 42 FilePath plugins_directory = GetPluginsDirectory(); |
43 FilePath plugin_src = browser_directory_.AppendASCII(test_plugin_name_); | 43 FilePath plugin_src = browser_directory_.AppendASCII(test_plugin_name_); |
44 ASSERT_TRUE(file_util::PathExists(plugin_src)); | 44 ASSERT_TRUE(file_util::PathExists(plugin_src)); |
45 test_plugin_path_ = plugins_directory.AppendASCII(test_plugin_name_); | 45 test_plugin_path_ = plugins_directory.AppendASCII(test_plugin_name_); |
46 | 46 |
47 file_util::CreateDirectory(plugins_directory); | 47 file_util::CreateDirectory(plugins_directory); |
48 if (!file_util::PathExists(test_plugin_path_)) { | 48 #if defined(OS_WIN) |
49 ASSERT_TRUE(file_util::CopyDirectory(plugin_src, test_plugin_path_, true)) | 49 file_util::DieFileDie(test_plugin_path_, false); |
50 << "Copy failed from " << plugin_src.value() | 50 #endif |
51 << " to " << test_plugin_path_.value(); | 51 ASSERT_TRUE(file_util::CopyDirectory(plugin_src, test_plugin_path_, true)) |
52 } | 52 << "Copy failed from " << plugin_src.value() |
| 53 << " to " << test_plugin_path_.value(); |
| 54 |
53 #if defined(OS_MACOSX) | 55 #if defined(OS_MACOSX) |
54 // The plugins directory isn't read by default on the Mac, so it needs to be | 56 // The plugins directory isn't read by default on the Mac, so it needs to be |
55 // explicitly registered. | 57 // explicitly registered. |
56 launch_arguments_.AppendSwitchPath(switches::kExtraPluginDir, | 58 launch_arguments_.AppendSwitchPath(switches::kExtraPluginDir, |
57 plugins_directory); | 59 plugins_directory); |
58 #endif | 60 #endif |
59 | 61 |
60 UITest::SetUp(); | 62 UITest::SetUp(); |
61 } | 63 } |
62 | 64 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 void NPAPIVisiblePluginTester::SetUp() { | 102 void NPAPIVisiblePluginTester::SetUp() { |
101 show_window_ = true; | 103 show_window_ = true; |
102 NPAPITester::SetUp(); | 104 NPAPITester::SetUp(); |
103 } | 105 } |
104 | 106 |
105 // NPAPIIncognitoTester members. | 107 // NPAPIIncognitoTester members. |
106 void NPAPIIncognitoTester::SetUp() { | 108 void NPAPIIncognitoTester::SetUp() { |
107 launch_arguments_.AppendSwitch(switches::kIncognito); | 109 launch_arguments_.AppendSwitch(switches::kIncognito); |
108 NPAPITester::SetUp(); | 110 NPAPITester::SetUp(); |
109 } | 111 } |
OLD | NEW |