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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/NodeList/nodelist-reachable.html

Issue 1972943002: Modifies few gc related layout tests to work with ignition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes comments. Created 4 years, 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <form> 3 <form>
4 <input name="radios" type="radio"> 4 <input name="radios" type="radio">
5 <input name="radios" type="radio"> 5 <input name="radios" type="radio">
6 </form> 6 </form>
7 <script src="../../../resources/js-test.js"></script> 7 <script src="../../../resources/js-test.js"></script>
8 <script> 8 <script>
9 9
10 var nodeListKind = { 10 var nodeListKind = {
11 ChildNodeListType: 'document.body.childNodes', 11 ChildNodeListType: 'document.body.childNodes',
12 ClassNodeListType: 'document.getElementsByClassName("class")', 12 ClassNodeListType: 'document.getElementsByClassName("class")',
13 NameNodeListType: 'document.getElementsByName("name")', 13 NameNodeListType: 'document.getElementsByName("name")',
14 TagNodeListType: 'document.getElementsByTagName("body")', 14 TagNodeListType: 'document.getElementsByTagName("body")',
15 RadioNodeListType: 'document.querySelector("form").elements["radios"]', 15 RadioNodeListType: 'document.querySelector("form").elements["radios"]',
16 LabelsNodeListType: 'document.querySelector("input").labels', 16 LabelsNodeListType: 'document.querySelector("input").labels',
17 }; 17 };
18 18
19 var i = 1; 19 var i = 1;
20 for (var kind in nodeListKind) { 20 for (var kind in nodeListKind) {
21 var code = nodeListKind[kind]; 21 var code = nodeListKind[kind];
22 eval(code).customProperty = i; 22 // Do initialization work in an inner function to avoid references to
23 // objects remaining live on this function's stack frame
24 // (http://crbug.com/595672/).
25 (() => {eval(code).customProperty = i})();
23 gc(); 26 gc();
24 shouldBe(code + '.customProperty', '' + i++); 27 shouldBe(code + '.customProperty', '' + i++);
25 } 28 }
26 29
27 </script> 30 </script>
28 </body> 31 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698