Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/input/text-input-controller-leak-document.html | 
| diff --git a/third_party/WebKit/LayoutTests/editing/input/text-input-controller-leak-document.html b/third_party/WebKit/LayoutTests/editing/input/text-input-controller-leak-document.html | 
| index 06e65c066f443b795aa844588804f375c755b69a..9ea98117be22d9f60ead394239f2b520c1ec3105 100644 | 
| --- a/third_party/WebKit/LayoutTests/editing/input/text-input-controller-leak-document.html | 
| +++ b/third_party/WebKit/LayoutTests/editing/input/text-input-controller-leak-document.html | 
| @@ -4,12 +4,19 @@ | 
| <script src="../../resources/js-test.js"></script> | 
| <script> | 
| - var input = document.getElementById('text'); | 
| - input.focus(); | 
| - textInputController.setMarkedText("hello", 0, 5); | 
| - var markedRangeResultGC = internals.observeGC(textInputController.markedRange()); | 
| - var selectedRangeResultGC = internals.observeGC(textInputController.selectedRange()); | 
| - var firstRectForCharacterRangeGC = internals.observeGC(textInputController.firstRectForCharacterRange(0, 0)); | 
| + var markedRangeResultGC; | 
| + var selectedRangeResultGC; | 
| + var firstRectForCharacterRangeGC; | 
| + var input; | 
| + function initializeVariables() { | 
| + input = document.getElementById('text'); | 
| + input.focus(); | 
| + textInputController.setMarkedText("hello", 0, 5); | 
| + markedRangeResultGC = internals.observeGC(textInputController.markedRange()); | 
| + selectedRangeResultGC = internals.observeGC(textInputController.selectedRange()); | 
| + firstRectForCharacterRangeGC = internals.observeGC(textInputController.firstRectForCharacterRange(0, 0)); | 
| 
 
rmcilroy
2016/05/05 13:50:46
What actually lives in a temporary register and ne
 
 | 
| + } | 
| + initializeVariables(); | 
| gc(); | 
| shouldBeTrue('markedRangeResultGC.wasCollected'); | 
| shouldBeTrue('selectedRangeResultGC.wasCollected'); |