OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 var childFrame; | 4 var childFrame; |
5 var family; | 5 var family; |
6 var pages; | 6 var pages; |
7 var currentPage; | 7 var currentPage; |
8 var result = {}; | 8 var result = {}; |
9 | 9 |
10 function init() { | 10 function init() { |
11 if (window.layoutTestController) { | 11 if (window.testRunner) { |
12 layoutTestController.dumpAsText(); | 12 testRunner.dumpAsText(); |
13 layoutTestController.waitUntilDone(); | 13 testRunner.waitUntilDone(); |
14 } else { | 14 } else { |
15 console.error("No layout test controller"); | 15 console.error("No layout test controller"); |
16 } | 16 } |
17 | 17 |
18 var queryString = window.location.search.substring(1).split("|"); | 18 var queryString = window.location.search.substring(1).split("|"); |
19 family = queryString[0]; | 19 family = queryString[0]; |
20 pages = queryString[1].split(","); | 20 pages = queryString[1].split(","); |
21 if (!pages.length) { | 21 if (!pages.length) { |
22 alert("please specify which pages to generate via " + | 22 alert("please specify which pages to generate via " + |
23 "?<page> ... ie. generator.html?tabs,bookmarks,cookies,..."); | 23 "?<page> ... ie. generator.html?tabs,bookmarks,cookies,..."); |
(...skipping 16 matching lines...) Expand all Loading... |
40 result[currentPage] = childFrame.contentWindow.serializePage(); | 40 result[currentPage] = childFrame.contentWindow.serializePage(); |
41 | 41 |
42 if (pages.length) { | 42 if (pages.length) { |
43 next(); | 43 next(); |
44 } else { | 44 } else { |
45 var preNode = document.createElement("pre"); | 45 var preNode = document.createElement("pre"); |
46 var textNode = document.createTextNode( | 46 var textNode = document.createTextNode( |
47 "#BEGIN" + JSON.stringify(result) + "#END"); | 47 "#BEGIN" + JSON.stringify(result) + "#END"); |
48 preNode.appendChild(textNode); | 48 preNode.appendChild(textNode); |
49 document.getElementsByTagName("body")[0].appendChild(preNode); | 49 document.getElementsByTagName("body")[0].appendChild(preNode); |
50 if (window.layoutTestController) | 50 if (window.testRunner) |
51 layoutTestController.notifyDone(); | 51 testRunner.notifyDone(); |
52 } | 52 } |
53 } | 53 } |
54 </script> | 54 </script> |
55 </head> | 55 </head> |
56 <body onload="init();"> | 56 <body onload="init();"> |
57 </body> | 57 </body> |
58 </html> | 58 </html> |
OLD | NEW |