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

Unified Diff: chrome/test/data/load_npapi_plugin.html

Issue 645203002: Block NPAPI plugins by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing test file Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/load_npapi_plugin.html
diff --git a/chrome/test/data/load_npapi_plugin.html b/chrome/test/data/load_npapi_plugin.html
new file mode 100644
index 0000000000000000000000000000000000000000..beac14f4a0f8374a7a25cb68101042d5e9e649c3
--- /dev/null
+++ b/chrome/test/data/load_npapi_plugin.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<title>Initial Title</title>
+<script>
+function PluginCreated() {
+ document.title = "Loaded";
+}
+
+function injectPlugin() {
+ var child = document.createElement('div');
+ child.innerHTML = '<embed type="application/vnd.npapi-test" src="foo" name="invoke_js_function_on_create" id="plugin" mode="np_embed"></embed>';
+ document.getElementById('content').appendChild(child);
+}
+
+function notloaded() {
+ document.title = "Not Loaded";
+}
+
+function OnLoad() {
+ setTimeout(function(){injectPlugin()}, 1000);
+ setTimeout(function(){notloaded()}, 2000);
jam 2014/10/16 22:10:57 this seems flaky? what if it takes the plugin proc
Will Harris 2014/10/17 18:57:08 I changed this to call into the plugin directly us
+}
+</script>
+</head>
+<body onload='OnLoad();'>
+<div id='content'></div>
+</embed>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698