| Index: chrome/test/data/webui/grid_test.html
|
| diff --git a/chrome/test/data/webui/grid_test.html b/chrome/test/data/webui/grid_test.html
|
| index 125aed9ac43a39d6b32847457a0a953e0eebce85..889af6330b1a61d1ec08065f0c44bdfa8547da22 100644
|
| --- a/chrome/test/data/webui/grid_test.html
|
| +++ b/chrome/test/data/webui/grid_test.html
|
| @@ -26,6 +26,7 @@ function testGetColumnCount() {
|
| assertEquals(0, columns);
|
|
|
| g.dataModel_ = new cr.ui.ArrayDataModel([0, 1, 2]);
|
| + g.horizontalPadding_ = 0;
|
| g.clientWidthWithoutScrollbar_ = 8;
|
| columns = g.getColumnCount_();
|
| // Client width is smaller than item width.
|
| @@ -66,6 +67,18 @@ function testGetColumnCount() {
|
| columns = g.getColumnCount_();
|
| // Can not fit two columns due to margin on left and right side.
|
| assertEquals(1, columns);
|
| +
|
| + g.measured_.marginRight = 0;
|
| + g.horizontalPadding_ = 2;
|
| + g.clientWidthWithoutScrollbar_ = 22;
|
| + columns = g.getColumnCount_();
|
| + // Can fit two columns as (22-2=)20px width is avaiable for grid items.
|
| + assertEquals(2, columns);
|
| +
|
| + g.horizontalPadding_ = 3;
|
| + columns = g.getColumnCount_();
|
| + // Can not fit two columns due to bigger horizontal padding.
|
| + assertEquals(1, columns);
|
| }
|
|
|
| </script>
|
|
|