summaryrefslogtreecommitdiffstats
path: root/content/test
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 04:55:43 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-07 04:55:43 +0000
commitf8501b105e8bb71fd779ea8b5a867e2c7e7b2a7d (patch)
treee0e533b9a96ea10d0c6dd564669b0070c87fe4fc /content/test
parent865eabbaeb9a4fa6cfcd7f7c0c49235f7b6ecd6c (diff)
downloadchromium_src-f8501b105e8bb71fd779ea8b5a867e2c7e7b2a7d.zip
chromium_src-f8501b105e8bb71fd779ea8b5a867e2c7e7b2a7d.tar.gz
chromium_src-f8501b105e8bb71fd779ea8b5a867e2c7e7b2a7d.tar.bz2
Browser Plugin: Use asynchronous input events
Currently, if the guest is unresponsive, we kill the guest and return control back to the embedder. This approach switches to asynchronous input events. The guest always swallows input events. This CL also introduces 'unresponsive' and 'responsive' events. BUG=149063, 153542 Test=BrowserPluginHostTest.GuestHung Review URL: https://chromiumcodereview.appspot.com/11400002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test')
-rw-r--r--content/test/data/browser_plugin_embedder_crash.html17
-rw-r--r--content/test/data/browser_plugin_embedder_guest_unresponsive.html28
2 files changed, 28 insertions, 17 deletions
diff --git a/content/test/data/browser_plugin_embedder_crash.html b/content/test/data/browser_plugin_embedder_crash.html
deleted file mode 100644
index fa425d4..0000000
--- a/content/test/data/browser_plugin_embedder_crash.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<script type="text/javascript">
-function SetSrc(src) {
- plugin = document.getElementById('plugin');
- plugin.src = src;
-}
-function SetSize(w, h) {
- plugin = document.getElementById('plugin');
- plugin.width = w;
- plugin.height = h;
-}
-</script>
-
-<!-- The plugin size is same as the browser's size -->
-<object id="plugin"
- tabindex="0"
- type="application/browser-plugin"
- style="height: 100%; width: 100%; border: 0px"></object>
diff --git a/content/test/data/browser_plugin_embedder_guest_unresponsive.html b/content/test/data/browser_plugin_embedder_guest_unresponsive.html
new file mode 100644
index 0000000..734878c
--- /dev/null
+++ b/content/test/data/browser_plugin_embedder_guest_unresponsive.html
@@ -0,0 +1,28 @@
+<script type="text/javascript">
+var unresponsiveCalled = false;
+var responsiveCalled = false;
+function SetSrc(src) {
+ plugin = document.getElementById('plugin');
+ plugin.src = src;
+}
+function GuestUnresponsive(evt) {
+ unresponsiveCalled = true;
+}
+
+function GuestResponsive(evt) {
+ responsiveCalled = true;
+ document.title = "done";
+}
+</script>
+
+<!-- The plugin size is same as the browser's size -->
+<object id="plugin"
+ tabindex="0"
+ type="application/browser-plugin"
+ style="height: 100%; width: 100%; border: 0px"></object>
+
+<script>
+ var plugin = document.getElementById('plugin');
+ plugin.addEventListener('-internal-unresponsive', GuestUnresponsive);
+ plugin.addEventListener('-internal-responsive', GuestResponsive);
+</script>