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

Unified Diff: third_party/WebKit/LayoutTests/plugins/enabledPlugin-after-iframe-detached.html

Issue 2157883002: Cache the mimeTypes and plugins DOM objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added new layout test, both tests use testharness.js. Created 4 years, 4 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: 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>
+

Powered by Google App Engine
This is Rietveld 408576698