Closed Bug 1182091 Opened 9 years ago Closed 9 years ago

Test document.open() with fetch interception

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
FxOS-S3 (24Jul)

People

(Reporter: noemi, Assigned: jaoo)

References

Details

Attachments

(1 file)

      No description provided.
Target Milestone: --- → FxOS-S3 (24Jul)
Attached patch v1Splinter Review
Ehsan or Ben, may I have some feedback on the test please? I see something interesting which is the NS_NewChannel() call for document.open() is not intercepted by the service worker (that's what I see). It seems the document.open() call ends up calling NS_NewChannel() but the service worker does not intercept such request. I'd like you guys (any of you) to have a look at the test, double check and confirm what I see please. Thanks!
Attachment #8633382 - Flags: feedback?(ehsan)
Attachment #8633382 - Flags: feedback?(bkelly)
Comment on attachment 8633382 [details] [diff] [review]
v1

Review of attachment 8633382 [details] [diff] [review]:
-----------------------------------------------------------------

I think this is headed in the right direction, but if the channel created in document.open doesn't get intercepted, you should fix that bug first.  :-)  Please see bugs such as bug 1147695, bug 1131323, bug 1147996 and bug 1148064 for the other cases of things which we could not intercept before that I have fixed for examples.

::: dom/workers/test/serviceworkers/test_document_open_opaque_intercept.html
@@ +34,5 @@
> +  function testOpaqueIntercept() {
> +    var p = new Promise(function(resolve, reject) {
> +      var ready = false;
> +      window.onmessage = function(e) {
> +        if ((e.data.status === "callback") && (e.data.data === "ready")) {

Nit: For better readability, please switch on e.data.status, and then on e.data.data.
Attachment #8633382 - Flags: feedback?(ehsan) → feedback+
Depends on: 1183983
Ehsan, as you commented at bug 1183983 comment 2 if there is nothing to intercept here the test being added here doesn't make sense so should we resolve this one as INVALID as well? Thanks!
Flags: needinfo?(ehsan)
Yes, it does.  Thanks!
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(ehsan)
Resolution: --- → INVALID
Attachment #8633382 - Flags: feedback?(bkelly)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: