| 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 5690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5701 , m_willSendRequestCallCount(0) | 5701 , m_willSendRequestCallCount(0) |
| 5702 , m_childFrameCreationCount(0) | 5702 , m_childFrameCreationCount(0) |
| 5703 { | 5703 { |
| 5704 } | 5704 } |
| 5705 | 5705 |
| 5706 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child
Client = client; } | 5706 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child
Client = client; } |
| 5707 WebURLRequest::CachePolicy cachePolicy() const { return m_policy; } | 5707 WebURLRequest::CachePolicy cachePolicy() const { return m_policy; } |
| 5708 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } | 5708 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } |
| 5709 int childFrameCreationCount() const { return m_childFrameCreationCount; } | 5709 int childFrameCreationCount() const { return m_childFrameCreationCount; } |
| 5710 | 5710 |
| 5711 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString&) | 5711 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString&,
WebSandboxFlags) |
| 5712 { | 5712 { |
| 5713 ASSERT(m_childClient); | 5713 ASSERT(m_childClient); |
| 5714 m_childFrameCreationCount++; | 5714 m_childFrameCreationCount++; |
| 5715 WebFrame* frame = WebLocalFrame::create(m_childClient); | 5715 WebFrame* frame = WebLocalFrame::create(m_childClient); |
| 5716 parent->appendChild(frame); | 5716 parent->appendChild(frame); |
| 5717 return frame; | 5717 return frame; |
| 5718 } | 5718 } |
| 5719 | 5719 |
| 5720 virtual void didStartLoading(bool toDifferentDocument) | 5720 virtual void didStartLoading(bool toDifferentDocument) |
| 5721 { | 5721 { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6072 // After commit, there is. | 6072 // After commit, there is. |
| 6073 HistoryItem* item = mainFrameLoader.currentItem(); | 6073 HistoryItem* item = mainFrameLoader.currentItem(); |
| 6074 ASSERT_TRUE(item); | 6074 ASSERT_TRUE(item); |
| 6075 EXPECT_EQ(WTF::String(url.data()), item->urlString()); | 6075 EXPECT_EQ(WTF::String(url.data()), item->urlString()); |
| 6076 } | 6076 } |
| 6077 | 6077 |
| 6078 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { | 6078 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { |
| 6079 public: | 6079 public: |
| 6080 FailCreateChildFrame() : m_callCount(0) { } | 6080 FailCreateChildFrame() : m_callCount(0) { } |
| 6081 | 6081 |
| 6082 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& f
rameName) override | 6082 virtual WebFrame* createChildFrame(WebLocalFrame* parent, const WebString& f
rameName, WebSandboxFlags sandboxFlags) override |
| 6083 { | 6083 { |
| 6084 ++m_callCount; | 6084 ++m_callCount; |
| 6085 return 0; | 6085 return 0; |
| 6086 } | 6086 } |
| 6087 | 6087 |
| 6088 int callCount() const { return m_callCount; } | 6088 int callCount() const { return m_callCount; } |
| 6089 | 6089 |
| 6090 private: | 6090 private: |
| 6091 int m_callCount; | 6091 int m_callCount; |
| 6092 }; | 6092 }; |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7006 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7006 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7007 | 7007 |
| 7008 // Neither should a page reload. | 7008 // Neither should a page reload. |
| 7009 localFrame->reload(); | 7009 localFrame->reload(); |
| 7010 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 7010 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 7011 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 7011 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 7012 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7012 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7013 } | 7013 } |
| 7014 | 7014 |
| 7015 } // namespace | 7015 } // namespace |
| OLD | NEW |