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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control.js

Issue 2592483002: [DevTools] Move console viewport to console, rename StaticViewportControl. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control.js b/third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control.js
deleted file mode 100644
index 0b333830a7b962efd7603716536a6278768d931e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control.js
+++ /dev/null
@@ -1,50 +0,0 @@
-TestRunner.addResult("This tests if the StaticViewportControl works properly.");
-
-var items = [];
-var heights = [];
-for (var i = 0; i < 100; i++){
- items[i] = document.createElement("div");
- items[i].style.height = (heights[i] = (i % 4) ? 50 : 28) + "px";
- items[i].textContent = i;
-}
-var viewport = new UI.StaticViewportControl({
- fastItemHeight: i => heights[i],
- itemCount: _ => items.length,
- itemElement: i => items[i]
-});
-viewport.element.style.height = "300px";
-UI.inspectorView.element.appendChild(viewport.element);
-
-viewport.refresh();
-dumpViewport();
-
-viewport.forceScrollItemToBeFirst(26);
-dumpViewport();
-
-viewport.scrollItemIntoView(33);
-dumpViewport();
-
-viewport.scrollItemIntoView(30);
-dumpViewport();
-
-viewport.forceScrollItemToBeFirst(30);
-dumpViewport();
-
-viewport.forceScrollItemToBeLast(88);
-dumpViewport();
-
-for (var i = 0; i < 100; i++)
- items[i].style.height = (heights[i] = (i % 2) ? 55 : 63) + "px";
-viewport.refresh();
-viewport.forceScrollItemToBeLast(88);
-dumpViewport();
-
-TestRunner.completeTest();
-
-function dumpViewport()
-{
- TestRunner.addResult("First:" + viewport.firstVisibleIndex());
- TestRunner.addResult("Last:" + viewport.lastVisibleIndex());
- TestRunner.addResult("Active Items:" + viewport._innerElement.children.length);
- TestRunner.addResult("");
-}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector-unit/static-viewport-control-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698