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

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

Issue 640813003: Oilpan: fix build after r183834. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | 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 6501 matching lines...) Expand 10 before | Expand all | Expand 10 after
6512 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t o 6512 // FIXME: Refactor some of this logic into WebViewHelper to make it easier t o
6513 // write tests with a top-level remote frame. 6513 // write tests with a top-level remote frame.
6514 FrameTestHelpers::TestWebViewClient viewClient; 6514 FrameTestHelpers::TestWebViewClient viewClient;
6515 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; 6515 FrameTestHelpers::TestWebRemoteFrameClient remoteClient;
6516 WebView* view = WebView::create(&viewClient); 6516 WebView* view = WebView::create(&viewClient);
6517 view->setMainFrame(WebRemoteFrame::create(&remoteClient)); 6517 view->setMainFrame(WebRemoteFrame::create(&remoteClient));
6518 FrameTestHelpers::TestWebFrameClient childFrameClient; 6518 FrameTestHelpers::TestWebFrameClient childFrameClient;
6519 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc alChild("", &childFrameClient); 6519 WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLoc alChild("", &childFrameClient);
6520 6520
6521 // Purposely keep the LocalFrame alive so it's the last thing to be destroye d. 6521 // Purposely keep the LocalFrame alive so it's the last thing to be destroye d.
6522 RefPtr<Frame> childCoreFrame = toCoreFrame(childFrame); 6522 RefPtrWillBePersistent<Frame> childCoreFrame = toCoreFrame(childFrame);
dcheng 2014/10/16 21:25:42 Why not RefPtrWillBeRaw? This is a stack pointer.
haraken 2014/10/16 23:19:10 In this case RefPtrWillBeRawPtr is fine, but we pr
6523 view->close(); 6523 view->close();
6524 childCoreFrame.clear(); 6524 childCoreFrame.clear();
6525 } 6525 }
6526 6526
6527 class WebFrameSwapTest : public WebFrameTest { 6527 class WebFrameSwapTest : public WebFrameTest {
6528 protected: 6528 protected:
6529 WebFrameSwapTest() 6529 WebFrameSwapTest()
6530 { 6530 {
6531 registerMockedHttpURLLoad("frame-a-b-c.html"); 6531 registerMockedHttpURLLoad("frame-a-b-c.html");
6532 registerMockedHttpURLLoad("subframe-a.html"); 6532 registerMockedHttpURLLoad("subframe-a.html");
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
6801 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6801 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6802 6802
6803 // Neither should a page reload. 6803 // Neither should a page reload.
6804 localFrame->reload(); 6804 localFrame->reload();
6805 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6805 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6806 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6806 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6807 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6807 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6808 } 6808 }
6809 6809
6810 } // namespace 6810 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698