OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="resources/cross-frame-access.js"></script> | 3 <script src="resources/cross-frame-access.js"></script> |
4 <script> | 4 <script> |
5 var windowConstructorPropertiesNotAllowed = [ | 5 var windowConstructorPropertiesNotAllowed = [ |
6 "Attr", | 6 "Attr", |
7 "Audio", | 7 "Audio", |
8 "CDATASection", | 8 "CDATASection", |
9 "CSSPrimitiveValue", | 9 "CSSPrimitiveValue", |
10 "CSSRule", | 10 "CSSRule", |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 "window" | 213 "window" |
214 ]; | 214 ]; |
215 | 215 |
216 window.onload = function() | 216 window.onload = function() |
217 { | 217 { |
218 if (window.testRunner) { | 218 if (window.testRunner) { |
219 testRunner.dumpAsText(); | 219 testRunner.dumpAsText(); |
220 testRunner.waitUntilDone(); | 220 testRunner.waitUntilDone(); |
221 } | 221 } |
222 | 222 |
223 if (window.testRunner) { | 223 window.addEventListener('message', function() |
224 setTimeout(pollForTest, 1); | 224 { |
225 } else { | 225 runTest(); |
226 log("To run the test, click the button below when the opened win
dow finishes loading."); | 226 if (window.testRunner) |
227 var button = document.createElement("button"); | 227 testRunner.notifyDone(); |
228 button.appendChild(document.createTextNode("Run Test")); | 228 }); |
229 button.onclick = runTest; | |
230 document.body.appendChild(button); | |
231 } | |
232 } | |
233 | |
234 pollForTest = function() | |
235 { | |
236 if (!testRunner.globalFlag) { | |
237 setTimeout(pollForTest, 1); | |
238 return; | |
239 } | |
240 runTest(); | |
241 testRunner.notifyDone(); | |
242 } | 229 } |
243 | 230 |
244 runTest = function() | 231 runTest = function() |
245 { | 232 { |
246 window.targetWindow = frames[0]; | 233 window.targetWindow = frames[0]; |
247 | 234 |
248 log("\n----- tests for getting of not allowed properties -----\n"); | 235 log("\n----- tests for getting of not allowed properties -----\n"); |
249 | 236 |
250 log("\n----- tests for getting of not allowed Constructors -----\n")
; | 237 log("\n----- tests for getting of not allowed Constructors -----\n")
; |
251 for (var i = 0; i < windowConstructorPropertiesNotAllowed.length; i+
+) { | 238 for (var i = 0; i < windowConstructorPropertiesNotAllowed.length; i+
+) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 shouldThrowException("targetWindow.history"); | 274 shouldThrowException("targetWindow.history"); |
288 } | 275 } |
289 </script> | 276 </script> |
290 </head> | 277 </head> |
291 <body> | 278 <body> |
292 <p>This test checks cross-frame access security of getOwnPropertyDescriptor (htt
ps://bugs.webkit.org/show_bug.cgi?id=32119).</p> | 279 <p>This test checks cross-frame access security of getOwnPropertyDescriptor (htt
ps://bugs.webkit.org/show_bug.cgi?id=32119).</p> |
293 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get
-test.html" style=""></iframe> | 280 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get
-test.html" style=""></iframe> |
294 <pre id="console"></pre> | 281 <pre id="console"></pre> |
295 </body> | 282 </body> |
296 </html> | 283 </html> |
OLD | NEW |