summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/npapi/get_javascript_open_popup_with_plugin.html27
-rw-r--r--chrome/test/data/npapi/popup_window_with_target_plugin.html27
-rw-r--r--chrome/test/ui/npapi_uitest.cpp9
3 files changed, 63 insertions, 0 deletions
diff --git a/chrome/test/data/npapi/get_javascript_open_popup_with_plugin.html b/chrome/test/data/npapi/get_javascript_open_popup_with_plugin.html
new file mode 100644
index 0000000..8f2f01a
--- /dev/null
+++ b/chrome/test/data/npapi/get_javascript_open_popup_with_plugin.html
@@ -0,0 +1,27 @@
+<html>
+
+<head>
+<script src="npapi.js"></script>
+</head>
+
+
+<body>
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+Test running....
+</div>
+
+
+Open Popup window with plugin Test<p>
+This test instantiates a plugin which executes the window.open call to open a popup <br />
+window with a windowed plugin instance. The test verifies that the plugin instance in <br />
+the popup window always has a valid parent window. <br />
+
+<embed type="application/vnd.npapi-test"
+ src="foo"
+ name="plugin_javascript_open_popup_with_plugin"
+ id="1"
+ mode="np_embed"
+>
+
+</body>
+</html>
diff --git a/chrome/test/data/npapi/popup_window_with_target_plugin.html b/chrome/test/data/npapi/popup_window_with_target_plugin.html
new file mode 100644
index 0000000..5f203bd
--- /dev/null
+++ b/chrome/test/data/npapi/popup_window_with_target_plugin.html
@@ -0,0 +1,27 @@
+<html>
+
+<head>
+<script src="npapi.js"></script>
+</head>
+
+
+<body>
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
+Test running....
+</div>
+
+
+Open Popup window with plugin Test<p>
+This test instantiates a plugin which executes the window.open call to open a popup <br />
+window with a windowed plugin instance. The test verifies that the plugin instance in <br />
+the popup window always has a valid parent window.<br />
+
+<embed type="application/vnd.npapi-test"
+ src="foo"
+ name="plugin_popup_with_plugin_target"
+ id="1"
+ mode="np_embed"
+>
+
+</body>
+</html>
diff --git a/chrome/test/ui/npapi_uitest.cpp b/chrome/test/ui/npapi_uitest.cpp
index 525e48e..bce1497 100644
--- a/chrome/test/ui/npapi_uitest.cpp
+++ b/chrome/test/ui/npapi_uitest.cpp
@@ -270,4 +270,13 @@ TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) {
kTestCompleteCookie, kTestCompleteSuccess,
kShortWaitTimeout);
}
+}
+
+TEST_F(NPAPIVisiblePluginTester, OpenPopupWindowWithPlugin) {
+ GURL url = GetTestUrl(L"npapi",
+ L"get_javascript_open_popup_with_plugin.html");
+ NavigateToURL(url);
+ WaitForFinish("plugin_popup_with_plugin_target", "1", url,
+ kTestCompleteCookie, kTestCompleteSuccess,
+ kShortWaitTimeout);
} \ No newline at end of file