Lines Matching refs:grid
31 // Size of the images around the grid's border.
39 ImageGrid grid;
40 grid.SetImages(image_BxB.get(), image_1xB.get(), image_BxB.get(),
44 ImageGrid::TestAPI test_api(&grid);
45 ASSERT_TRUE(grid.top_left_layer() != NULL);
46 ASSERT_TRUE(grid.top_layer() != NULL);
47 ASSERT_TRUE(grid.top_right_layer() != NULL);
48 ASSERT_TRUE(grid.left_layer() != NULL);
49 ASSERT_TRUE(grid.center_layer() != NULL);
50 ASSERT_TRUE(grid.right_layer() != NULL);
51 ASSERT_TRUE(grid.bottom_left_layer() != NULL);
52 ASSERT_TRUE(grid.bottom_layer() != NULL);
53 ASSERT_TRUE(grid.bottom_right_layer() != NULL);
56 grid.SetSize(size);
61 *grid.top_left_layer()).ToString());
68 *grid.top_layer()).ToString());
73 *grid.top_right_layer()).ToString());
80 *grid.left_layer()).ToString());
82 // The center layer should fill the space in the middle of the grid.
87 *grid.center_layer()).ToString());
95 *grid.right_layer()).ToString());
101 *grid.bottom_left_layer()).ToString());
109 *grid.bottom_layer()).ToString());
117 *grid.bottom_right_layer()).ToString());
123 // Size of the images around the grid's border.
131 ImageGrid grid;
132 grid.SetImages(image_BxB.get(), image_1xB.get(), image_BxB.get(),
136 ImageGrid::TestAPI test_api(&grid);
140 grid.SetContentBounds(gfx::Rect(origin, size));
143 // bounds and has height/width that contain the grid and bounds.
148 test_api.GetTransformedLayerBounds(*grid.layer()).ToString());
156 ImageGrid grid;
157 grid.SetImages(NULL, image.get(), NULL,
161 ImageGrid::TestAPI test_api(&grid);
162 EXPECT_TRUE(grid.top_left_layer() == NULL);
163 ASSERT_TRUE(grid.top_layer() != NULL);
164 EXPECT_TRUE(grid.top_right_layer() == NULL);
165 EXPECT_TRUE(grid.left_layer() == NULL);
166 EXPECT_TRUE(grid.center_layer() == NULL);
167 EXPECT_TRUE(grid.right_layer() == NULL);
168 EXPECT_TRUE(grid.bottom_left_layer() == NULL);
169 EXPECT_TRUE(grid.bottom_layer() == NULL);
170 EXPECT_TRUE(grid.bottom_right_layer() == NULL);
173 grid.SetSize(kSize);
179 *grid.top_layer()).ToString());
188 ImageGrid grid;
189 grid.SetImages(NULL, image.get(), NULL,
194 ImageGrid::TestAPI test_api(&grid);
195 ASSERT_TRUE(grid.top_left_layer() == NULL);
196 ASSERT_FALSE(grid.top_layer() == NULL);
197 ASSERT_TRUE(grid.top_right_layer() == NULL);
198 ASSERT_TRUE(grid.left_layer() == NULL);
199 ASSERT_TRUE(grid.center_layer() == NULL);
200 ASSERT_TRUE(grid.right_layer() == NULL);
201 ASSERT_TRUE(grid.bottom_left_layer() == NULL);
202 ASSERT_TRUE(grid.bottom_layer() == NULL);
203 ASSERT_TRUE(grid.bottom_right_layer() == NULL);
205 grid.SetImages(NULL, NULL, NULL,
210 ASSERT_TRUE(grid.top_left_layer() == NULL);
211 ASSERT_TRUE(grid.top_layer() == NULL);
212 ASSERT_TRUE(grid.top_right_layer() == NULL);
213 ASSERT_TRUE(grid.left_layer() == NULL);
214 ASSERT_TRUE(grid.center_layer() == NULL);
215 ASSERT_TRUE(grid.right_layer() == NULL);
216 ASSERT_TRUE(grid.bottom_left_layer() == NULL);
217 ASSERT_FALSE(grid.bottom_layer() == NULL);
218 ASSERT_TRUE(grid.bottom_right_layer() == NULL);
236 ImageGrid grid;
237 grid.SetImages(top_left_image.get(), top_image.get(), top_right_image.get(),
240 ImageGrid::TestAPI test_api(&grid);
243 grid.SetSize(kSize);
250 *grid.top_layer()).ToString());
257 *grid.left_layer()).ToString());
265 *grid.right_layer()).ToString());
268 // Test that we hide or clip layers as needed when the grid is assigned a small
289 ImageGrid grid;
290 grid.SetImages(
294 ImageGrid::TestAPI test_api(&grid);
298 grid.SetSize(kSmallSize);
301 EXPECT_FALSE(grid.top_layer()->visible());
302 EXPECT_FALSE(grid.bottom_layer()->visible());
303 EXPECT_FALSE(grid.left_layer()->visible());
304 EXPECT_FALSE(grid.right_layer()->visible());
305 EXPECT_FALSE(grid.center_layer()->visible());
321 // Resize the grid to be large enough to show all images.
324 grid.SetSize(kLargeSize);
327 EXPECT_TRUE(grid.top_layer()->visible());
328 EXPECT_TRUE(grid.bottom_layer()->visible());
329 EXPECT_TRUE(grid.left_layer()->visible());
330 EXPECT_TRUE(grid.right_layer()->visible());
331 EXPECT_TRUE(grid.center_layer()->visible());