-
Notifications
You must be signed in to change notification settings - Fork 149
Make HTTPS tests fail if they are loaded over HTTP #207
Conversation
Test files that end with ".https.html" trigger a check on the current protocol. If the current protocol is not "https:", all tests in this test file fail with a "Test page must be loaded over HTTPS" message.
r? @jgraham |
This PR is still waiting on review. @jgraham? |
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions. testharness.js, line 495 at r1 (raw file):
The extension doesn't have to be testharness.js, line 514 at r1 (raw file):
I don't think it makes sense to run this for every test. We could just run the check and make it throw so that the harness status comes back error. Comments from Reviewable |
Reviewed 1 of 1 files at r1. Comments from Reviewable |
@tidoust are you able to address the review comments? |
Review status: all files reviewed at latest revision, 2 unresolved discussions. testharness.js, line 514 at r1 (raw file):
|
@tidoust it seems this code still doesn't split on "." and then checks if one of them is "https". |
@annevk I seem to have lost the initial branch and repo with which I created that PR, so I created a new PR #255 with the suggested update. I'm closing this one as a result. Note that the new PR still does not address @jgraham's comment that he would like to "just run the check and make it throw so that the harness status comes back error". As said above, I do not know how to do that properly with the current code. |
The goal of this PR is to make the test harness fail HTTPS-only tests when they are loaded over HTTP with a "Test page must be loaded over HTTPS" message.
The assumption is that such tests are defined in files that end with
.https.html
.This change is