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

Side by Side Diff: chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc

Issue 2918563002: Increase SubresourceFcpOrder resource delay. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 IN_PROC_BROWSER_TEST_F(ResourcePrefetchPredictorBrowserTest, 776 IN_PROC_BROWSER_TEST_F(ResourcePrefetchPredictorBrowserTest,
777 SubresourceFcpOrder) { 777 SubresourceFcpOrder) {
778 AddResource(GetURL(kStylePath), content::RESOURCE_TYPE_STYLESHEET, 778 AddResource(GetURL(kStylePath), content::RESOURCE_TYPE_STYLESHEET,
779 net::HIGHEST); 779 net::HIGHEST);
780 AddResource(GetURL(kScriptPath), content::RESOURCE_TYPE_SCRIPT, net::MEDIUM); 780 AddResource(GetURL(kScriptPath), content::RESOURCE_TYPE_SCRIPT, net::MEDIUM);
781 781
782 ResourceSummary* image = AddResource( 782 ResourceSummary* image = AddResource(
783 GetURL(kImagePath), content::RESOURCE_TYPE_IMAGE, net::LOWEST); 783 GetURL(kImagePath), content::RESOURCE_TYPE_IMAGE, net::LOWEST);
784 // Delay HTTP response to ensure enough time to receive notice of 784 // Delay HTTP response to ensure enough time to receive notice of
785 // firstContentfulPaint. 785 // firstContentfulPaint.
786 image->delay = base::TimeDelta::FromMilliseconds(1500); 786 image->delay = base::TimeDelta::FromMilliseconds(2500);
787 image->request.before_first_contentful_paint = false; 787 image->request.before_first_contentful_paint = false;
788 788
789 TestLearningAndPrefetching(GetURL(kHtmlFcpOrderPath), true); 789 TestLearningAndPrefetching(GetURL(kHtmlFcpOrderPath), true);
790 } 790 }
791 791
792 IN_PROC_BROWSER_TEST_F(ResourcePrefetchPredictorBrowserTest, Redirect) { 792 IN_PROC_BROWSER_TEST_F(ResourcePrefetchPredictorBrowserTest, Redirect) {
793 GURL initial_url = GetURLWithHost(kFooHost, kRedirectPath); 793 GURL initial_url = GetURLWithHost(kFooHost, kRedirectPath);
794 GURL redirected_url = 794 GURL redirected_url =
795 GetPageURLWithReplacements(kBarHost, kHtmlSubresourcesPath); 795 GetPageURLWithReplacements(kBarHost, kHtmlSubresourcesPath);
796 AddRedirectChain(initial_url, 796 AddRedirectChain(initial_url,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 AddResourcesFromSubresourceHtml(); 1009 AddResourcesFromSubresourceHtml();
1010 1010
1011 NavigateToURLAndCheckSubresources(initial_url); 1011 NavigateToURLAndCheckSubresources(initial_url);
1012 ClearCache(); 1012 ClearCache();
1013 NavigateToURLAndCheckSubresources(initial_url); 1013 NavigateToURLAndCheckSubresources(initial_url);
1014 ClearCache(); 1014 ClearCache();
1015 NavigateToURLAndCheckPrefetching(initial_url); 1015 NavigateToURLAndCheckPrefetching(initial_url);
1016 } 1016 }
1017 1017
1018 } // namespace predictors 1018 } // namespace predictors
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698