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

Side by Side Diff: chrome/renderer/resources/plugins/plugin_poster.html

Issue 1412963003: Plugin Power Saver: Implement pixel tests for plugin placeholders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/test/base/test_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, user-scalable=no"> 5 <meta name="viewport" content="width=device-width, user-scalable=no">
6 <script> 6 <script>
7 window.onload = function() { 7 window.onload = function() {
8 if (plugin.didFinishLoading) 8 if (plugin.didFinishLoading)
9 plugin.didFinishLoading(); 9 plugin.didFinishLoading();
10 }; 10 };
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 document.getElementById('outer').onclick = function() { 84 document.getElementById('outer').onclick = function() {
85 plugin.load(); 85 plugin.load();
86 }; 86 };
87 87
88 window.resizePoster = function(marginLeft, marginTop, width, height) { 88 window.resizePoster = function(marginLeft, marginTop, width, height) {
89 var container = document.getElementById('inner-container'); 89 var container = document.getElementById('inner-container');
90 container.style.marginLeft = marginLeft; 90 container.style.marginLeft = marginLeft;
91 container.style.marginTop = marginTop; 91 container.style.marginTop = marginTop;
92 container.style.width = width; 92 container.style.width = width;
93 container.style.height = height; 93 container.style.height = height;
94
95 if (plugin.didFinishIconRepositionForTesting) {
96 // Defer until reflow complete.
97 window.setTimeout(function() {
98 plugin.didFinishIconRepositionForTesting();
99 });
100 }
94 }; 101 };
95 </script> 102 </script>
96 </body> 103 </body>
97 </html> 104 </html>
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/test/base/test_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698