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

Side by Side Diff: LayoutTests/http/tests/inspector/search/search-test.js

Issue 1254293008: Perform initial GC to improve inspector/search test stability. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // To ensure that no GC-able resources from other tests upset
2 // expectations, perform an initial GC.
3 if (window.GCController)
4 GCController.collect();
haraken 2015/07/29 13:43:23 Shall we use GCController.collectAll()?
sof 2015/07/29 13:43:57 I've repeatedly tested, and didn't see a need for
5
1 var initialize_SearchTest = function() { 6 var initialize_SearchTest = function() {
2
3 InspectorTest.dumpSearchResults = function(searchResults) 7 InspectorTest.dumpSearchResults = function(searchResults)
4 { 8 {
5 function comparator(a, b) 9 function comparator(a, b)
6 { 10 {
7 a.url.localeCompare(b.url); 11 a.url.localeCompare(b.url);
8 } 12 }
9 searchResults.sort(comparator); 13 searchResults.sort(comparator);
10 14
11 InspectorTest.addResult("Search results: "); 15 InspectorTest.addResult("Search results: ");
12 for (var i = 0; i < searchResults.length; i++) 16 for (var i = 0; i < searchResults.length; i++)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ++postfixLength; 114 ++postfixLength;
111 var prefix = oldLine.substring(0, prefixLength); 115 var prefix = oldLine.substring(0, prefixLength);
112 var removed = oldLine.substring(prefixLength, oldLine.length - postfixLe ngth); 116 var removed = oldLine.substring(prefixLength, oldLine.length - postfixLe ngth);
113 var added = newLine.substring(prefixLength, newLine.length - postfixLeng th); 117 var added = newLine.substring(prefixLength, newLine.length - postfixLeng th);
114 var postfix = oldLine.substring(oldLine.length - postfixLength); 118 var postfix = oldLine.substring(oldLine.length - postfixLength);
115 InspectorTest.addResult(" - " + prefix + "#" + removed + "#" + added + "#" + postfix); 119 InspectorTest.addResult(" - " + prefix + "#" + removed + "#" + added + "#" + postfix);
116 } 120 }
117 } 121 }
118 122
119 }; 123 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698