blob: 3ccaa670c4f2918a7a8c40d06cdc0d32c1c9cde9 [file] [log] [blame]
This test checks cross-frame access security of getOwnPropertyDescriptor (https://bugs.webkit.org/show_bug.cgi?id=32119).
----- tests for getting of not allowed properties -----
----- tests for getting of not allowed Constructors -----
PASS: canGetDescriptor(targetWindow, 'Attr') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Audio') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'CDATASection') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'CSSRule') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'CSSStyleDeclaration') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'CharacterData') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Comment') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'DOMException') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'DOMImplementation') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'DOMParser') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Document') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'DocumentFragment') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'DocumentType') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Element') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'EntityReference') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'EvalError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Event') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLAnchorElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLAudioElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLAreaElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLBRElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLBaseElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLBodyElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLButtonElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLCanvasElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLDListElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLDirectoryElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLDivElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLDocument') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLFieldSetElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLFontElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLFormElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLFrameElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLFrameSetElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLHRElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLHeadElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLHeadingElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLHtmlElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLIFrameElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLImageElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLInputElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLIsIndexElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLLIElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLLabelElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLLegendElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLLinkElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLMapElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLMarqueeElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLMediaElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLMenuElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLMetaElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLModElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLOListElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLOptGroupElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLOptionElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLParagraphElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLParamElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLPreElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLQuoteElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLScriptElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLSelectElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLSourceElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLStyleElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableCaptionElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableCellElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableColElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableRowElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTableSectionElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTextAreaElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLTitleElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLUListElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'HTMLVideoElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Image') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'MutationEvent') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Node') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'NodeFilter') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Option') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'ProcessingInstruction') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Range') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'RangeError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'ReferenceError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'SyntaxError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'Text') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'TypeError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'URIError') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XMLDocument') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XMLHttpRequest') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XMLSerializer') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XPathEvaluator') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XPathResult') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'XSLTProcessor') should be 'false' and is.
----- tests for getting of not allowed Functions -----
PASS: canGetDescriptor(targetWindow, 'addEventListener') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'alert') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'atob') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'btoa') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'captureEvents') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'clearInterval') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'clearTimeout') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'confirm') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'find') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'getComputedStyle') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'getMatchedCSSRules') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'getSelection') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'moveBy') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'moveTo') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'open') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'print') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'prompt') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'releaseEvents') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'removeEventListener') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'resizeBy') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'resizeTo') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scroll') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scrollBy') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scrollTo') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'setInterval') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'setTimeout') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'stop') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'blur') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'close') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'focus') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'postMessage') should be 'true' and is.
----- tests for getting of not allowed Attributes -----
PASS: canGetDescriptor(targetWindow, 'clientInformation') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'console') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'crypto') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'defaultStatus') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'defaultstatus') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'devicePixelRatio') should be 'false' and is.
Firefox allows access to 'document' but throws an exception when you access its properties.
PASS: canGetDescriptor(targetWindow, 'document') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'embeds') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'eval') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'event') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'frameElement') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'images') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'innerHeight') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'innerWidth') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'locationbar') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'menubar') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'name') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'navigator') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'offscreenBuffering') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onabort') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onbeforeunload') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onblur') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onchange') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onclick') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'ondblclick') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onerror') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onfocus') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onkeydown') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onkeypress') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onkeyup') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onload') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmousedown') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmousemove') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmouseout') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmouseover') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmouseup') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onmousewheel') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onreset') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onresize') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onscroll') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onsearch') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onselect') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onsubmit') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'onunload') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'outerHeight') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'outerWidth') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'pageXOffset') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'pageYOffset') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'personalbar') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'plugins') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'prototype') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'screen') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'screenLeft') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'screenTop') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'screenX') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'screenY') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scrollX') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scrollY') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'scrollbars') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'status') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'statusbar') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'toolbar') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'history') should be 'false' and is.
PASS: canGetDescriptor(targetWindow, 'closed') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'frames') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'length') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'opener') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'parent') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'self') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'top') should be 'true' and is.
PASS: canGetDescriptor(targetWindow, 'window') should be 'true' and is.
----- tests access to cross domain location object -----
PASS: canGetDescriptor(targetLocation, 'protocol') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'host') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'hostname') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'port') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'pathname') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'search') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'hash') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'toString') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'valueOf') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'customProperty') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'reload') should be 'false' and is.
PASS: canGetDescriptor(targetLocation, 'assign') should be 'true' and is.
PASS: canGetDescriptor(targetLocation, 'replace') should be 'true' and is.
----- tests access to cross domain history object -----
PASS: targetWindow.history should have thrown an exception, and did: SecurityError: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a cross-origin frame.