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

Side by Side Diff: LayoutTests/http/tests/security/cross-frame-access-get.html

Issue 494343003: Eliminate globalFlag usage from http security layout tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistify Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 "window", 216 "window",
217 ]; 217 ];
218 218
219 window.onload = function() 219 window.onload = function()
220 { 220 {
221 if (window.testRunner) { 221 if (window.testRunner) {
222 testRunner.dumpAsText(); 222 testRunner.dumpAsText();
223 testRunner.waitUntilDone(); 223 testRunner.waitUntilDone();
224 } 224 }
225 225
226 if (window.testRunner) { 226 window.addEventListener('message', function()
227 setTimeout(pollForTest, 1); 227 {
228 } else { 228 runTest();
229 log("To run the test, click the button below when the opened win dow finishes loading."); 229 if (window.testRunner)
230 var button = document.createElement("button"); 230 testRunner.notifyDone();
231 button.appendChild(document.createTextNode("Run Test")); 231 });
232 button.onclick = runTest;
233 document.body.appendChild(button);
234 }
235 }
236
237 pollForTest = function()
238 {
239 if (!testRunner.globalFlag) {
240 setTimeout(pollForTest, 1);
241 return;
242 }
243 runTest();
244 testRunner.notifyDone();
245 } 232 }
246 233
247 runTest = function() 234 runTest = function()
248 { 235 {
249 window.targetWindow = frames[0]; 236 window.targetWindow = frames[0];
250 237
251 log("\n----- tests for getting of allowed properties -----\n"); 238 log("\n----- tests for getting of allowed properties -----\n");
252 239
253 log("\n----- tests for getting of allowed Functions -----\n"); 240 log("\n----- tests for getting of allowed Functions -----\n");
254 for (var i = 0; i < windowFunctionPropertiesAllowed.length; i++) { 241 for (var i = 0; i < windowFunctionPropertiesAllowed.length; i++) {
(...skipping 30 matching lines...) Expand all
285 } 272 }
286 } 273 }
287 </script> 274 </script>
288 </head> 275 </head>
289 <body> 276 <body>
290 <p>This test checks cross-frame access security (rdar://problem/5251309).</p> 277 <p>This test checks cross-frame access security (rdar://problem/5251309).</p>
291 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe> 278 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe>
292 <pre id="console"></pre> 279 <pre id="console"></pre>
293 </body> 280 </body>
294 </html> 281 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698