OLD | NEW |
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 5887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5898 | 5898 |
5899 TEST_P(ParametrizedWebFrameTest, SameDocumentHistoryNavigationCommitType) | 5899 TEST_P(ParametrizedWebFrameTest, SameDocumentHistoryNavigationCommitType) |
5900 { | 5900 { |
5901 registerMockedHttpURLLoad("push_state.html"); | 5901 registerMockedHttpURLLoad("push_state.html"); |
5902 TestDidNavigateCommitTypeWebFrameClient client; | 5902 TestDidNavigateCommitTypeWebFrameClient client; |
5903 FrameTestHelpers::WebViewHelper webViewHelper(this); | 5903 FrameTestHelpers::WebViewHelper webViewHelper(this); |
5904 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); | 5904 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "push
_state.html", true, &client); |
5905 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); | 5905 RefPtrWillBePersistent<HistoryItem> item = toLocalFrame(webViewImpl->page()-
>mainFrame())->loader().currentItem(); |
5906 runPendingTasks(); | 5906 runPendingTasks(); |
5907 | 5907 |
5908 toLocalFrame(webViewImpl->page()->mainFrame())->loader().loadHistoryItem(ite
m.get(), FrameLoadTypeBackForward, HistorySameDocumentLoad); | 5908 toLocalFrame(webViewImpl->page()->mainFrame())->loader().load( |
| 5909 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 5910 item.get(), UseProtocolCachePolicy)), |
| 5911 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); |
5909 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 5912 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
5910 } | 5913 } |
5911 | 5914 |
5912 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 5915 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
5913 public: | 5916 public: |
5914 TestHistoryWebFrameClient() | 5917 TestHistoryWebFrameClient() |
5915 { | 5918 { |
5916 m_replacesCurrentHistoryItem = false; | 5919 m_replacesCurrentHistoryItem = false; |
5917 m_frame = nullptr; | 5920 m_frame = nullptr; |
5918 } | 5921 } |
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7405 | 7408 |
7406 EXPECT_EQ(parent, firstFrame->parent()); | 7409 EXPECT_EQ(parent, firstFrame->parent()); |
7407 EXPECT_EQ(parent, secondFrame->parent()); | 7410 EXPECT_EQ(parent, secondFrame->parent()); |
7408 EXPECT_EQ(parent, thirdFrame->parent()); | 7411 EXPECT_EQ(parent, thirdFrame->parent()); |
7409 EXPECT_EQ(parent, fourthFrame->parent()); | 7412 EXPECT_EQ(parent, fourthFrame->parent()); |
7410 | 7413 |
7411 view->close(); | 7414 view->close(); |
7412 } | 7415 } |
7413 | 7416 |
7414 } // namespace blink | 7417 } // namespace blink |
OLD | NEW |