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

Side by Side Diff: PerformanceTests/Interactive/resources/window-resize.js

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
OLDNEW
1 if (window.testRunner) 1 if (window.testRunner)
2 testRunner.dumpAsText(); 2 testRunner.dumpAsText();
3 3
4 (function() { 4 (function() {
5 var portrait = { width: window.innerWidth, height: window.innerHeight }; 5 var portrait = { width: window.innerWidth, height: window.innerHeight };
6 var landscape = { width: window.innerHeight, height: window.innerWidth }; 6 var landscape = { width: window.innerHeight, height: window.innerWidth };
7 7
8 var run = function() { 8 var run = function() {
9 window.resizeTo(portrait.width, portrait.height); 9 window.resizeTo(portrait.width, portrait.height);
10 document.body.offsetTop; 10 PerfTestRunner.forceLayoutOrFullFrame();
11 window.resizeTo(landscape.width, landscape.height); 11 window.resizeTo(landscape.width, landscape.height);
12 document.body.offsetTop; 12 PerfTestRunner.forceLayoutOrFullFrame();
13 }; 13 };
14 14
15 function onTestDone() { 15 function onTestDone() {
16 var logNode = document.getElementById("log"); 16 var logNode = document.getElementById("log");
17 logNode.parentNode.removeChild(logNode); 17 logNode.parentNode.removeChild(logNode);
18 document.body.innerHTML = ""; 18 document.body.innerHTML = "";
19 document.body.appendChild(logNode); 19 document.body.appendChild(logNode);
20 }; 20 };
21 21
22 function startTest() { 22 function startTest() {
23 PerfTestRunner.measureRunsPerSecond({ 23 PerfTestRunner.measureRunsPerSecond({
24 description: "Exercising window resize and following relayout", 24 description: "Exercising window resize and following relayout",
25 run: run, 25 run: run,
26 done: onTestDone 26 done: onTestDone
27 }); 27 });
28 } 28 }
29 29
30 document.addEventListener("DOMContentLoaded", startTest); 30 document.addEventListener("DOMContentLoaded", startTest);
31 })(); 31 })();
OLDNEW
« no previous file with comments | « PerformanceTests/Interactive/SelectAll.html ('k') | PerformanceTests/Layout/ArabicLineLayout.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698