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

Side by Side Diff: PerformanceTests/Interactive/SelectAll.html

Issue 675983004: Allow performance tests to test full rendering performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: layoutOrFullyRender -> forceLayoutOrFullFrame Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | PerformanceTests/Interactive/resources/window-resize.js » ('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 <body> 3 <body>
4 <script src="../resources/runner.js"></script> 4 <script src="../resources/runner.js"></script>
5 <script> 5 <script>
6 6
7 PerfTestRunner.prepareToMeasureValuesAsync({ 7 PerfTestRunner.prepareToMeasureValuesAsync({
8 unit: 'ms', 8 unit: 'ms',
9 done: function () { 9 done: function () {
10 var iframe = document.querySelector('iframe'); 10 var iframe = document.querySelector('iframe');
11 iframe.parentNode.removeChild(iframe); 11 iframe.parentNode.removeChild(iframe);
12 } 12 }
13 }); 13 });
14 14
15 function runTest() { 15 function runTest() {
16 var iframe = document.querySelector('iframe'); 16 var iframe = document.querySelector('iframe');
17 iframe.contentWindow.getSelection().removeAllRanges(); 17 iframe.contentWindow.getSelection().removeAllRanges();
18 iframe.contentDocument.body.offsetTop; 18 PerfTestRunner.forceLayoutOrFullFrame(iframe.contentDocument);
19 19
20 setTimeout(function () { 20 setTimeout(function () {
21 var startTime = PerfTestRunner.now(); 21 var startTime = PerfTestRunner.now();
22 iframe.contentDocument.execCommand('SelectAll'); 22 iframe.contentDocument.execCommand('SelectAll');
23 iframe.contentDocument.body.offsetTop; 23 PerfTestRunner.forceLayoutOrFullFrame(iframe.contentDocument);
24 setTimeout(function () { 24 setTimeout(function () {
25 PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime); 25 PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime);
26 PerfTestRunner.gc(); 26 PerfTestRunner.gc();
27 setTimeout(runTest, 0); 27 setTimeout(runTest, 0);
28 }, 0); 28 }, 0);
29 }, 0); 29 }, 0);
30 } 30 }
31 31
32 </script> 32 </script>
33 <iframe src="../Parser/resources/html5.html" onload="runTest()" width="800" heig ht="600"> 33 <iframe src="../Parser/resources/html5.html" onload="runTest()" width="800" heig ht="600">
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | PerformanceTests/Interactive/resources/window-resize.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698