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 6605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6616 // doesn't leave behind dangling pointers. | 6616 // doesn't leave behind dangling pointers. |
6617 TEST_F(WebFrameTest, EmbedderTriggeredDetachWithRemoteMainFrame) | 6617 TEST_F(WebFrameTest, EmbedderTriggeredDetachWithRemoteMainFrame) |
6618 { | 6618 { |
6619 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t
o | 6619 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t
o |
6620 // write tests with a top-level remote frame. | 6620 // write tests with a top-level remote frame. |
6621 FrameTestHelpers::TestWebViewClient viewClient; | 6621 FrameTestHelpers::TestWebViewClient viewClient; |
6622 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; | 6622 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; |
6623 WebView* view = WebView::create(&viewClient); | 6623 WebView* view = WebView::create(&viewClient); |
6624 view->setMainFrame(WebRemoteFrame::create(&remoteClient)); | 6624 view->setMainFrame(WebRemoteFrame::create(&remoteClient)); |
6625 FrameTestHelpers::TestWebFrameClient childFrameClient; | 6625 FrameTestHelpers::TestWebFrameClient childFrameClient; |
6626 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc
alChild("", &childFrameClient); | 6626 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc
alChild("", WebSandboxNone, &childFrameClient); |
6627 | 6627 |
6628 // Purposely keep the LocalFrame alive so it's the last thing to be destroye
d. | 6628 // Purposely keep the LocalFrame alive so it's the last thing to be destroye
d. |
6629 RefPtrWillBePersistent<Frame> childCoreFrame = toCoreFrame(childFrame); | 6629 RefPtrWillBePersistent<Frame> childCoreFrame = toCoreFrame(childFrame); |
6630 view->close(); | 6630 view->close(); |
6631 childCoreFrame.clear(); | 6631 childCoreFrame.clear(); |
6632 } | 6632 } |
6633 | 6633 |
6634 class WebFrameSwapTest : public WebFrameTest { | 6634 class WebFrameSwapTest : public WebFrameTest { |
6635 protected: | 6635 protected: |
6636 WebFrameSwapTest() | 6636 WebFrameSwapTest() |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6924 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6924 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6925 | 6925 |
6926 // Neither should a page reload. | 6926 // Neither should a page reload. |
6927 localFrame->reload(); | 6927 localFrame->reload(); |
6928 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6928 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
6929 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6929 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
6930 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6930 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6931 } | 6931 } |
6932 | 6932 |
6933 } // namespace | 6933 } // namespace |
OLD | NEW |