Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/plugins/enabledPlugin-after-iframe-detached.html |
| diff --git a/third_party/WebKit/LayoutTests/plugins/enabledPlugin-after-iframe-detached.html b/third_party/WebKit/LayoutTests/plugins/enabledPlugin-after-iframe-detached.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..881aab2d122e773f0566689bcac639137ea2e240 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/plugins/enabledPlugin-after-iframe-detached.html |
| @@ -0,0 +1,23 @@ |
| +<!doctype html> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<div id='d'> |
| +<iframe id='test-plugin-iframe-id' src="resources/x-blink-test-plugin-iframe.html"></iframe> |
|
dominicc (has gone to gerrit)
2016/08/30 02:46:28
Be consistent about types of quotes for attributes
|
| +</div> |
| +<script> |
| +async_test(function(t) |
|
dominicc (has gone to gerrit)
2016/08/30 02:46:28
Consider using arrow functions; they're slightly m
|
| +{ |
| + var mimeType; |
| + document.getElementById('test-plugin-iframe-id').onload = t.step_func(function() |
| + { |
|
dominicc (has gone to gerrit)
2016/08/30 02:46:28
Put { on the previous line. A bit of Blink C++ sty
|
| + mimeType = navigator.mimeTypes['application/x-blink-test-plugin']; |
| + assert_equals(mimeType.enabledPlugin.name, 'Blink Test Plugin'); |
| + document.getElementById("d").innerHTML = ""; |
|
dominicc (has gone to gerrit)
2016/08/30 02:46:28
Be consistent with single and double quotes for st
|
| + setTimeout(t.step_func(function() { |
| + assert_equals(mimeType.enabledPlugin.name, 'Blink Test Plugin'); |
| + t.done(); |
| + }, 50)); |
|
dominicc (has gone to gerrit)
2016/08/30 02:46:28
Is there an event you can listen for, instead of a
Anton Obzhirov
2016/09/01 10:46:37
Yes, it is just to get out of this loop iteration.
|
| + }); |
| +}, "Test enabledPlugin after iframe with the plugin is detached."); |
| +</script> |
| + |