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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-valid-names.html

Issue 2370843003: Suborigin LayoutTest formatting and refactoring (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Valid suborigin names</title> 4 <meta charset="utf-8">
5 <title>Valid suborigin names</title>
5 </head> 6 </head>
6 7
7 <script> 8 <script>
8 if (window.testRunner) { 9 if (window.testRunner) {
9 testRunner.dumpAsText(); 10 testRunner.dumpAsText();
10 testRunner.waitUntilDone(); 11 testRunner.waitUntilDone();
11 } 12 }
12 13
13 function finish() { 14 function finish() {
14 if (window.testRunner) 15 if (window.testRunner)
15 testRunner.notifyDone(); 16 testRunner.notifyDone();
16 } 17 }
17 18
18 var test_suborigin_names = [ 19 var test_suborigin_names = [
19 "foobar", 20 'foobar',
20 "foob4r", 21 'foob4r',
21 "42", 22 '42',
22 "foo-bar", 23 'foo-bar',
23 "-foobar", 24 '-foobar',
24 "foobar-" 25 'foobar-'
25 ]; 26 ];
26 27
27 var iframe; 28 var iframe;
28 var i = 0; 29 var i = 0;
29 function next() { 30 function next() {
30 if (i >= test_suborigin_names.length) 31 if (i >= test_suborigin_names.length)
31 finish(); 32 finish();
32 document.getElementById('iframe').src = "resources/reach-into-iframe.php?chi ldsuborigin=" + test_suborigin_names[i]; 33 document.getElementById('iframe').src =
33 i++; 34 'resources/reach-into-iframe.php?childsuborigin=' + test_suborigin_names[i];
35 i++;
34 } 36 }
35 37
36 window.onmessage = function(event) { 38 window.onmessage = function(event) {
37 alert(event.data); 39 alert(event.data);
38 next(); 40 next();
39 }; 41 };
40 42
41 window.onload = function() { 43 window.onload = function() {
42 next(); 44 next();
43 }; 45 };
44 </script> 46 </script>
45 <iframe id="iframe"></iframe> 47 <iframe id="iframe"></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698