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

Side by Side Diff: content/test/test_web_contents.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/test/test_web_contents.h" 5 #include "content/test/test_web_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "content/browser/browser_url_handler_impl.h" 10 #include "content/browser/browser_url_handler_impl.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 switches::kEnableBrowserSideNavigation); 219 switches::kEnableBrowserSideNavigation);
220 if (!browser_side_navigation || 220 if (!browser_side_navigation ||
221 GetMainFrame()->frame_tree_node()->navigation_request()) { 221 GetMainFrame()->frame_tree_node()->navigation_request()) {
222 GetMainFrame()->PrepareForCommit(); 222 GetMainFrame()->PrepareForCommit();
223 } 223 }
224 224
225 TestRenderFrameHost* old_rfh = GetMainFrame(); 225 TestRenderFrameHost* old_rfh = GetMainFrame();
226 TestRenderFrameHost* rfh = GetPendingMainFrame(); 226 TestRenderFrameHost* rfh = GetPendingMainFrame();
227 if (!rfh) 227 if (!rfh)
228 rfh = old_rfh; 228 rfh = old_rfh;
229 CHECK(!browser_side_navigation || rfh->is_loading()); 229 CHECK_IMPLIES(browser_side_navigation, rfh->is_loading());
230 CHECK(!browser_side_navigation || 230 CHECK_IMPLIES(browser_side_navigation,
231 !rfh->frame_tree_node()->navigation_request()); 231 !rfh->frame_tree_node()->navigation_request());
232 232
233 int page_id = entry->GetPageID(); 233 int page_id = entry->GetPageID();
234 if (page_id == -1) { 234 if (page_id == -1) {
235 // It's a new navigation, assign a never-seen page id to it. 235 // It's a new navigation, assign a never-seen page id to it.
236 page_id = GetMaxPageIDForSiteInstance(rfh->GetSiteInstance()) + 1; 236 page_id = GetMaxPageIDForSiteInstance(rfh->GetSiteInstance()) + 1;
237 } 237 }
238 238
239 rfh->SendNavigate(page_id, entry->GetUniqueID(), 239 rfh->SendNavigate(page_id, entry->GetUniqueID(),
240 GetController().GetPendingEntryIndex() == -1, 240 GetController().GetPendingEntryIndex() == -1,
241 entry->GetURL()); 241 entry->GetURL());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 327 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
328 } 328 }
329 329
330 void TestWebContents::SaveFrameWithHeaders(const GURL& url, 330 void TestWebContents::SaveFrameWithHeaders(const GURL& url,
331 const Referrer& referrer, 331 const Referrer& referrer,
332 const std::string& headers) { 332 const std::string& headers) {
333 save_frame_headers_ = headers; 333 save_frame_headers_ = headers;
334 } 334 }
335 335
336 } // namespace content 336 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.cc ('k') | content/test/web_contents_observer_sanity_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698