| 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 7228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7239 WebCachePolicy GetCachePolicy() const { return policy_; } | 7239 WebCachePolicy GetCachePolicy() const { return policy_; } |
| 7240 int WillSendRequestCallCount() const { return will_send_request_call_count_; } | 7240 int WillSendRequestCallCount() const { return will_send_request_call_count_; } |
| 7241 int ChildFrameCreationCount() const { return child_frame_creation_count_; } | 7241 int ChildFrameCreationCount() const { return child_frame_creation_count_; } |
| 7242 | 7242 |
| 7243 WebLocalFrame* CreateChildFrame( | 7243 WebLocalFrame* CreateChildFrame( |
| 7244 WebLocalFrame* parent, | 7244 WebLocalFrame* parent, |
| 7245 WebTreeScopeType scope, | 7245 WebTreeScopeType scope, |
| 7246 const WebString&, | 7246 const WebString&, |
| 7247 const WebString&, | 7247 const WebString&, |
| 7248 WebSandboxFlags, | 7248 WebSandboxFlags, |
| 7249 const WebParsedFeaturePolicy&, |
| 7249 const WebFrameOwnerProperties& frame_owner_properties) override { | 7250 const WebFrameOwnerProperties& frame_owner_properties) override { |
| 7250 DCHECK(child_client_); | 7251 DCHECK(child_client_); |
| 7251 child_frame_creation_count_++; | 7252 child_frame_creation_count_++; |
| 7252 WebLocalFrame* frame = | 7253 WebLocalFrame* frame = |
| 7253 WebLocalFrame::Create(scope, child_client_, nullptr, nullptr); | 7254 WebLocalFrame::Create(scope, child_client_, nullptr, nullptr); |
| 7254 parent->AppendChild(frame); | 7255 parent->AppendChild(frame); |
| 7255 return frame; | 7256 return frame; |
| 7256 } | 7257 } |
| 7257 | 7258 |
| 7258 virtual void DidStartLoading(bool to_different_document) { | 7259 virtual void DidStartLoading(bool to_different_document) { |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7649 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { | 7650 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { |
| 7650 public: | 7651 public: |
| 7651 FailCreateChildFrame() : call_count_(0) {} | 7652 FailCreateChildFrame() : call_count_(0) {} |
| 7652 | 7653 |
| 7653 WebLocalFrame* CreateChildFrame( | 7654 WebLocalFrame* CreateChildFrame( |
| 7654 WebLocalFrame* parent, | 7655 WebLocalFrame* parent, |
| 7655 WebTreeScopeType scope, | 7656 WebTreeScopeType scope, |
| 7656 const WebString& name, | 7657 const WebString& name, |
| 7657 const WebString& fallback_name, | 7658 const WebString& fallback_name, |
| 7658 WebSandboxFlags sandbox_flags, | 7659 WebSandboxFlags sandbox_flags, |
| 7660 const WebParsedFeaturePolicy& container_policy, |
| 7659 const WebFrameOwnerProperties& frame_owner_properties) override { | 7661 const WebFrameOwnerProperties& frame_owner_properties) override { |
| 7660 ++call_count_; | 7662 ++call_count_; |
| 7661 return nullptr; | 7663 return nullptr; |
| 7662 } | 7664 } |
| 7663 | 7665 |
| 7664 int CallCount() const { return call_count_; } | 7666 int CallCount() const { return call_count_; } |
| 7665 | 7667 |
| 7666 private: | 7668 private: |
| 7667 int call_count_; | 7669 int call_count_; |
| 7668 }; | 7670 }; |
| (...skipping 3990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11659 | 11661 |
| 11660 private: | 11662 private: |
| 11661 bool did_call_frame_detached_ = false; | 11663 bool did_call_frame_detached_ = false; |
| 11662 bool did_call_did_stop_loading_ = false; | 11664 bool did_call_did_stop_loading_ = false; |
| 11663 bool did_call_did_finish_document_load_ = false; | 11665 bool did_call_did_finish_document_load_ = false; |
| 11664 bool did_call_did_handle_onload_events_ = false; | 11666 bool did_call_did_handle_onload_events_ = false; |
| 11665 }; | 11667 }; |
| 11666 | 11668 |
| 11667 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { | 11669 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 11668 public: | 11670 public: |
| 11669 WebLocalFrame* CreateChildFrame(WebLocalFrame* parent, | 11671 WebLocalFrame* CreateChildFrame( |
| 11670 WebTreeScopeType scope, | 11672 WebLocalFrame* parent, |
| 11671 const WebString& name, | 11673 WebTreeScopeType scope, |
| 11672 const WebString& fallback_name, | 11674 const WebString& name, |
| 11673 WebSandboxFlags sandbox_flags, | 11675 const WebString& fallback_name, |
| 11674 const WebFrameOwnerProperties&) override { | 11676 WebSandboxFlags sandbox_flags, |
| 11677 const WebParsedFeaturePolicy& container_policy, |
| 11678 const WebFrameOwnerProperties&) override { |
| 11675 WebLocalFrame* frame = | 11679 WebLocalFrame* frame = |
| 11676 WebLocalFrame::Create(scope, &child_client_, nullptr, nullptr); | 11680 WebLocalFrame::Create(scope, &child_client_, nullptr, nullptr); |
| 11677 parent->AppendChild(frame); | 11681 parent->AppendChild(frame); |
| 11678 return frame; | 11682 return frame; |
| 11679 } | 11683 } |
| 11680 | 11684 |
| 11681 LoadingObserverFrameClient& ChildClient() { return child_client_; } | 11685 LoadingObserverFrameClient& ChildClient() { return child_client_; } |
| 11682 | 11686 |
| 11683 private: | 11687 private: |
| 11684 LoadingObserverFrameClient child_client_; | 11688 LoadingObserverFrameClient child_client_; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11853 FrameTestHelpers::LoadFrame(local_frame, "data:text/html,some page"); | 11857 FrameTestHelpers::LoadFrame(local_frame, "data:text/html,some page"); |
| 11854 | 11858 |
| 11855 // Local frame with remote parent should have transparent baseBackgroundColor. | 11859 // Local frame with remote parent should have transparent baseBackgroundColor. |
| 11856 Color color = local_frame->GetFrameView()->BaseBackgroundColor(); | 11860 Color color = local_frame->GetFrameView()->BaseBackgroundColor(); |
| 11857 EXPECT_EQ(Color::kTransparent, color); | 11861 EXPECT_EQ(Color::kTransparent, color); |
| 11858 | 11862 |
| 11859 view->Close(); | 11863 view->Close(); |
| 11860 } | 11864 } |
| 11861 | 11865 |
| 11862 } // namespace blink | 11866 } // namespace blink |
| OLD | NEW |