Home | History | Annotate | Download | only in tests

Lines Matching refs:resources

162         // Server the delayed resources.
172 static bool resourceVectorContains(const WebVector<WebPageSerializer::Resource>& resources, const char* url, const char* mimeType)
175 for (size_t i = 0; i < resources.size(); ++i) {
176 const WebPageSerializer::Resource& resource = resources[i];
194 // Tests that a page with resources and sub-frame is reported with all its resources.
208 WebVector<WebPageSerializer::Resource> resources;
209 WebPageSerializer::serialize(m_webView, &resources);
210 ASSERT_FALSE(resources.isEmpty());
213 const WebPageSerializer::Resource& resource = resources[0];
218 EXPECT_EQ(6U, resources.size()); // There should be no duplicates.
219 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/red_background.png", "image/png"));
220 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/green_background.png", "image/png"));
221 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/blue_background.png", "image/png"));
222 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/iframe.html", "text/html"));
223 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/iframe2.html", "text/html"));
226 // Test that when serializing a page, all CSS resources are reported, including url()'s
227 // and imports and links. Note that we don't test the resources contents, we only make sure
235 WebVector<WebPageSerializer::Resource> resources;
236 WebPageSerializer::serialize(m_webView, &resources);
237 ASSERT_FALSE(resources.isEmpty());
240 const WebPageSerializer::Resource& resource = resources[0];
245 EXPECT_EQ(12U, resources.size()); // There should be no duplicates.
246 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/link_styles.css", "text/css"));
247 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/import_styles.css", "text/css"));
248 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/import_style_from_link.css", "text/css"));
249 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/red_background.png", "image/png"));
250 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/orange_background.png", "image/png"));
251 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/yellow_background.png", "image/png"));
252 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/green_background.png", "image/png"));
253 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/blue_background.png", "image/png"));
254 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/purple_background.png", "image/png"));
255 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/ul-dot.png", "image/png"));
256 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/ol-dot.png", "image/png"));
259 // Tests that when serializing a page with blank frames these are reported with their resources.
271 WebVector<WebPageSerializer::Resource> resources;
272 WebPageSerializer::serialize(m_webView, &resources);
273 ASSERT_FALSE(resources.isEmpty());
276 const WebPageSerializer::Resource& resource = resources[0];
281 EXPECT_EQ(7U, resources.size()); // There should be no duplicates.
282 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/red_background.png", "image/png"));
283 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/orange_background.png", "image/png"));
284 EXPECT_TRUE(resourceVectorContains(resources, "http://www.test.com/blue_background.png", "image/png"));
286 EXPECT_TRUE(resourceVectorContains(resources, "wyciwyg://frame/0", "text/html"));
287 EXPECT_TRUE(resourceVectorContains(resources, "wyciwyg://frame/1", "text/html"));
288 EXPECT_TRUE(resourceVectorContains(resources, "wyciwyg://frame/2", "text/html"));
298 WebVector<WebPageSerializer::Resource> resources;
299 WebPageSerializer::serialize(m_webView, &resources);
300 ASSERT_FALSE(resources.isEmpty());
303 ASSERT_EQ(1U, resources.size());
304 std::string xml = std::string(resources[0].data.data());