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

Unified Diff: LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html

Issue 243173004: Make window.screen property non replaceable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Do not add a new Internals API 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: LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html
diff --git a/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html b/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html
index 2be796ec5886b262deb465a17518fc61bd775ec1..719c82a8fb0f4842ebb6e65c4c81079f5d17178c 100644
--- a/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html
+++ b/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html
@@ -26,15 +26,23 @@ function makeRect(x, y, width, height) {
};
}
+function overridePopupWindowScreenObject(w) {
arv (Not doing code reviews) 2014/04/21 19:23:43 You should also be able to do: Object.definePrope
Inactive 2014/04/21 19:51:53 This did not seem to work so I used your other pro
+ delete w.screen['width']
arv (Not doing code reviews) 2014/04/21 19:18:16 delete w.screen.width;
+ w.screen.width = 80;
+ delete w.screen['height']
+ w.screen.height = 60;
+ delete w.screen['availLeft']
+ w.screen.availLeft = 0;
+ delete w.screen['availTop']
+ w.screen.availTop = 0;
+ delete w.screen['availWidth']
+ w.screen.availWidth = 80;
+ delete w.screen['availHeight']
+ w.screen.availHeight = 60;
+}
+
function test() {
- popupWindow.screen = {
- width: 80,
- height: 60,
- availLeft: 0,
- availTop: 0,
- availWidth: 80,
- availHeight: 60,
- };
+ overridePopupWindowScreenObject(popupWindow);
debug("Move anchor element along the vertical axis.");

Powered by Google App Engine
This is Rietveld 408576698