Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 793493003: Prepare to replicate sandbox flags for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Second round of dcheng's comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | public/web/WebRemoteFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6604 matching lines...) Expand 10 before | Expand all | Expand 10 after
6615 // doesn't leave behind dangling pointers. 6615 // doesn't leave behind dangling pointers.
6616 TEST_F(WebFrameTest, EmbedderTriggeredDetachWithRemoteMainFrame) 6616 TEST_F(WebFrameTest, EmbedderTriggeredDetachWithRemoteMainFrame)
6617 { 6617 {
6618 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t o 6618 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t o
6619 // write tests with a top-level remote frame. 6619 // write tests with a top-level remote frame.
6620 FrameTestHelpers::TestWebViewClient viewClient; 6620 FrameTestHelpers::TestWebViewClient viewClient;
6621 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; 6621 FrameTestHelpers::TestWebRemoteFrameClient remoteClient;
6622 WebView* view = WebView::create(&viewClient); 6622 WebView* view = WebView::create(&viewClient);
6623 view->setMainFrame(WebRemoteFrame::create(&remoteClient)); 6623 view->setMainFrame(WebRemoteFrame::create(&remoteClient));
6624 FrameTestHelpers::TestWebFrameClient childFrameClient; 6624 FrameTestHelpers::TestWebFrameClient childFrameClient;
6625 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc alChild("", &childFrameClient); 6625 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc alChild("", WebSandboxFlags::None, &childFrameClient);
6626 6626
6627 // Purposely keep the LocalFrame alive so it's the last thing to be destroye d. 6627 // Purposely keep the LocalFrame alive so it's the last thing to be destroye d.
6628 RefPtrWillBePersistent<Frame> childCoreFrame = toCoreFrame(childFrame); 6628 RefPtrWillBePersistent<Frame> childCoreFrame = toCoreFrame(childFrame);
6629 view->close(); 6629 view->close();
6630 childCoreFrame.clear(); 6630 childCoreFrame.clear();
6631 } 6631 }
6632 6632
6633 class WebFrameSwapTest : public WebFrameTest { 6633 class WebFrameSwapTest : public WebFrameTest {
6634 protected: 6634 protected:
6635 WebFrameSwapTest() 6635 WebFrameSwapTest()
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
6964 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6964 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6965 6965
6966 // Neither should a page reload. 6966 // Neither should a page reload.
6967 localFrame->reload(); 6967 localFrame->reload();
6968 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6968 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6969 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6969 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6970 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6970 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6971 } 6971 }
6972 6972
6973 } // namespace 6973 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebRemoteFrameImpl.cpp ('k') | public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698