| 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 7082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7093 WebCachePolicy getCachePolicy() const { return m_policy; } | 7093 WebCachePolicy getCachePolicy() const { return m_policy; } |
| 7094 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } | 7094 int willSendRequestCallCount() const { return m_willSendRequestCallCount; } |
| 7095 int childFrameCreationCount() const { return m_childFrameCreationCount; } | 7095 int childFrameCreationCount() const { return m_childFrameCreationCount; } |
| 7096 | 7096 |
| 7097 WebLocalFrame* createChildFrame( | 7097 WebLocalFrame* createChildFrame( |
| 7098 WebLocalFrame* parent, | 7098 WebLocalFrame* parent, |
| 7099 WebTreeScopeType scope, | 7099 WebTreeScopeType scope, |
| 7100 const WebString&, | 7100 const WebString&, |
| 7101 const WebString&, | 7101 const WebString&, |
| 7102 WebSandboxFlags, | 7102 WebSandboxFlags, |
| 7103 const WebParsedFeaturePolicy&, |
| 7103 const WebFrameOwnerProperties& frameOwnerProperties) override { | 7104 const WebFrameOwnerProperties& frameOwnerProperties) override { |
| 7104 DCHECK(m_childClient); | 7105 DCHECK(m_childClient); |
| 7105 m_childFrameCreationCount++; | 7106 m_childFrameCreationCount++; |
| 7106 WebLocalFrame* frame = | 7107 WebLocalFrame* frame = |
| 7107 WebLocalFrame::create(scope, m_childClient, nullptr, nullptr); | 7108 WebLocalFrame::create(scope, m_childClient, nullptr, nullptr); |
| 7108 parent->appendChild(frame); | 7109 parent->appendChild(frame); |
| 7109 return frame; | 7110 return frame; |
| 7110 } | 7111 } |
| 7111 | 7112 |
| 7112 virtual void didStartLoading(bool toDifferentDocument) { | 7113 virtual void didStartLoading(bool toDifferentDocument) { |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7499 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { | 7500 class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient { |
| 7500 public: | 7501 public: |
| 7501 FailCreateChildFrame() : m_callCount(0) {} | 7502 FailCreateChildFrame() : m_callCount(0) {} |
| 7502 | 7503 |
| 7503 WebLocalFrame* createChildFrame( | 7504 WebLocalFrame* createChildFrame( |
| 7504 WebLocalFrame* parent, | 7505 WebLocalFrame* parent, |
| 7505 WebTreeScopeType scope, | 7506 WebTreeScopeType scope, |
| 7506 const WebString& name, | 7507 const WebString& name, |
| 7507 const WebString& fallbackName, | 7508 const WebString& fallbackName, |
| 7508 WebSandboxFlags sandboxFlags, | 7509 WebSandboxFlags sandboxFlags, |
| 7510 const WebParsedFeaturePolicy& containerPolicy, |
| 7509 const WebFrameOwnerProperties& frameOwnerProperties) override { | 7511 const WebFrameOwnerProperties& frameOwnerProperties) override { |
| 7510 ++m_callCount; | 7512 ++m_callCount; |
| 7511 return nullptr; | 7513 return nullptr; |
| 7512 } | 7514 } |
| 7513 | 7515 |
| 7514 int callCount() const { return m_callCount; } | 7516 int callCount() const { return m_callCount; } |
| 7515 | 7517 |
| 7516 private: | 7518 private: |
| 7517 int m_callCount; | 7519 int m_callCount; |
| 7518 }; | 7520 }; |
| (...skipping 3841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11360 | 11362 |
| 11361 private: | 11363 private: |
| 11362 bool m_didCallFrameDetached = false; | 11364 bool m_didCallFrameDetached = false; |
| 11363 bool m_didCallDidStopLoading = false; | 11365 bool m_didCallDidStopLoading = false; |
| 11364 bool m_didCallDidFinishDocumentLoad = false; | 11366 bool m_didCallDidFinishDocumentLoad = false; |
| 11365 bool m_didCallDidHandleOnloadEvents = false; | 11367 bool m_didCallDidHandleOnloadEvents = false; |
| 11366 }; | 11368 }; |
| 11367 | 11369 |
| 11368 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { | 11370 class MainFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 11369 public: | 11371 public: |
| 11370 WebLocalFrame* createChildFrame(WebLocalFrame* parent, | 11372 WebLocalFrame* createChildFrame( |
| 11371 WebTreeScopeType scope, | 11373 WebLocalFrame* parent, |
| 11372 const WebString& name, | 11374 WebTreeScopeType scope, |
| 11373 const WebString& fallbackName, | 11375 const WebString& name, |
| 11374 WebSandboxFlags sandboxFlags, | 11376 const WebString& fallbackName, |
| 11375 const WebFrameOwnerProperties&) override { | 11377 WebSandboxFlags sandboxFlags, |
| 11378 const WebParsedFeaturePolicy& containerPolicy, |
| 11379 const WebFrameOwnerProperties&) override { |
| 11376 WebLocalFrame* frame = | 11380 WebLocalFrame* frame = |
| 11377 WebLocalFrame::create(scope, &m_childClient, nullptr, nullptr); | 11381 WebLocalFrame::create(scope, &m_childClient, nullptr, nullptr); |
| 11378 parent->appendChild(frame); | 11382 parent->appendChild(frame); |
| 11379 return frame; | 11383 return frame; |
| 11380 } | 11384 } |
| 11381 | 11385 |
| 11382 LoadingObserverFrameClient& childClient() { return m_childClient; } | 11386 LoadingObserverFrameClient& childClient() { return m_childClient; } |
| 11383 | 11387 |
| 11384 private: | 11388 private: |
| 11385 LoadingObserverFrameClient m_childClient; | 11389 LoadingObserverFrameClient m_childClient; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11524 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); | 11528 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); |
| 11525 | 11529 |
| 11526 // Local frame with remote parent should have transparent baseBackgroundColor. | 11530 // Local frame with remote parent should have transparent baseBackgroundColor. |
| 11527 Color color = localFrame->frameView()->baseBackgroundColor(); | 11531 Color color = localFrame->frameView()->baseBackgroundColor(); |
| 11528 EXPECT_EQ(Color::transparent, color); | 11532 EXPECT_EQ(Color::transparent, color); |
| 11529 | 11533 |
| 11530 view->close(); | 11534 view->close(); |
| 11531 } | 11535 } |
| 11532 | 11536 |
| 11533 } // namespace blink | 11537 } // namespace blink |
| OLD | NEW |