| 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 5903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5914 , m_willSendRequestCallCount(0) | 5914 , m_willSendRequestCallCount(0) |
| 5915 , m_childFrameCreationCount(0) | 5915 , m_childFrameCreationCount(0) |
| 5916 { | 5916 { |
| 5917 } | 5917 } |
| 5918 | 5918 |
| 5919 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child
Client = client; } | 5919 void setChildWebFrameClient(TestCachePolicyWebFrameClient* client) { m_child
Client = client; } |
| 5920 WebURLRequest::CachePolicy cachePolicy() const { return m_policy; } | 5920 WebURLRequest::CachePolicy cachePolicy() const { return m_policy; } |
| 5921 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } | 5921 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } |
| 5922 int childFrameCreationCount() const { return m_childFrameCreationCount; } | 5922 int childFrameCreationCount() const { return m_childFrameCreationCount; } |
| 5923 | 5923 |
| 5924 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType s
cope, const WebString&, WebSandboxFlags) | 5924 virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType s
cope, const WebString&, WebSandboxFlags, const WebFrameOwnerProperties& frameOwn
erProperties) |
| 5925 { | 5925 { |
| 5926 ASSERT(m_childClient); | 5926 ASSERT(m_childClient); |
| 5927 m_childFrameCreationCount++; | 5927 m_childFrameCreationCount++; |
| 5928 WebFrame* frame = WebLocalFrame::create(scope, m_childClient); | 5928 WebFrame* frame = WebLocalFrame::create(scope, m_childClient); |
| 5929 parent->appendChild(frame); | 5929 parent->appendChild(frame); |
| 5930 return frame; | 5930 return frame; |
| 5931 } | 5931 } |
| 5932 | 5932 |
| 5933 virtual void didStartLoading(bool toDifferentDocument) | 5933 virtual void didStartLoading(bool toDifferentDocument) |
| 5934 { | 5934 { |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6303 // After commit, there is. | 6303 // After commit, there is. |
| 6304 HistoryItem* item = mainFrameLoader.currentItem(); | 6304 HistoryItem* item = mainFrameLoader.currentItem(); |
| 6305 ASSERT_TRUE(item); | 6305 ASSERT_TRUE(item); |
| 6306 EXPECT_EQ(WTF::String(url.data()), item->urlString()); | 6306 EXPECT_EQ(WTF::String(url.data()), item->urlString()); |
| 6307 } | 6307 } |
| 6308 | 6308 |
| 6309 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { | 6309 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { |
| 6310 public: | 6310 public: |
| 6311 FailCreateChildFrame() : m_callCount(0) { } | 6311 FailCreateChildFrame() : m_callCount(0) { } |
| 6312 | 6312 |
| 6313 WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, co
nst WebString& frameName, WebSandboxFlags sandboxFlags) override | 6313 WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, co
nst WebString& frameName, WebSandboxFlags sandboxFlags, const WebFrameOwnerPrope
rties& frameOwnerProperties) override |
| 6314 { | 6314 { |
| 6315 ++m_callCount; | 6315 ++m_callCount; |
| 6316 return 0; | 6316 return 0; |
| 6317 } | 6317 } |
| 6318 | 6318 |
| 6319 int callCount() const { return m_callCount; } | 6319 int callCount() const { return m_callCount; } |
| 6320 | 6320 |
| 6321 private: | 6321 private: |
| 6322 int m_callCount; | 6322 int m_callCount; |
| 6323 }; | 6323 }; |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8070 | 8070 |
| 8071 TEST_F(WebFrameTest, MaxFramesDetach) | 8071 TEST_F(WebFrameTest, MaxFramesDetach) |
| 8072 { | 8072 { |
| 8073 registerMockedHttpURLLoad("max-frames-detach.html"); | 8073 registerMockedHttpURLLoad("max-frames-detach.html"); |
| 8074 FrameTestHelpers::WebViewHelper webViewHelper; | 8074 FrameTestHelpers::WebViewHelper webViewHelper; |
| 8075 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); | 8075 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); |
| 8076 webViewImpl->mainFrameImpl()->collectGarbage(); | 8076 webViewImpl->mainFrameImpl()->collectGarbage(); |
| 8077 } | 8077 } |
| 8078 | 8078 |
| 8079 } // namespace blink | 8079 } // namespace blink |
| OLD | NEW |