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

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

Issue 2555623003: WebFrameTest: use ReloadMainResource instead of Reload (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 const WebHistoryItem& item, 131 const WebHistoryItem& item,
132 WebHistoryLoadType loadType, 132 WebHistoryLoadType loadType,
133 WebCachePolicy cachePolicy) { 133 WebCachePolicy cachePolicy) {
134 WebURLRequest request = 134 WebURLRequest request =
135 frame->toWebLocalFrame()->requestFromHistoryItem(item, cachePolicy); 135 frame->toWebLocalFrame()->requestFromHistoryItem(item, cachePolicy);
136 frame->toWebLocalFrame()->load(request, WebFrameLoadType::BackForward, item); 136 frame->toWebLocalFrame()->load(request, WebFrameLoadType::BackForward, item);
137 pumpPendingRequestsForFrameToLoad(frame); 137 pumpPendingRequestsForFrameToLoad(frame);
138 } 138 }
139 139
140 void reloadFrame(WebFrame* frame) { 140 void reloadFrame(WebFrame* frame) {
141 frame->reload(WebFrameLoadType::Reload); 141 frame->reload(WebFrameLoadType::ReloadMainResource);
142 pumpPendingRequestsForFrameToLoad(frame); 142 pumpPendingRequestsForFrameToLoad(frame);
143 } 143 }
144 144
145 void reloadFrameIgnoringCache(WebFrame* frame) { 145 void reloadFrameBypassingCache(WebFrame* frame) {
146 frame->reload(WebFrameLoadType::ReloadBypassingCache); 146 frame->reload(WebFrameLoadType::ReloadBypassingCache);
147 pumpPendingRequestsForFrameToLoad(frame); 147 pumpPendingRequestsForFrameToLoad(frame);
148 } 148 }
149 149
150 void pumpPendingRequestsForFrameToLoad(WebFrame* frame) { 150 void pumpPendingRequestsForFrameToLoad(WebFrame* frame) {
151 Platform::current()->currentThread()->getWebTaskRunner()->postTask( 151 Platform::current()->currentThread()->getWebTaskRunner()->postTask(
152 BLINK_FROM_HERE, WTF::bind(&runServeAsyncRequestsTask, 152 BLINK_FROM_HERE, WTF::bind(&runServeAsyncRequestsTask,
153 WTF::unretained(testClientForFrame(frame)))); 153 WTF::unretained(testClientForFrame(frame))));
154 testing::enterRunLoop(); 154 testing::enterRunLoop();
155 } 155 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 m_testWebViewClient->scheduleAnimation(); 341 m_testWebViewClient->scheduleAnimation();
342 } 342 }
343 343
344 void TestWebViewWidgetClient::didMeaningfulLayout( 344 void TestWebViewWidgetClient::didMeaningfulLayout(
345 WebMeaningfulLayout layoutType) { 345 WebMeaningfulLayout layoutType) {
346 m_testWebViewClient->didMeaningfulLayout(layoutType); 346 m_testWebViewClient->didMeaningfulLayout(layoutType);
347 } 347 }
348 348
349 } // namespace FrameTestHelpers 349 } // namespace FrameTestHelpers
350 } // namespace blink 350 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698