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 |
11 #include "chrome/test/ui/npapi_test_helper.h" | 11 #include "chrome/test/ui/npapi_test_helper.h" |
12 | 12 |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/test/test_file_util.h" | 14 #include "base/test/test_file_util.h" |
15 #include "chrome/common/chrome_constants.h" | 15 #include "chrome/common/chrome_constants.h" |
16 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
17 | 17 |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 static const char kNpapiTestPluginName[] = "npapi_test_plugin.dll"; | 19 static const char kNpapiTestPluginName[] = "npapi_test_plugin.dll"; |
20 static const char kPepperTestPluginName[] = "pepper_test_plugin.dll"; | |
21 #elif defined(OS_MACOSX) | 20 #elif defined(OS_MACOSX) |
22 static const char kNpapiTestPluginName[] = "npapi_test_plugin.plugin"; | 21 static const char kNpapiTestPluginName[] = "npapi_test_plugin.plugin"; |
23 static const char kPepperTestPluginName[] = "PepperTestPlugin.plugin"; | |
24 static const char kLayoutPluginName[] = "TestNetscapePlugIn.plugin"; | 22 static const char kLayoutPluginName[] = "TestNetscapePlugIn.plugin"; |
25 #elif defined(OS_LINUX) | 23 #elif defined(OS_LINUX) |
26 static const char kNpapiTestPluginName[] = "libnpapi_test_plugin.so"; | 24 static const char kNpapiTestPluginName[] = "libnpapi_test_plugin.so"; |
27 static const char kPepperTestPluginName[] = "libpepper_test_plugin.so"; | |
28 #endif | 25 #endif |
29 | 26 |
| 27 namespace npapi_test { |
| 28 const char kTestCompleteCookie[] = "status"; |
| 29 const char kTestCompleteSuccess[] = "OK"; |
| 30 } // namespace npapi_test. |
| 31 |
30 NPAPITesterBase::NPAPITesterBase(const std::string& test_plugin_name) | 32 NPAPITesterBase::NPAPITesterBase(const std::string& test_plugin_name) |
31 : test_plugin_name_(test_plugin_name) { | 33 : test_plugin_name_(test_plugin_name) { |
32 } | 34 } |
33 | 35 |
34 void NPAPITesterBase::SetUp() { | 36 void NPAPITesterBase::SetUp() { |
35 // We need to copy our test-plugin into the plugins directory so that | 37 // We need to copy our test-plugin into the plugins directory so that |
36 // the browser can load it. | 38 // the browser can load it. |
37 FilePath plugins_directory = GetPluginsDirectory(); | 39 FilePath plugins_directory = GetPluginsDirectory(); |
38 FilePath plugin_src = browser_directory_.AppendASCII(test_plugin_name_); | 40 FilePath plugin_src = browser_directory_.AppendASCII(test_plugin_name_); |
39 ASSERT_TRUE(file_util::PathExists(plugin_src)); | 41 ASSERT_TRUE(file_util::PathExists(plugin_src)); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void NPAPIVisiblePluginTester::SetUp() { | 100 void NPAPIVisiblePluginTester::SetUp() { |
99 show_window_ = true; | 101 show_window_ = true; |
100 NPAPITester::SetUp(); | 102 NPAPITester::SetUp(); |
101 } | 103 } |
102 | 104 |
103 // NPAPIIncognitoTester members. | 105 // NPAPIIncognitoTester members. |
104 void NPAPIIncognitoTester::SetUp() { | 106 void NPAPIIncognitoTester::SetUp() { |
105 launch_arguments_.AppendSwitch(switches::kIncognito); | 107 launch_arguments_.AppendSwitch(switches::kIncognito); |
106 NPAPITester::SetUp(); | 108 NPAPITester::SetUp(); |
107 } | 109 } |
108 | |
109 PepperTester::PepperTester() : NPAPITesterBase(kPepperTestPluginName) { | |
110 } | |
111 | |
112 void PepperTester::SetUp() { | |
113 // TODO(alokp): Add command-line arguments | |
114 // --no-sandbox --internal-pepper --enable-gpu-plugin | |
115 NPAPITesterBase::SetUp(); | |
116 } | |
OLD | NEW |