List xhtml pages (application/xhtml+xml) also in HTML filter
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox96 fixed)
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: ddpm, Assigned: angelinasen1)
References
Details
(Keywords: good-first-bug, Whiteboard: dt-outreachy-2021)
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
Visit a website that delivers their sites with a content-type application/xhtml+xml instead of text/html.
Open the Firfox devtools and select the Network tab there. Choose the HTML filter.
Actual results:
The Filter on the Netmonitor has a filter 'HTML', but HTML sites that are delivered as XHTML (application/xhtml+xml) are not listed there. Instead they are listed in the other/sonstiges filter.
Expected results:
The xhtml pages should also be listed in the 'HTML' filter, not in the others (or how they are named in english) filter.
Comment 1•3 years ago
|
||
Hello ddpm,
Would you have an example of such website we could check?
Updated•3 years ago
|
Comment 3•3 years ago
|
||
The HTML filter button logic is here:
https://searchfox.org/mozilla-central/rev/d10188f9b4f1c4974264f3925505a0498d346c57/devtools/client/netmonitor/src/utils/filter-predicates.js#23-25
So, we should add application/xhtml+xml
to it
Honza
Ok, demo: https://www.liscovius.de/tech/demos/bugzilla.mozilla.org_bug1733285.pl
#!/usr/bin/perl -wT
use CGI;
$cgi=new CGI;
print $cgi->header(
-type=>'application/xhtml+xml',
-charset=>'UTF-8',
);
print '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de-DE" xml:lang="de-DE">
<head>
<title>demo for bug 1733285</title>
</head>
<body>
demo for <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1733285">bug 1733285</a>
</body>
</html>';
Comment 5•3 years ago
|
||
Thank you for the test case, I can reproduce the issue on my machine.
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #5)
Hello! I'd love to work on this
Comment 9•3 years ago
|
||
Bug 1727753 is very similar (just about different mime type). The automated test (that we need for both) will also be similar. Perhaps we could just extend one of the following tests in both cases:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02
Assignee | ||
Comment 10•3 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #9)
Bug 1727753 is very similar (just about different mime type). The automated test (that we need for both) will also be similar. Perhaps we could just extend one of the following tests in both cases:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02
So Do I understand right I should add two objects to EXPECTED_REQUESTS in https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01.js or https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js
(for ogg and xhtml),
one object to BASIC_REQUESTS (for xhtml), run tests and submit in case of success?
It is my first time with tests :)
Assignee | ||
Comment 11•3 years ago
|
||
Or I guess no need for separate basic request
Comment 12•3 years ago
|
||
(In reply to Angelina from comment #10)
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #9)
Bug 1727753 is very similar (just about different mime type). The automated test (that we need for both) will also be similar. Perhaps we could just extend one of the following tests in both cases:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02So Do I understand right I should add two objects to EXPECTED_REQUESTS in https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01.js or https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js
(for ogg and xhtml),
one object to BASIC_REQUESTS (for xhtml), run tests and submit in case of success?
It is my first time with tests :)
Yes, this is the "client" side of the test.
Also, you need to execute the request in the following HTML file, that is loaded by the test:
Here is the line where the test loads a HTML page:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js#135
(the page executes bunch of requests, you need to add one for the ogg file)
The page is implemented here:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/html_filter-test-page.html
You should also implement proper logic on the "server" side of the test.
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
This file represents the backend that is handling requests and sending back responses with proper mime type.
You need to support the new "application/ogg" mime type.
(for ogg and xhtml),
Sorry for not being clear, you should only do it for the "ogg" case at this moment
(the XHTML support should be done in the other bug, but very similarly)
Comment 13•3 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #12)
(In reply to Angelina from comment #10)
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #9)
Bug 1727753 is very similar (just about different mime type). The automated test (that we need for both) will also be similar. Perhaps we could just extend one of the following tests in both cases:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02So Do I understand right I should add two objects to EXPECTED_REQUESTS in https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01.js or https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js
(for ogg and xhtml),
one object to BASIC_REQUESTS (for xhtml), run tests and submit in case of success?
It is my first time with tests :)Yes, this is the "client" side of the test.
Also, you need to execute the request in the following HTML file, that is loaded by the test:Here is the line where the test loads a HTML page:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js#135
(the page executes bunch of requests, you need to add one for the ogg file)The page is implemented here:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/html_filter-test-page.htmlYou should also implement proper logic on the "server" side of the test.
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
This file represents the backend that is handling requests and sending back responses with proper mime type.
You need to support the new "application/ogg" mime type.(for ogg and xhtml),
Sorry for not being clear, you should only do it for the "ogg" case at this moment
(the XHTML support should be done in the other bug, but very similarly)
Hi Honza, I'm working on the Bug 1727753. I'm a bit confused. So should I add the tests for the "ogg" case in my patch or not?
Assignee | ||
Comment 14•3 years ago
|
||
(In reply to Nadinda Rachmat [:nadinda] from comment #13)
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #12)
(In reply to Angelina from comment #10)
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #9)
Bug 1727753 is very similar (just about different mime type). The automated test (that we need for both) will also be similar. Perhaps we could just extend one of the following tests in both cases:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02So Do I understand right I should add two objects to EXPECTED_REQUESTS in https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-01.js or https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js
(for ogg and xhtml),
one object to BASIC_REQUESTS (for xhtml), run tests and submit in case of success?
It is my first time with tests :)Yes, this is the "client" side of the test.
Also, you need to execute the request in the following HTML file, that is loaded by the test:Here is the line where the test loads a HTML page:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js#135
(the page executes bunch of requests, you need to add one for the ogg file)The page is implemented here:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/html_filter-test-page.htmlYou should also implement proper logic on the "server" side of the test.
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/sjs_content-type-test-server.sjs
This file represents the backend that is handling requests and sending back responses with proper mime type.
You need to support the new "application/ogg" mime type.(for ogg and xhtml),
Sorry for not being clear, you should only do it for the "ogg" case at this moment
(the XHTML support should be done in the other bug, but very similarly)Hi Honza, I'm working on the Bug 1727753. I'm a bit confused. So should I add the tests for the "ogg" case in my patch or not?
I guess you add for ogg and I add for xhtml since I worked on xhtml bug.
Lets see
Assignee | ||
Comment 15•3 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #12)
I tried to run some tests on my local machine before making any changes, but every tests crashes
MOZ CRASH: attempting to connect to non-local address. Trying to figure out why it happens and how to fix that
Assignee | ||
Comment 16•3 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #12)
By the way, thank you for the explanation, now the structure is very clear!
Updated•3 years ago
|
Comment 17•3 years ago
|
||
(In reply to Angelina from comment #14)
Hi Honza, I'm working on the Bug 1727753. I'm a bit confused. So should I add the tests for the "ogg" case in my patch or not?
I guess you add for ogg and I add for xhtml since I worked on xhtml bug.
Yes, that's exactly what I had in mind.
Assignee | ||
Comment 18•3 years ago
|
||
Depends on D128114
Assignee | ||
Comment 19•3 years ago
|
||
I extended https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/browser_net_filter-02.js for XHTML.
Tests passed :) Please check, hope I did everything right
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 20•3 years ago
|
||
Problem still exists in Firefox 94.0.
Comment 21•3 years ago
|
||
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60e7da7c5b1e List xhtml in HTML filter r=bomsy
Comment 22•3 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•