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

Unified Diff: third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html

Issue 2894083002: [DevTools] Set row background instead of the table (Closed)
Patch Set: Fixed a comment Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html
diff --git a/third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html b/third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html
index 5154f54f088bd095dfdebc577d13a84a82b6691f..8921c2f28e4f9a7d6961ffd8de1e0c81a001280f 100644
--- a/third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html
+++ b/third_party/WebKit/LayoutTests/inspector/components/viewport-datagrid.html
@@ -51,6 +51,16 @@ function test()
InspectorTest.addResult("");
}
+ function revealChildAndDumpClassAndVisibleNodes(index) {
+ root.children[index].revealAndSelect();
+ dataGrid.updateInstantly();
+
+ InspectorTest.addResult(`Class list: ${dataGrid.element.classList}`);
+
+ for (var node of dataGrid._visibleNodes)
+ InspectorTest.addResult(node.data.id);
+ }
+
var columns = [{id: "id", title: "ID column", width: "250px"}];
var dataGrid = new DataGrid.ViewportDataGrid(columns);
var a = new DataGrid.ViewportDataGridNode({id: "a"});
@@ -70,6 +80,7 @@ function test()
containerElement.appendChild(dataGrid.element);
dataGrid.wasShown();
dataGrid.element.style.width = "100%";
+ dataGrid.element.style.height = "100%";
InspectorTest.addResult("Building tree.");
@@ -164,6 +175,16 @@ function test()
root.appendChild(children[i]);
}
dataGrid.updateInstantly();
+
+ dataGrid.setStriped(true);
+ InspectorTest.addResult('Scrolling to the top');
+ revealChildAndDumpClassAndVisibleNodes(0);
+ InspectorTest.addResult('Scrolling 1 node down');
+ revealChildAndDumpClassAndVisibleNodes(dataGrid._visibleNodes.length);
+ InspectorTest.addResult('Disabling the stripes');
+ dataGrid.setStriped(false);
+ InspectorTest.addResult(`Class list: ${dataGrid.element.classList}`);
+
InspectorTest.completeTest();
}
</script>

Powered by Google App Engine
This is Rietveld 408576698