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