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

Side by Side Diff: chrome/test/ui/npapi_test_helper.cc

Issue 7806020: Add DeletePluginInDeallocate UI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct Copyright header. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/npapi/plugin_delete_in_deallocate.html ('k') | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/ui/npapi_test_helper.h" 5 #include "chrome/test/ui/npapi_test_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/test/test_file_util.h" 8 #include "base/test/test_file_util.h"
9 #include "chrome/common/chrome_constants.h" 9 #include "chrome/common/chrome_constants.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "webkit/plugins/npapi/plugin_list.h" 11 #include "webkit/plugins/npapi/plugin_list.h"
12 12
13 namespace npapi_test { 13 namespace npapi_test {
14 const char kTestCompleteCookie[] = "status"; 14 const char kTestCompleteCookie[] = "status";
15 const char kTestCompleteSuccess[] = "OK"; 15 const char kTestCompleteSuccess[] = "OK";
16 } // namespace npapi_test. 16 } // namespace npapi_test.
17 17
18 NPAPITesterBase::NPAPITesterBase() { 18 NPAPITesterBase::NPAPITesterBase() {
19 // Some NPAPI tests schedule garbage collection to force object tear-down.
20 launch_arguments_.AppendSwitchASCII(switches::kJavaScriptFlags,
21 "--expose_gc");
19 } 22 }
20 23
21 void NPAPITesterBase::SetUp() { 24 void NPAPITesterBase::SetUp() {
22 #if defined(OS_MACOSX) 25 #if defined(OS_MACOSX)
23 // The plugins directory isn't read by default on the Mac, so it needs to be 26 // The plugins directory isn't read by default on the Mac, so it needs to be
24 // explicitly registered. 27 // explicitly registered.
25 launch_arguments_.AppendSwitchPath(switches::kExtraPluginDir, 28 launch_arguments_.AppendSwitchPath(switches::kExtraPluginDir,
26 GetPluginsDirectory()); 29 GetPluginsDirectory());
27 #endif 30 #endif
28 31
29 UITest::SetUp(); 32 UITest::SetUp();
30 } 33 }
31 34
32 FilePath NPAPITesterBase::GetPluginsDirectory() { 35 FilePath NPAPITesterBase::GetPluginsDirectory() {
33 FilePath plugins_directory = browser_directory_.AppendASCII("plugins"); 36 FilePath plugins_directory = browser_directory_.AppendASCII("plugins");
34 return plugins_directory; 37 return plugins_directory;
35 } 38 }
36 39
37 // NPAPIVisiblePluginTester members. 40 // NPAPIVisiblePluginTester members.
38 void NPAPIVisiblePluginTester::SetUp() { 41 void NPAPIVisiblePluginTester::SetUp() {
39 show_window_ = true; 42 show_window_ = true;
40 NPAPITesterBase::SetUp(); 43 NPAPITesterBase::SetUp();
41 } 44 }
42 45
43 // NPAPIIncognitoTester members. 46 // NPAPIIncognitoTester members.
44 void NPAPIIncognitoTester::SetUp() { 47 void NPAPIIncognitoTester::SetUp() {
45 launch_arguments_.AppendSwitch(switches::kIncognito); 48 launch_arguments_.AppendSwitch(switches::kIncognito);
46 NPAPITesterBase::SetUp(); 49 NPAPITesterBase::SetUp();
47 } 50 }
OLDNEW
« no previous file with comments | « chrome/test/data/npapi/plugin_delete_in_deallocate.html ('k') | chrome/test/ui/npapi_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698