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 7775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7786 EXPECT_EQ(fourthFrame, parent->lastChild()); | 7786 EXPECT_EQ(fourthFrame, parent->lastChild()); |
7787 | 7787 |
7788 EXPECT_EQ(parent, firstFrame->parent()); | 7788 EXPECT_EQ(parent, firstFrame->parent()); |
7789 EXPECT_EQ(parent, secondFrame->parent()); | 7789 EXPECT_EQ(parent, secondFrame->parent()); |
7790 EXPECT_EQ(parent, thirdFrame->parent()); | 7790 EXPECT_EQ(parent, thirdFrame->parent()); |
7791 EXPECT_EQ(parent, fourthFrame->parent()); | 7791 EXPECT_EQ(parent, fourthFrame->parent()); |
7792 | 7792 |
7793 view->close(); | 7793 view->close(); |
7794 } | 7794 } |
7795 | 7795 |
| 7796 TEST_P(ParameterizedWebFrameTest, SendBeaconFromChildWithRemoteMainFrame) |
| 7797 { |
| 7798 FrameTestHelpers::TestWebViewClient viewClient; |
| 7799 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; |
| 7800 WebView* view = WebView::create(&viewClient); |
| 7801 view->settings()->setJavaScriptEnabled(true); |
| 7802 view->setMainFrame(remoteClient.frame()); |
| 7803 WebRemoteFrame* root = view->mainFrame()->toWebRemoteFrame(); |
| 7804 root->setReplicatedOrigin(SecurityOrigin::createUnique()); |
| 7805 |
| 7806 FrameTestHelpers::TestWebFrameClient localFrameClient; |
| 7807 WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Documen
t, "", WebSandboxFlags::None, &localFrameClient, nullptr); |
| 7808 |
| 7809 // Finally, make sure an embedder triggered load in the local frame swapped |
| 7810 // back in works. |
| 7811 registerMockedHttpURLLoad("send_beacon.html"); |
| 7812 registerMockedHttpURLLoad("reload_post.html"); // url param to sendBeacon() |
| 7813 FrameTestHelpers::loadFrame(localFrame, m_baseURL + "send_beacon.html"); |
| 7814 |
| 7815 view->close(); |
| 7816 } |
| 7817 |
7796 class OverscrollWebViewClient : public FrameTestHelpers::TestWebViewClient { | 7818 class OverscrollWebViewClient : public FrameTestHelpers::TestWebViewClient { |
7797 public: | 7819 public: |
7798 MOCK_METHOD4(didOverscroll, void(const WebFloatSize&, const WebFloatSize&, c
onst WebFloatPoint&, const WebFloatSize&)); | 7820 MOCK_METHOD4(didOverscroll, void(const WebFloatSize&, const WebFloatSize&, c
onst WebFloatPoint&, const WebFloatSize&)); |
7799 }; | 7821 }; |
7800 | 7822 |
7801 class WebFrameOverscrollTest : public WebFrameTest { | 7823 class WebFrameOverscrollTest : public WebFrameTest { |
7802 protected: | 7824 protected: |
7803 WebGestureEvent generateEvent(WebInputEvent::Type type, float deltaX = 0.0,
float deltaY = 0.0) | 7825 WebGestureEvent generateEvent(WebInputEvent::Type type, float deltaX = 0.0,
float deltaY = 0.0) |
7804 { | 7826 { |
7805 WebGestureEvent event; | 7827 WebGestureEvent event; |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8070 | 8092 |
8071 TEST_F(WebFrameTest, MaxFramesDetach) | 8093 TEST_F(WebFrameTest, MaxFramesDetach) |
8072 { | 8094 { |
8073 registerMockedHttpURLLoad("max-frames-detach.html"); | 8095 registerMockedHttpURLLoad("max-frames-detach.html"); |
8074 FrameTestHelpers::WebViewHelper webViewHelper; | 8096 FrameTestHelpers::WebViewHelper webViewHelper; |
8075 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); | 8097 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "max-
frames-detach.html", true); |
8076 webViewImpl->mainFrameImpl()->collectGarbage(); | 8098 webViewImpl->mainFrameImpl()->collectGarbage(); |
8077 } | 8099 } |
8078 | 8100 |
8079 } // namespace blink | 8101 } // namespace blink |
OLD | NEW |