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

Side by Side Diff: Source/core/testing/MockPagePopupDriver.cpp

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 years, 6 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/core/svg/graphics/SVGImage.cpp ('k') | Source/platform/exported/WebURLRequest.cpp » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 bool MockPagePopup::initialize() 74 bool MockPagePopup::initialize()
75 { 75 {
76 const char scriptToSetUpPagePopupController[] = "<script>window.pagePopupCon troller = parent.internals.pagePopupController;</script>"; 76 const char scriptToSetUpPagePopupController[] = "<script>window.pagePopupCon troller = parent.internals.pagePopupController;</script>";
77 RefPtr<SharedBuffer> data = SharedBuffer::create(scriptToSetUpPagePopupContr oller, sizeof(scriptToSetUpPagePopupController)); 77 RefPtr<SharedBuffer> data = SharedBuffer::create(scriptToSetUpPagePopupContr oller, sizeof(scriptToSetUpPagePopupController));
78 m_popupClient->writeDocument(data.get()); 78 m_popupClient->writeDocument(data.get());
79 LocalFrame* localFrame = toLocalFrame(m_iframe->contentFrame()); 79 LocalFrame* localFrame = toLocalFrame(m_iframe->contentFrame());
80 if (!localFrame) 80 if (!localFrame)
81 return false; 81 return false;
82 localFrame->loader().load(FrameLoadRequest(0, blankURL(), SubstituteData(dat a, "text/html", "UTF-8", KURL(), ForceSynchronousLoad))); 82 ResourceRequest request = ResourceRequest(blankURL(), localFrame->isMainFram e());
83 localFrame->loader().load(FrameLoadRequest(0, request, SubstituteData(data, "text/html", "UTF-8", KURL(), ForceSynchronousLoad)));
83 return true; 84 return true;
84 } 85 }
85 86
86 PassRefPtr<MockPagePopup> MockPagePopup::create(PagePopupClient* client, const I ntRect& originBoundsInRootView, LocalFrame* mainFrame) 87 PassRefPtr<MockPagePopup> MockPagePopup::create(PagePopupClient* client, const I ntRect& originBoundsInRootView, LocalFrame* mainFrame)
87 { 88 {
88 return adoptRef(new MockPagePopup(client, originBoundsInRootView, mainFrame) ); 89 return adoptRef(new MockPagePopup(client, originBoundsInRootView, mainFrame) );
89 } 90 }
90 91
91 void MockPagePopup::closeLater() 92 void MockPagePopup::closeLater()
92 { 93 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 { 144 {
144 if (!popup || popup != m_mockPagePopup.get()) 145 if (!popup || popup != m_mockPagePopup.get())
145 return; 146 return;
146 m_mockPagePopup->closeLater(); 147 m_mockPagePopup->closeLater();
147 m_mockPagePopup.clear(); 148 m_mockPagePopup.clear();
148 m_pagePopupController->clearPagePopupClient(); 149 m_pagePopupController->clearPagePopupClient();
149 m_pagePopupController.clear(); 150 m_pagePopupController.clear();
150 } 151 }
151 152
152 } 153 }
OLDNEW
« no previous file with comments | « Source/core/svg/graphics/SVGImage.cpp ('k') | Source/platform/exported/WebURLRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698