| 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 4016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11685 | 11687 |
| 11686 private: | 11688 private: |
| 11687 bool did_call_frame_detached_ = false; | 11689 bool did_call_frame_detached_ = false; |
| 11688 bool did_call_did_stop_loading_ = false; | 11690 bool did_call_did_stop_loading_ = false; |
| 11689 bool did_call_did_finish_document_load_ = false; | 11691 bool did_call_did_finish_document_load_ = false; |
| 11690 bool did_call_did_handle_onload_events_ = false; | 11692 bool did_call_did_handle_onload_events_ = false; |
| 11691 }; | 11693 }; |
| 11692 | 11694 |
| 11693 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { | 11695 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 11694 public: | 11696 public: |
| 11695 WebLocalFrame* CreateChildFrame(WebLocalFrame* parent, | 11697 WebLocalFrame* CreateChildFrame( |
| 11696 WebTreeScopeType scope, | 11698 WebLocalFrame* parent, |
| 11697 const WebString& name, | 11699 WebTreeScopeType scope, |
| 11698 const WebString& fallback_name, | 11700 const WebString& name, |
| 11699 WebSandboxFlags sandbox_flags, | 11701 const WebString& fallback_name, |
| 11700 const WebFrameOwnerProperties&) override { | 11702 WebSandboxFlags sandbox_flags, |
| 11703 const WebParsedFeaturePolicy& container_policy, |
| 11704 const WebFrameOwnerProperties&) override { |
| 11701 WebLocalFrame* frame = | 11705 WebLocalFrame* frame = |
| 11702 WebLocalFrame::Create(scope, &child_client_, nullptr, nullptr); | 11706 WebLocalFrame::Create(scope, &child_client_, nullptr, nullptr); |
| 11703 parent->AppendChild(frame); | 11707 parent->AppendChild(frame); |
| 11704 return frame; | 11708 return frame; |
| 11705 } | 11709 } |
| 11706 | 11710 |
| 11707 LoadingObserverFrameClient& ChildClient() { return child_client_; } | 11711 LoadingObserverFrameClient& ChildClient() { return child_client_; } |
| 11708 | 11712 |
| 11709 private: | 11713 private: |
| 11710 LoadingObserverFrameClient child_client_; | 11714 LoadingObserverFrameClient child_client_; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11879 FrameTestHelpers::LoadFrame(local_frame, "data:text/html,some page"); | 11883 FrameTestHelpers::LoadFrame(local_frame, "data:text/html,some page"); |
| 11880 | 11884 |
| 11881 // Local frame with remote parent should have transparent baseBackgroundColor. | 11885 // Local frame with remote parent should have transparent baseBackgroundColor. |
| 11882 Color color = local_frame->GetFrameView()->BaseBackgroundColor(); | 11886 Color color = local_frame->GetFrameView()->BaseBackgroundColor(); |
| 11883 EXPECT_EQ(Color::kTransparent, color); | 11887 EXPECT_EQ(Color::kTransparent, color); |
| 11884 | 11888 |
| 11885 view->Close(); | 11889 view->Close(); |
| 11886 } | 11890 } |
| 11887 | 11891 |
| 11888 } // namespace blink | 11892 } // namespace blink |
| OLD | NEW |