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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2702213004: Add security checks to scheduled actions (Closed)
Patch Set: win baseline Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index c13b7b919ecaf60e10933212f232a8481f64116a..8b5457a088ea2b3db8cffef19e0caead3a81556d 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -897,8 +897,15 @@ void Internals::setFormControlStateOfHistoryItem(
DOMWindow* Internals::pagePopupWindow() const {
if (!m_document)
return nullptr;
- if (Page* page = m_document->page())
- return page->chromeClient().pagePopupWindowForTesting();
+ if (Page* page = m_document->page()) {
+ LocalDOMWindow* popup =
+ toLocalDOMWindow(page->chromeClient().pagePopupWindowForTesting());
+ if (popup) {
+ // We need to make the popup same origin so layout tests can access it.
dcheng 2017/02/21 21:15:10 Uhhhh. Wow. Btw, should we be calling updateSecur
+ popup->document()->setSecurityOrigin(m_document->getSecurityOrigin());
+ }
+ return popup;
+ }
return nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698