| 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 src="../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"> | 5 <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'"> |
| 6 <script> | 6 <script> |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.evaluateInPage("document", didReceiveDocumentObject); | 9 InspectorTest.evaluateInPage("document", didReceiveDocumentObject); |
| 10 function didReceiveDocumentObject(remoteObject, wasThrown) | 10 function didReceiveDocumentObject(remoteObject) |
| 11 { | 11 { |
| 12 InspectorTest.addResult("didReceiveDocumentObject"); | 12 InspectorTest.addResult("didReceiveDocumentObject"); |
| 13 InspectorTest.DOMAgent.requestNode(remoteObject.objectId, didRequestNode
); | 13 InspectorTest.DOMAgent.requestNode(remoteObject.objectId, didRequestNode
); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function didRequestNode(error, nodeId) | 16 function didRequestNode(error, nodeId) |
| 17 { | 17 { |
| 18 InspectorTest.addResult("didRequestNode error = " + error); | 18 InspectorTest.addResult("didRequestNode error = " + error); |
| 19 InspectorTest.completeTest(); | 19 InspectorTest.completeTest(); |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 </script> | 22 </script> |
| 23 </head> | 23 </head> |
| 24 <body onload="runTest()"> | 24 <body onload="runTest()"> |
| 25 <p> | 25 <p> |
| 26 Tests that JS object to node resolution still works even if script evals are pro
hibited by Content-Security-Policy. | 26 Tests that JS object to node resolution still works even if script evals are pro
hibited by Content-Security-Policy. |
| 27 The test passes if it doesn't crash. | 27 The test passes if it doesn't crash. |
| 28 <a href="https://bugs.webkit.org/show_bug.cgi?id=78705">Bug 78705.</a> | 28 <a href="https://bugs.webkit.org/show_bug.cgi?id=78705">Bug 78705.</a> |
| 29 </p> | 29 </p> |
| 30 </body> | 30 </body> |
| 31 </html> | 31 </html> |
| OLD | NEW |