Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/tests/performance/filter_fromText.html

Issue 6423769060999168: Issue 301 - adblockplustests: Use for (.. of ..) (Closed)
Patch Set: Created April 12, 2014, 1:48 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Filter initialization performance measurements</title> 4 <title>Filter initialization performance measurements</title>
5 <script type="application/x-javascript;version=1.7" src="common.js"></script> 5 <script type="application/x-javascript;version=1.7" src="common.js"></script>
6 <script type="application/x-javascript;version=1.7" src="../common.js"></scrip t> 6 <script type="application/x-javascript;version=1.7" src="../common.js"></scrip t>
7 </head> 7 </head>
8 <body> 8 <body>
9 <p> 9 <p>
10 Filters to be used:<br> 10 Filters to be used:<br>
(...skipping 27 matching lines...) Expand all
38 .replace(/[\r\n]+$/, "") 38 .replace(/[\r\n]+$/, "")
39 .split(/[\r\n]+/); 39 .split(/[\r\n]+/);
40 document.getElementById("result").textContent = ""; 40 document.getElementById("result").textContent = "";
41 document.getElementById("progress").style.display = ""; 41 document.getElementById("progress").style.display = "";
42 42
43 runTests(runTest, cleanup, finalize); 43 runTests(runTest, cleanup, finalize);
44 } 44 }
45 45
46 function runTest() 46 function runTest()
47 { 47 {
48 for each (let text in filters) 48 for (let text of filters)
49 Filter.fromText(text); 49 Filter.fromText(text);
50 } 50 }
51 51
52 function cleanup() 52 function cleanup()
53 { 53 {
54 // Clear cache 54 // Clear cache
55 Filter.knownFilters = {__proto__: null}; 55 Filter.knownFilters = {__proto__: null};
56 } 56 }
57 57
58 function finalize() 58 function finalize()
59 { 59 {
60 document.getElementById("progress").style.display = "none"; 60 document.getElementById("progress").style.display = "none";
61 document.getElementById("filters").disabled = false; 61 document.getElementById("filters").disabled = false;
62 document.getElementById("startButton").disabled = false; 62 document.getElementById("startButton").disabled = false;
63 filters = null; 63 filters = null;
64 } 64 }
65 </script> 65 </script>
66 </body> 66 </body>
67 </html> 67 </html>
OLDNEW
« no previous file with comments | « chrome/content/tests/performance/common.js ('k') | chrome/content/tests/performance/matcher_init.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld