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

Side by Side Diff: PerformanceTests/CSS/StyleSheetInsert-bootstrap.html

Issue 478003002: Fill in descriptions on relevant blink_perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: alancutter nits Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « PerformanceTests/CSS/StyleSheetInsert.html ('k') | PerformanceTests/Canvas/drawimage.html » ('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 <script src="../resources/runner.js"></script> 4 <script src="../resources/runner.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <iframe></iframe> 7 <iframe></iframe>
8 </body> 8 </body>
9 <script> 9 <script>
10 function loadText(path) { 10 function loadText(path) {
11 var xhr = new XMLHttpRequest(); 11 var xhr = new XMLHttpRequest();
12 xhr.open("GET", path, false); 12 xhr.open("GET", path, false);
13 xhr.send(null); 13 xhr.send(null);
14 return xhr.responseText; 14 return xhr.responseText;
15 } 15 }
16 var styleText = loadText("resources/bootstrap.min.css"); 16 var styleText = loadText("resources/bootstrap.min.css");
17 17
18 PerfTestRunner.measureRunsPerSecond({run:function() { 18 PerfTestRunner.measureRunsPerSecond({
19 var testDoc = document.getElementsByTagName("iframe")[0].contentDocument; 19 description: "Measures performance of inserting a style elemenet ocntaining bootstrap's CSS into an iframe.",
20 testDoc.documentElement.innerHTML = ""; 20 run:function() {
21 var style = testDoc.createElement("style"); 21 var testDoc = document.getElementsByTagName("iframe")[0].contentDocument ;
22 style.textContent = styleText; 22 testDoc.documentElement.innerHTML = "";
23 testDoc.documentElement.appendChild(style); 23 var style = testDoc.createElement("style");
24 }}); 24 style.textContent = styleText;
25 testDoc.documentElement.appendChild(style);
26 }
27 });
25 </script> 28 </script>
26 </html> 29 </html>
OLDNEW
« no previous file with comments | « PerformanceTests/CSS/StyleSheetInsert.html ('k') | PerformanceTests/Canvas/drawimage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698