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

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

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 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 | « Source/web/WebViewImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | 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 5947 matching lines...) Expand 10 before | Expand all | Expand 10 after
5958 5958
5959 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType) 5959 TEST_P(ParameterizedWebFrameTest, SameDocumentHistoryNavigationCommitType)
5960 { 5960 {
5961 registerMockedHttpURLLoad("push_state.html"); 5961 registerMockedHttpURLLoad("push_state.html");
5962 TestDidNavigateCommitTypeWebFrameClient client; 5962 TestDidNavigateCommitTypeWebFrameClient client;
5963 FrameTestHelpers::WebViewHelper webViewHelper(this); 5963 FrameTestHelpers::WebViewHelper webViewHelper(this);
5964 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push _state.html", true, &client); 5964 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push _state.html", true, &client);
5965 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()- >mainFrame())->loader().currentItem(); 5965 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()- >mainFrame())->loader().currentItem();
5966 runPendingTasks(); 5966 runPendingTasks();
5967 5967
5968 toLocalFrame(webViewImpl->page()->mainFrame())->loader().loadHistoryItem(ite m.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); 5968 toLocalFrame(webViewImpl->page()->mainFrame())->loader().load(
5969 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem(
5970 item.get(), UseProtocolCachePolicy)),
5971 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad);
5969 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); 5972 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType());
5970 } 5973 }
5971 5974
5972 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { 5975 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient {
5973 public: 5976 public:
5974 TestHistoryWebFrameClient() 5977 TestHistoryWebFrameClient()
5975 { 5978 {
5976 m_replacesCurrentHistoryItem = false; 5979 m_replacesCurrentHistoryItem = false;
5977 m_frame = nullptr; 5980 m_frame = nullptr;
5978 } 5981 }
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
7465 7468
7466 EXPECT_EQ(parent, firstFrame->parent()); 7469 EXPECT_EQ(parent, firstFrame->parent());
7467 EXPECT_EQ(parent, secondFrame->parent()); 7470 EXPECT_EQ(parent, secondFrame->parent());
7468 EXPECT_EQ(parent, thirdFrame->parent()); 7471 EXPECT_EQ(parent, thirdFrame->parent());
7469 EXPECT_EQ(parent, fourthFrame->parent()); 7472 EXPECT_EQ(parent, fourthFrame->parent());
7470 7473
7471 view->close(); 7474 view->close();
7472 } 7475 }
7473 7476
7474 } // namespace blink 7477 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698