summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/test/plugin_javascript_open_popup.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-29 17:14:53 +0100
committerBen Murdoch <benm@google.com>2010-08-04 14:29:45 +0100
commitc407dc5cd9bdc5668497f21b26b09d988ab439de (patch)
tree7eaf8707c0309516bdb042ad976feedaf72b0bb1 /webkit/glue/plugins/test/plugin_javascript_open_popup.h
parent0998b1cdac5733f299c12d88bc31ef9c8035b8fa (diff)
downloadexternal_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.zip
external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.gz
external_chromium-c407dc5cd9bdc5668497f21b26b09d988ab439de.tar.bz2
Merge Chromium src@r53293
Change-Id: Ia79acf8670f385cee48c45b0a75371d8e950af34
Diffstat (limited to 'webkit/glue/plugins/test/plugin_javascript_open_popup.h')
-rw-r--r--webkit/glue/plugins/test/plugin_javascript_open_popup.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/webkit/glue/plugins/test/plugin_javascript_open_popup.h b/webkit/glue/plugins/test/plugin_javascript_open_popup.h
new file mode 100644
index 0000000..552397a
--- /dev/null
+++ b/webkit/glue/plugins/test/plugin_javascript_open_popup.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2006-2008 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_JAVASCRIPT_OPEN_POPUP_H
+#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H
+
+#include "webkit/glue/plugins/test/plugin_test.h"
+
+namespace NPAPIClient {
+
+// This class tests the case where a windowed plugin instance is
+// instantiated in a popup window. The plugin instance needs to
+// have a valid parent window.
+class ExecuteJavascriptOpenPopupWithPluginTest : public PluginTest {
+ public:
+ // Constructor.
+ ExecuteJavascriptOpenPopupWithPluginTest(
+ NPP id, NPNetscapeFuncs *host_functions);
+ // NPAPI SetWindow handler.
+ virtual NPError SetWindow(NPWindow* window);
+
+ private:
+ bool popup_window_test_started_;
+};
+
+// This class represents a windowed plugin instance instantiated within a
+// popup window. It verifies that the plugin instance has a valid parent.
+class ExecuteJavascriptPopupWindowTargetPluginTest : public PluginTest {
+ public:
+ ExecuteJavascriptPopupWindowTargetPluginTest(
+ NPP id, NPNetscapeFuncs *host_functions);
+ // NPAPI SetWindow handler.
+ virtual NPError SetWindow(NPWindow* window);
+
+ private:
+ // Do a platform-specific validation of the passed-in |window|.
+ // E.g. on Windows, verifies window->window is a reasonable HWND.
+ // Returns true if the test should be marked complete.
+ bool CheckWindow(NPWindow* window);
+
+ bool test_completed_;
+};
+
+} // namespace NPAPIClient
+
+#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H