| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <link id="havingDirectiveInMeta" rel="import" href="resources/having-csp-directi
ve.html"> | 4 <link id="havingDirectiveInMeta" rel="import" href="resources/having-csp-directi
ve.html"> |
| 5 <link id="havingDirectiveInHTTP" rel="import" href="resources/csp-blocking.cgi"> | 5 <link id="havingDirectiveInHTTP" rel="import" href="resources/csp-blocking.cgi"> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <pre id="result"></pre> | 8 <pre id="result"></pre> |
| 9 <script> | 9 <script> |
| 10 if (window.testRunner) | 10 if (window.testRunner) |
| 11 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
| 12 | 12 |
| 13 if (window.havingDirectiveInMeta.import.querySelector("#shouldBeBlocked").import
== null) | 13 if (window.havingDirectiveInMeta.import.querySelector("#shouldBeBlocked").import
!= null) |
| 14 result.innerHTML += "PASS\n"; | 14 result.innerHTML += "PASS\n"; |
| 15 else | 15 else |
| 16 result.innerHTML += "FAIL: The import should be blocked.\n"; | 16 result.innerHTML += "FAIL: The import should not be blocked.\n"; |
| 17 | 17 |
| 18 if (window.havingDirectiveInHTTP.import.querySelector("#shouldBeBlocked").import
== null) | 18 if (window.havingDirectiveInHTTP.import.querySelector("#shouldBeBlocked").import
!= null) |
| 19 result.innerHTML += "PASS\n"; | 19 result.innerHTML += "PASS\n"; |
| 20 else | 20 else |
| 21 result.innerHTML += "FAIL: The import should be blocked.\n"; | 21 result.innerHTML += "FAIL: The import should not be blocked.\n"; |
| 22 | 22 |
| 23 </script> | 23 </script> |
| 24 </body> | 24 </body> |
| 25 </html> | 25 </html> |
| OLD | NEW |