Closed Bug 767390 Opened 12 years ago Closed 11 years ago

XMLs and HTMLs are sometimes displayed in the scripts dropdown

Categories

(DevTools :: Debugger, defect, P3)

15 Branch
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ioana_damy, Assigned: past)

Details

(Whiteboard: [testday-20120706])

Attachments

(3 files)

Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120621 Firefox/15.0a2 (20120621042006)

STR:
1. Load http://htmlpad.org/debugger/ in the browser.
2. Open the Debugger (Tools->Web developer->Debugger, or press Ctrl+Shift+S).
3. Click on the scripts dropdown.

Sometimes, XMLs and HTMLs are displayed in the scripts dropdown.
The HTML page can include JavaScript, so you should indeed see that in the Debugger.

I don't know what's up with the "resizer.xml" that is in the screenshot on the left of the image you posted.
Ioana did you encounter this behavior when going back or forward?
Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/16.0 Firefox/16.0 (20120701030537)

Kevin, should the HTML be present in the dropdown even when it only contains script tags like this: <script type="text/javascript" src="handleErr_script.js"></script>? Or should it only be present there when containing the JS code?

Panos, this behavior is sometimes present when simply loading the page for the first time, and other times it only appears when navigating between pages. It's also an intermittent issue that you might not reproduce at all after quite a while of trying. I've seen it on multiple pages: http://htmlpad.org/debugger, http://google.ro, http://twitter.com.
(In reply to Ioana Budnar [QA] from comment #3)
> Kevin, should the HTML be present in the dropdown even when it only contains
> script tags like this: <script type="text/javascript"
> src="handleErr_script.js"></script>? Or should it only be present there when
> containing the JS code?

I would say that the ideal case is that an HTML page is only listed if it has JS code that can be debugged in it.

I just looked at a few pages in the debugger and it appeared to be working this way (HTML without JS in it were not appearing in the menu)
Kevin, as you can see in this attachment, HTMLs with no code that can be debugged are listed in the dropdown. This only happens intermittently.
(In reply to Ioana Budnar [QA] from comment #5)
> Kevin, as you can see in this attachment, HTMLs with no code that can be
> debugged are listed in the dropdown. This only happens intermittently.

Interesting. I haven't seen that on my machine yet.
(In reply to Ioana Budnar [QA] from comment #5)
> Created attachment 638341 [details]
> HTML in the JS dropdown.png
> 
> Kevin, as you can see in this attachment, HTMLs with no code that can be
> debugged are listed in the dropdown. This only happens intermittently.

Actually, there is code in that file, the onclick handler. What you can do with it is another issue, and not something the debugger can deduce at the outset.
Ioana can you start with a clean profile and see if you can provide us with reproducible STR?
Priority: -- → P2
(In reply to Panos Astithas [:past] from comment #8)
> Ioana can you start with a clean profile and see if you can provide us with
> reproducible STR?

Panos, I started Firefox with a clean profile and just performed the steps in comment 0 with the same web page (http://greensqr.com/misc/mozilla/debugger/). The resizer XML was sometimes displayed, but not all the times. 

Since I don't do anything extra or different, I don't see could produce this bug or how I could reproduce it all the time.
HTMLs that should be displayed in the dropdown according to comment 7 are most times only there after running the script once.

STR:
1. Load http://greensqr.com/misc/mozilla/debugger/ in the browser.
2. Open the Debugger and check the dropdown content.
3. Click the Play script1 button.
4. Check the dropdown content again.

The HTML was not in the dropdown at step 2, but it got there at step 3.
Whiteboard: [testday-20120706]
Ioana, can you try to reproduce this after bug 767399 is merged into mozilla-central and appears in the next nightly?
Priority: P2 → P3
QA Contact: past
Could not reproduce anymore, recent refactorings probably fixed this.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Assignee: nobody → past
QA Contact: past
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: