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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2353013002: [test] Resources served from MemoryCache - early exit (Closed)
Patch Set: use the right issue :P Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 6996 matching lines...) Expand 10 before | Expand all | Expand 10 after
7007 TestSameDocumentWithImageWebFrameClient client; 7007 TestSameDocumentWithImageWebFrameClient client;
7008 FrameTestHelpers::WebViewHelper webViewHelper; 7008 FrameTestHelpers::WebViewHelper webViewHelper;
7009 webViewHelper.initializeAndLoad(m_baseURL + "foo_with_image.html", true, 7009 webViewHelper.initializeAndLoad(m_baseURL + "foo_with_image.html", true,
7010 &client, nullptr, nullptr, 7010 &client, nullptr, nullptr,
7011 &configureLoadsImagesAutomatically); 7011 &configureLoadsImagesAutomatically);
7012 7012
7013 WebCache::clear(); 7013 WebCache::clear();
7014 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(), 7014 FrameTestHelpers::loadFrame(webViewHelper.webView()->mainFrame(),
7015 m_baseURL + "foo_with_image.html"); 7015 m_baseURL + "foo_with_image.html");
7016 7016
7017 // 2 images are requested, and each triggers 2 willSendRequest() calls, 7017 // 2 images are requested, and each triggers 1 willSendRequest() calls.
7018 // once for preloading and once for the real request. 7018 // Preload matches do not call willSendRequest().
7019 EXPECT_EQ(client.numOfImageRequests(), 4); 7019 EXPECT_EQ(client.numOfImageRequests(), 2);
7020 } 7020 }
7021 7021
7022 TEST_P(ParameterizedWebFrameTest, WebNodeImageContents) { 7022 TEST_P(ParameterizedWebFrameTest, WebNodeImageContents) {
7023 FrameTestHelpers::WebViewHelper webViewHelper; 7023 FrameTestHelpers::WebViewHelper webViewHelper;
7024 webViewHelper.initializeAndLoad("about:blank", true); 7024 webViewHelper.initializeAndLoad("about:blank", true);
7025 WebFrame* frame = webViewHelper.webView()->mainFrame(); 7025 WebFrame* frame = webViewHelper.webView()->mainFrame();
7026 7026
7027 static const char bluePNG[] = 7027 static const char bluePNG[] =
7028 "<img " 7028 "<img "
7029 "src=\"data:image/" 7029 "src=\"data:image/"
(...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after
10252 webViewHelper.webView()->handleInputEvent(endEvent); 10252 webViewHelper.webView()->handleInputEvent(endEvent);
10253 webViewHelper.webView()->handleInputEvent(updateEvent); 10253 webViewHelper.webView()->handleInputEvent(updateEvent);
10254 10254
10255 // Try a full Begin/Update/End cycle. 10255 // Try a full Begin/Update/End cycle.
10256 webViewHelper.webView()->handleInputEvent(beginEvent); 10256 webViewHelper.webView()->handleInputEvent(beginEvent);
10257 webViewHelper.webView()->handleInputEvent(updateEvent); 10257 webViewHelper.webView()->handleInputEvent(updateEvent);
10258 webViewHelper.webView()->handleInputEvent(endEvent); 10258 webViewHelper.webView()->handleInputEvent(endEvent);
10259 } 10259 }
10260 10260
10261 } // namespace blink 10261 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698