Closed Bug 935788 Opened 11 years ago Closed 11 years ago

Pretty Print button breaks attempting to work on non-js files

Categories

(DevTools :: Debugger, defect, P2)

26 Branch
x86
macOS
defect

Tracking

(firefox25 unaffected, firefox26 unaffected, firefox27 fixed, firefox28 fixed)

RESOLVED FIXED
Firefox 28
Tracking Status
firefox25 --- unaffected
firefox26 --- unaffected
firefox27 --- fixed
firefox28 --- fixed

People

(Reporter: canuckistani, Assigned: fitzgen)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

STR:

* look at a json file, eg taps.json from http://canuckistani.github.io/st-beer/
* hit the pretty print button, there's a log message 'togglePrettyPrint threw an exception: Can't prettify non-javascript files.', but the button stays activated
* only way to get it de-activated is toggle black box button on, then off
Assignee: nobody → nfitzgerald
Priority: -- → P2
Comment on attachment 830505 [details] [diff] [review]
bug-935788-pp-non-js.patch

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

Take my r+. TAKE IT!

::: browser/devtools/debugger/test/browser_dbg_pretty-print-12.js
@@ +19,5 @@
> +    gDebugger = gPanel.panelWin;
> +    gEditor = gDebugger.DebuggerView.editor;
> +    gSources = gDebugger.DebuggerView.Sources;
> +
> +    waitForSourceShown(gPanel, "")

You could use preferredValue here instead of this and the next then, but meh.
Attachment #830505 - Flags: review?(vporof) → review+
https://hg.mozilla.org/mozilla-central/rev/77765853448f
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
Comment on attachment 830505 [details] [diff] [review]
bug-935788-pp-non-js.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #):

Bug 916180

User impact if declined: 

It will appear as if you can pretty print non-js files (such as html files) in the debugger, but then won't pretty print the file, but the UI will still act like the file is pretty printed.

Testing completed (on m-c, etc.):

Patch has been on m-c for a few days with no hiccups.

Risk to taking this patch (and alternatives if risky):

Very little. Tiny patch that affects a developer-only facing feature.

String or IDL/UUID changes made by this patch:

None.
Attachment #830505 - Flags: approval-mozilla-aurora?
Attachment #830505 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: