OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../http/tests/inspector/inspector-test.js"></script> |
| 4 <script type="text/javascript"> |
| 5 function test() |
| 6 { |
| 7 var target = InspectorTest.mainTarget; |
| 8 target.schemaAgent().getDomains(gotDomains); |
| 9 |
| 10 function gotDomains(error, domains) |
| 11 { |
| 12 if (error) { |
| 13 InspectorTest.addResult("error getting domains: " + error); |
| 14 InspectorTest.completeTest(); |
| 15 return; |
| 16 } |
| 17 var domainNames = domains.map(domain => domain.name).sort(); |
| 18 var agentNames = Object.keys(target._agentsMap).sort(); |
| 19 for (var domain of domainNames) { |
| 20 if (agentNames.indexOf(domain) === -1) |
| 21 InspectorTest.addResult("agent " + domain + " is missing from ta
rget"); |
| 22 } |
| 23 for (var agent of agentNames) { |
| 24 if (domainNames.indexOf(agent) === -1) |
| 25 InspectorTest.addResult("domain " + agent + " is missing from sc
hema.getDomains"); |
| 26 } |
| 27 InspectorTest.completeTest(); |
| 28 } |
| 29 } |
| 30 |
| 31 </script> |
| 32 </head> |
| 33 <body onload="runTest()"> |
| 34 <p>Tests that generated agent prototypes match with domains returned by schema.g
etDomains.</p> |
| 35 </body> |
| 36 </html> |
OLD | NEW |