OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_render_frame_host.h" | 5 #include "content/test/test_render_frame_host.h" |
6 | 6 |
7 #include "base/guid.h" | 7 #include "base/guid.h" |
8 #include "content/browser/frame_host/frame_tree.h" | 8 #include "content/browser/frame_host/frame_tree.h" |
9 #include "content/browser/frame_host/navigation_handle_impl.h" | 9 #include "content/browser/frame_host/navigation_handle_impl.h" |
10 #include "content/browser/frame_host/navigation_request.h" | 10 #include "content/browser/frame_host/navigation_request.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 // In most cases, the origin will match the URL's origin. Tests that need to | 312 // In most cases, the origin will match the URL's origin. Tests that need to |
313 // check corner cases (like about:blank) should specify the origin param | 313 // check corner cases (like about:blank) should specify the origin param |
314 // manually. | 314 // manually. |
315 url::Origin origin(url_copy); | 315 url::Origin origin(url_copy); |
316 params.origin = origin; | 316 params.origin = origin; |
317 | 317 |
318 url::Replacements<char> replacements; | 318 url::Replacements<char> replacements; |
319 replacements.ClearRef(); | 319 replacements.ClearRef(); |
320 params.was_within_same_page = | 320 params.was_within_same_page = |
321 transition != ui::PAGE_TRANSITION_RELOAD && | 321 !ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD) && |
322 transition != ui::PAGE_TRANSITION_TYPED && | 322 !ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED) && |
323 url_copy.ReplaceComponents(replacements) == | 323 url_copy.ReplaceComponents(replacements) == |
324 GetLastCommittedURL().ReplaceComponents(replacements); | 324 GetLastCommittedURL().ReplaceComponents(replacements); |
325 | 325 |
326 params.page_state = | 326 params.page_state = |
327 PageState::CreateForTesting(url_copy, false, nullptr, nullptr); | 327 PageState::CreateForTesting(url_copy, false, nullptr, nullptr); |
328 | 328 |
329 if (!callback.is_null()) | 329 if (!callback.is_null()) |
330 callback.Run(¶ms); | 330 callback.Run(¶ms); |
331 | 331 |
332 SendNavigateWithParams(¶ms); | 332 SendNavigateWithParams(¶ms); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 // cleared during DidFailProvisionalLoad). | 431 // cleared during DidFailProvisionalLoad). |
432 int page_id = entry ? entry->GetPageID() : -1; | 432 int page_id = entry ? entry->GetPageID() : -1; |
433 if (page_id == -1) { | 433 if (page_id == -1) { |
434 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); | 434 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); |
435 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; | 435 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; |
436 } | 436 } |
437 return page_id; | 437 return page_id; |
438 } | 438 } |
439 | 439 |
440 } // namespace content | 440 } // namespace content |
OLD | NEW |