| Index: third_party/WebKit/LayoutTests/inspector/schema-get-domains-matches-agents.html
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/schema-get-domains-matches-agents.html b/third_party/WebKit/LayoutTests/inspector/schema-get-domains-matches-agents.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..97db0bc62b530cb3f157a6a2d63a504376c5bf3f
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector/schema-get-domains-matches-agents.html
|
| @@ -0,0 +1,36 @@
|
| +<html>
|
| +<head>
|
| +<script src="../http/tests/inspector/inspector-test.js"></script>
|
| +<script type="text/javascript">
|
| +function test()
|
| +{
|
| + var target = InspectorTest.mainTarget;
|
| + target.schemaAgent().getDomains(gotDomains);
|
| +
|
| + function gotDomains(error, domains)
|
| + {
|
| + if (error) {
|
| + InspectorTest.addResult("error getting domains: " + error);
|
| + InspectorTest.completeTest();
|
| + return;
|
| + }
|
| + var domainNames = domains.map(domain => domain.name).sort();
|
| + var agentNames = Object.keys(target._agentsMap).sort();
|
| + for (var domain of domainNames) {
|
| + if (agentNames.indexOf(domain) === -1)
|
| + InspectorTest.addResult("agent " + domain + " is missing from target");
|
| + }
|
| + for (var agent of agentNames) {
|
| + if (domainNames.indexOf(agent) === -1)
|
| + InspectorTest.addResult("domain " + agent + " is missing from schema.getDomains");
|
| + }
|
| + InspectorTest.completeTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +<body onload="runTest()">
|
| +<p>Tests that generated agent prototypes match with domains returned by schema.getDomains.</p>
|
| +</body>
|
| +</html>
|
|
|