Repository navigation
mozbrowsersecuritychange event - #9244
Conversation
5207986 to
3745913
Compare
|
components/script/dom/document.rs, line 126 [r1] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 126 [r1] (raw file): Comments from the review on Reviewable.io |
3745913 to
4aaf250
Compare
|
Using the existing 3 questions:
|
|
|
☔ The latest upstream changes (presumably #9271) made this pull request unmergeable. Please resolve the merge conflicts. |
4aaf250 to
c90c4a4
Compare
|
Added a test. It fails, as expected (#6919). If I use my own http/https servers, it passes. Now I can use |
There was a problem hiding this comment.
Let's make a separate async_test for each iframe so we get better granularity for test failures.
There was a problem hiding this comment.
I'm not sure to understand how that would help. There's only one iframe, and what matters is having the events to chain properly.
There was a problem hiding this comment.
Whoops, I misread the test. You're right.
|
The code changes looks fine, but we can improve the test a bit more. |
| @@ -0,0 +1,49 @@ | |||
| <head> | |||
There was a problem hiding this comment.
Let's give this a <title> and update the ini to use that instead of Untitled.
|
I will therefore reinstate two of my previous comments that I deleted after making the request to split the test. |
c90c4a4 to
b1170a1
Compare
Addressed. |
| @@ -0,0 +1,46 @@ | |||
| <head> | |||
| <title>mozbrowsersecuritychange</title> | |||
There was a problem hiding this comment.
How about "mozbrowsersecuritychange event is dispatched when content security state changes"
b1170a1 to
18b5d78
Compare
Gecko fires this event even if the state doesn't actually change. I'll update MDN. |
18b5d78 to
63519c3
Compare
|
@bors-servo: r+ |
|
📌 Commit 63519c3 has been approved by |
mozbrowsersecuritychange event Fixes #8544 No test yet. Is there a way to mock a https connection? Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9244) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
Fixes #8544
No test yet. Is there a way to mock a https connection?
Also, I wish I could use the
HTTPSStateenum instead of aStringwhen callingtrigger_mozbrowser_event(https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would requireconstellation_msg.rsto know aboutHTTPSState, which is defined indocument.rs, which would add a dependency tocomponents/msg. I could defineHTTPSStatesomewhere else maybe? Or maybe it's fine to use aString. But then, should I use the HTTPSState strings ("modern/deprecated/none") or the mozbrowser strings ("secure/insecure/broken") (as it is now)