| Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/list-control-non-viewport.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/list-control-non-viewport.js b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/list-control-non-viewport.js
|
| index b525b1c14d0b5b96117635069ba78af342adf70d..fe6e78e90610857486e33dd0ca2cc6ffa1050886 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/list-control-non-viewport.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/list-control-non-viewport.js
|
| @@ -31,13 +31,14 @@ class Delegate {
|
| }
|
|
|
| var delegate = new Delegate();
|
| -var list = new UI.ListControl(delegate, UI.ListMode.NonViewport);
|
| +var model = new UI.ListModel();
|
| +var list = new UI.ListControl(model, delegate, UI.ListMode.NonViewport);
|
| UI.inspectorView.element.appendChild(list.element);
|
|
|
| function dumpList()
|
| {
|
| var height = list.element.offsetHeight;
|
| - TestRunner.addResult(`----list[length=${list.length()}][height=${height}]----`);
|
| + TestRunner.addResult(`----list[length=${model.length()}][height=${height}]----`);
|
| for (var child of list.element.children) {
|
| var offsetTop = child.getBoundingClientRect().top - list.element.getBoundingClientRect().top;
|
| var offsetBottom = child.getBoundingClientRect().bottom - list.element.getBoundingClientRect().top;
|
| @@ -51,7 +52,7 @@ function dumpList()
|
| }
|
|
|
| TestRunner.addResult('Adding 0, 1, 2');
|
| -list.replaceAllItems([0, 1, 2]);
|
| +model.replaceAllItems([0, 1, 2]);
|
| dumpList();
|
|
|
| TestRunner.addResult('Scrolling to 0');
|
| @@ -63,7 +64,7 @@ list.scrollItemIntoView(2);
|
| dumpList();
|
|
|
| TestRunner.addResult('Adding 3-20');
|
| -list.replaceItemsInRange(3, 3, [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]);
|
| +model.replaceItemsInRange(3, 3, [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]);
|
| dumpList();
|
|
|
| TestRunner.addResult('Scrolling to 19');
|
| @@ -75,7 +76,7 @@ list.scrollItemIntoView(13, true);
|
| dumpList();
|
|
|
| TestRunner.addResult('Replacing 0, 1 with 25-36');
|
| -list.replaceItemsInRange(0, 2, [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]);
|
| +model.replaceItemsInRange(0, 2, [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]);
|
| dumpList();
|
|
|
| TestRunner.addResult('Scrolling to 18');
|
| @@ -83,11 +84,11 @@ list.scrollItemIntoView(28);
|
| dumpList();
|
|
|
| TestRunner.addResult('Replacing 25-36 with 0-1');
|
| -list.replaceItemsInRange(0, 12, [0, 1]);
|
| +model.replaceItemsInRange(0, 12, [0, 1]);
|
| dumpList();
|
|
|
| TestRunner.addResult('Replacing 16-18 with 45');
|
| -list.replaceItemsInRange(16, 19, [45]);
|
| +model.replaceItemsInRange(16, 19, [45]);
|
| dumpList();
|
|
|
| TestRunner.addResult('Scrolling to 4');
|
| @@ -95,7 +96,7 @@ list.scrollItemIntoView(4);
|
| dumpList();
|
|
|
| TestRunner.addResult('Replacing 45 with 16-18');
|
| -list.replaceItemsInRange(16, 17, [16, 17, 18]);
|
| +model.replaceItemsInRange(16, 17, [16, 17, 18]);
|
| dumpList();
|
|
|
| TestRunner.completeTest();
|
|
|