summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 12:28:22 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-25 12:28:22 +0000
commit4da06efd6d467e07ac311a59e5f79bd0cc6145d4 (patch)
tree711d378acbaa00035c56f2f6af82f09e3a301d71 /webkit/glue/plugins
parent506398ae0dcffa9677ba4c08fd27ce4cf141426d (diff)
downloadchromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.zip
chromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.tar.gz
chromium_src-4da06efd6d467e07ac311a59e5f79bd0cc6145d4.tar.bz2
Add UI test for click-to-play.
BUG=57277 TEST=NPAPIVisiblePluginTester.ClickToPlay:ClickToPlayPluginTest.* Review URL: http://codereview.chromium.org/3539002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r--webkit/glue/plugins/test/plugin_setup_test.cc22
-rw-r--r--webkit/glue/plugins/test/plugin_setup_test.h24
-rw-r--r--webkit/glue/plugins/test/plugin_test_factory.cc4
3 files changed, 50 insertions, 0 deletions
diff --git a/webkit/glue/plugins/test/plugin_setup_test.cc b/webkit/glue/plugins/test/plugin_setup_test.cc
new file mode 100644
index 0000000..e4c4903
--- /dev/null
+++ b/webkit/glue/plugins/test/plugin_setup_test.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/basictypes.h"
+#include "base/string_util.h"
+
+#include "webkit/glue/plugins/test/plugin_setup_test.h"
+
+namespace NPAPIClient {
+
+PluginSetupTest::PluginSetupTest(NPP id, NPNetscapeFuncs *host_functions)
+ : PluginTest(id, host_functions) {
+}
+
+NPError PluginSetupTest::SetWindow(NPWindow* pNPWindow) {
+ this->SignalTestCompleted();
+
+ return NPERR_NO_ERROR;
+}
+
+} // namespace NPAPIClient
diff --git a/webkit/glue/plugins/test/plugin_setup_test.h b/webkit/glue/plugins/test/plugin_setup_test.h
new file mode 100644
index 0000000..b01bc42
--- /dev/null
+++ b/webkit/glue/plugins/test/plugin_setup_test.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
+#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
+
+#include "webkit/glue/plugins/test/plugin_test.h"
+
+namespace NPAPIClient {
+
+// A very simple test that just sets up a new plug-in.
+class PluginSetupTest : public PluginTest {
+ public:
+ // Constructor.
+ PluginSetupTest(NPP id, NPNetscapeFuncs *host_functions);
+
+ // NPAPI SetWindow handler.
+ virtual NPError SetWindow(NPWindow* pNPWindow);
+};
+
+} // namespace NPAPIClient
+
+#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
diff --git a/webkit/glue/plugins/test/plugin_test_factory.cc b/webkit/glue/plugins/test/plugin_test_factory.cc
index 62a3977..ea9b290 100644
--- a/webkit/glue/plugins/test/plugin_test_factory.cc
+++ b/webkit/glue/plugins/test/plugin_test_factory.cc
@@ -15,6 +15,7 @@
#include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h"
#include "webkit/glue/plugins/test/plugin_private_test.h"
#include "webkit/glue/plugins/test/plugin_schedule_timer_test.h"
+#include "webkit/glue/plugins/test/plugin_setup_test.h"
#include "webkit/glue/plugins/test/plugin_thread_async_call_test.h"
#include "webkit/glue/plugins/test/plugin_window_size_test.h"
#if defined(OS_WIN)
@@ -91,6 +92,9 @@ PluginTest* CreatePluginTest(const std::string& test_name,
test_name == "invoke_js_function_on_create") {
new_test = new WindowedPluginTest(instance, host_functions);
#endif
+ } else if (test_name == "setup") {
+ // "plugin" is the name for plugin documents.
+ new_test = new PluginSetupTest(instance, host_functions);
}
return new_test;