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

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

Issue 1046953003: Add the WebHistoryCommitType to didFailProvisionalLoad, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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/WebLocalFrameImpl.cpp ('k') | public/web/WebFrameClient.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 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after
4647 EXPECT_FALSE(client.triggered()); 4647 EXPECT_FALSE(client.triggered());
4648 } 4648 }
4649 4649
4650 class TestSubstituteDataWebFrameClient : public FrameTestHelpers::TestWebFrameCl ient { 4650 class TestSubstituteDataWebFrameClient : public FrameTestHelpers::TestWebFrameCl ient {
4651 public: 4651 public:
4652 TestSubstituteDataWebFrameClient() 4652 TestSubstituteDataWebFrameClient()
4653 : m_commitCalled(false) 4653 : m_commitCalled(false)
4654 { 4654 {
4655 } 4655 }
4656 4656
4657 virtual void didFailProvisionalLoad(WebLocalFrame* frame, const WebURLError& error) 4657 virtual void didFailProvisionalLoad(WebLocalFrame* frame, const WebURLError& error, WebHistoryCommitType)
4658 { 4658 {
4659 frame->loadHTMLString("This should appear", toKURL("data:text/html,chrom ewebdata"), error.unreachableURL, true); 4659 frame->loadHTMLString("This should appear", toKURL("data:text/html,chrom ewebdata"), error.unreachableURL, true);
4660 } 4660 }
4661 4661
4662 virtual void didCommitProvisionalLoad(WebLocalFrame* frame, const WebHistory Item&, WebHistoryCommitType) 4662 virtual void didCommitProvisionalLoad(WebLocalFrame* frame, const WebHistory Item&, WebHistoryCommitType)
4663 { 4663 {
4664 if (frame->dataSource()->response().url() != WebURL(URLTestHelpers::toKU RL("about:blank"))) 4664 if (frame->dataSource()->response().url() != WebURL(URLTestHelpers::toKU RL("about:blank")))
4665 m_commitCalled = true; 4665 m_commitCalled = true;
4666 } 4666 }
4667 4667
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
7071 FrameTestHelpers::TestWebRemoteFrameClient remoteClient; 7071 FrameTestHelpers::TestWebRemoteFrameClient remoteClient;
7072 WebView* view = WebView::create(&viewClient); 7072 WebView* view = WebView::create(&viewClient);
7073 view->setMainFrame(WebRemoteFrame::create(&remoteClient)); 7073 view->setMainFrame(WebRemoteFrame::create(&remoteClient));
7074 FrameTestHelpers::TestWebRemoteFrameClient childFrameClient; 7074 FrameTestHelpers::TestWebRemoteFrameClient childFrameClient;
7075 WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRe moteChild("", WebSandboxFlags::None, &childFrameClient); 7075 WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRe moteChild("", WebSandboxFlags::None, &childFrameClient);
7076 childFrame->detach(); 7076 childFrame->detach();
7077 view->close(); 7077 view->close();
7078 } 7078 }
7079 7079
7080 } // namespace blink 7080 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698