| 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 7151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7162 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 7162 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
| 7163 } | 7163 } |
| 7164 | 7164 |
| 7165 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 7165 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 7166 public: | 7166 public: |
| 7167 TestHistoryWebFrameClient() { | 7167 TestHistoryWebFrameClient() { |
| 7168 m_replacesCurrentHistoryItem = false; | 7168 m_replacesCurrentHistoryItem = false; |
| 7169 m_frame = nullptr; | 7169 m_frame = nullptr; |
| 7170 } | 7170 } |
| 7171 | 7171 |
| 7172 void didStartProvisionalLoad(WebLocalFrame* frame, double) { | 7172 void didStartProvisionalLoad(WebLocalFrame* frame) { |
| 7173 WebDataSource* ds = frame->provisionalDataSource(); | 7173 WebDataSource* ds = frame->provisionalDataSource(); |
| 7174 m_replacesCurrentHistoryItem = ds->replacesCurrentHistoryItem(); | 7174 m_replacesCurrentHistoryItem = ds->replacesCurrentHistoryItem(); |
| 7175 m_frame = frame; | 7175 m_frame = frame; |
| 7176 } | 7176 } |
| 7177 | 7177 |
| 7178 bool replacesCurrentHistoryItem() { return m_replacesCurrentHistoryItem; } | 7178 bool replacesCurrentHistoryItem() { return m_replacesCurrentHistoryItem; } |
| 7179 WebFrame* frame() { return m_frame; } | 7179 WebFrame* frame() { return m_frame; } |
| 7180 | 7180 |
| 7181 private: | 7181 private: |
| 7182 bool m_replacesCurrentHistoryItem; | 7182 bool m_replacesCurrentHistoryItem; |
| (...skipping 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9742 | 9742 |
| 9743 class CallbackOrderingWebFrameClient | 9743 class CallbackOrderingWebFrameClient |
| 9744 : public FrameTestHelpers::TestWebFrameClient { | 9744 : public FrameTestHelpers::TestWebFrameClient { |
| 9745 public: | 9745 public: |
| 9746 CallbackOrderingWebFrameClient() : m_callbackCount(0) {} | 9746 CallbackOrderingWebFrameClient() : m_callbackCount(0) {} |
| 9747 | 9747 |
| 9748 void didStartLoading(bool toDifferentDocument) override { | 9748 void didStartLoading(bool toDifferentDocument) override { |
| 9749 EXPECT_EQ(0, m_callbackCount++); | 9749 EXPECT_EQ(0, m_callbackCount++); |
| 9750 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocument); | 9750 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocument); |
| 9751 } | 9751 } |
| 9752 void didStartProvisionalLoad(WebLocalFrame*, double) override { | 9752 void didStartProvisionalLoad(WebLocalFrame*) override { |
| 9753 EXPECT_EQ(1, m_callbackCount++); | 9753 EXPECT_EQ(1, m_callbackCount++); |
| 9754 } | 9754 } |
| 9755 void didCommitProvisionalLoad(WebLocalFrame*, | 9755 void didCommitProvisionalLoad(WebLocalFrame*, |
| 9756 const WebHistoryItem&, | 9756 const WebHistoryItem&, |
| 9757 WebHistoryCommitType) override { | 9757 WebHistoryCommitType) override { |
| 9758 EXPECT_EQ(2, m_callbackCount++); | 9758 EXPECT_EQ(2, m_callbackCount++); |
| 9759 } | 9759 } |
| 9760 void didFinishDocumentLoad(WebLocalFrame*) override { | 9760 void didFinishDocumentLoad(WebLocalFrame*) override { |
| 9761 EXPECT_EQ(3, m_callbackCount++); | 9761 EXPECT_EQ(3, m_callbackCount++); |
| 9762 } | 9762 } |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10353 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); | 10353 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); |
| 10354 HashSet<AtomicString> names; | 10354 HashSet<AtomicString> names; |
| 10355 for (Frame* frame = mainFrame->tree().firstChild(); frame; | 10355 for (Frame* frame = mainFrame->tree().firstChild(); frame; |
| 10356 frame = frame->tree().traverseNext()) { | 10356 frame = frame->tree().traverseNext()) { |
| 10357 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); | 10357 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); |
| 10358 } | 10358 } |
| 10359 EXPECT_EQ(10u, names.size()); | 10359 EXPECT_EQ(10u, names.size()); |
| 10360 } | 10360 } |
| 10361 | 10361 |
| 10362 } // namespace blink | 10362 } // namespace blink |
| OLD | NEW |