| 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..5a70d17d4cf214b0e70a40ab39286bca0f5d3c26 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
|
| @@ -3,13 +3,20 @@
|
| <input id='text' type='text'></input>
|
|
|
| <script src="../../resources/js-test.js"></script>
|
| + <script src="../../resources/observeGC.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 = observeGC(() => {
|
| + return textInputController.markedRange();
|
| + });
|
| + var selectedRangeResultGC = observeGC(() => {
|
| + return textInputController.selectedRange();
|
| + });
|
| + var firstRectForCharacterRangeGC = observeGC(() => {
|
| + return textInputController.firstRectForCharacterRange(0, 0);
|
| + });
|
| gc();
|
| shouldBeTrue('markedRangeResultGC.wasCollected');
|
| shouldBeTrue('selectedRangeResultGC.wasCollected');
|
|
|