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

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

Issue 243173004: Make window.screen property non replaceable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix clang error Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index e21dde42bad0d5c76827adbe32bfa4ee358764dd..37b78e627289e9398481ac61ee434517fea4a0b6 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -82,6 +82,7 @@
#include "core/frame/DOMWindow.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/Screen.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLContentElement.h"
#include "core/html/HTMLIFrameElement.h"
@@ -186,6 +187,7 @@ void Internals::resetToConsistentState(Page* page)
page->setPageScaleFactor(1, IntPoint(0, 0));
TextRun::setAllowsRoundingHacks(false);
WebCore::overrideUserPreferredLanguages(Vector<AtomicString>());
+ Screen::clearOverrideScreenData();
delete s_pagePopupDriver;
s_pagePopupDriver = 0;
page->chrome().client().resetPagePopupDriver();
@@ -2437,4 +2439,9 @@ String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
return surroundingText.content();
}
+void Internals::setOverrideScreenData(const Dictionary& overrideData)
+{
+ Screen::setOverrideScreenData(overrideData);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698