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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-columns-sorted.html

Issue 2540543002: [Devtools] Moved flatten children to children nodes instead of datagrid (Closed)
Patch Set: Merge branch 'master' into FLATEN_CHILDREN 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/network/network-columns-sorted-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/network/network-columns-sorted.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-columns-sorted.html b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-columns-sorted.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d20273efa38e93fd306a517c4ebc6ee94d863a3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-columns-sorted.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../network-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.recordNetwork();
+
+ var totalResourceCount = 4;
+ function fetchRequests() {
+ InspectorTest.makeFetch("resources/style.css", {}, ensureAllResources);
+ InspectorTest.makeFetch("resources/abe.png", {}, () => {
+ // Ensures result is cached.
+ InspectorTest.makeFetch("resources/abe.png", {}, ensureAllResources);
+ ensureAllResources();
+ });
+ InspectorTest.makeFetch("missing/foo.bar", {}, ensureAllResources);
+ }
+
+ var resourceCount = 0;
+ function ensureAllResources()
+ {
+ if (++resourceCount < totalResourceCount)
+ return;
+ UI.panels.network._networkLogView._refresh();
+ sortGrid();
+ InspectorTest.completeTest();
+ }
+
+ function sortGrid()
+ {
+ var logView = UI.panels.network._networkLogView;
+ var dataGrid = logView._dataGrid;
+ var columnsView = logView._columns;
+ InspectorTest.addSniffer(logView, "dataGridSorted", dataGridSorted.bind(null, logView), true);
+
+ dataGrid.markColumnAsSortedBy('name', UI.DataGrid.Order.Ascending);
+ columnsView.sortByCurrentColumn();
+ dataGrid.markColumnAsSortedBy('name', UI.DataGrid.Order.Descending);
+ columnsView.sortByCurrentColumn();
+ }
+
+ function dataGridSorted(logView)
+ {
+ var nodes = logView._dataGrid.rootNode().flatChildren();
+ InspectorTest.addResult("Sorted by: " + logView._dataGrid.sortColumnId());
+ for (var node of nodes)
+ InspectorTest.addResult(" " + node.request().name());
+ InspectorTest.addResult("");
+ }
+ fetchRequests();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests network columns are sortable.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/network-columns-sorted-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698