Closed Bug 929766 Opened 12 years ago Closed 12 years ago

Remove Orion from the SourceEditor component

Categories

(DevTools :: Source Editor, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 28

People

(Reporter: anton, Assigned: anton)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 5 obsolete files)

Once all other components are converted we need to write some more tests for our CodeMirror integration and remove Orion and all Orion specific tests from the tree.
Depends on: 929887
OS: Mac OS X → All
Hardware: x86 → All
Attached patch WIP 1 (obsolete) — Splinter Review
Try: https://tbpl.mozilla.org/?tree=Try&rev=badb6b501f1d Took me longer than expected because of the command dispatcher bug (see bug 933015).
Depends on: 933015
Attachment #826141 - Attachment is obsolete: true
Attached patch WIP 3 (obsolete) — Splinter Review
Removed all traces of Orion (except for maybe about:license). Need to write tests for the Editor object now. Try: https://tbpl.mozilla.org/?tree=Try&rev=7d5304eea8a1
Attachment #827610 - Attachment is obsolete: true
Priority: -- → P2
Attached patch WIP 4 (obsolete) — Splinter Review
Attachment #828349 - Attachment is obsolete: true
Attached patch WIP 5 (obsolete) — Splinter Review
Added tests, removed Orion. There are three untested methods, they are all associated with line alignment so I'll file a bug for Optimizer to write tests for them after this lands. (Since he implemented those methods) Try: https://tbpl.mozilla.org/?tree=Try&rev=d30f20e6d0aa
Attachment #831224 - Attachment is obsolete: true
Attachment #831833 - Flags: review?(mihai.sucan)
Comment on attachment 831833 [details] [diff] [review] WIP 5 Review of attachment 831833 [details] [diff] [review]: ----------------------------------------------------------------- This is looking good. Thanks for the patch! r+ I only have one concern: need moar tests. We had source editor tests for cut/copy/paste, middle-click paste, drag and drop, and more. I'm sure the codemirror tests themselves include a lot of API testing - that's good, but the ones I mentioned are not testable from web-based code. For example, mochitests for drag and drop in our editor integration would be useful. ::: browser/devtools/scratchpad/test/browser_scratchpad_bug_699130_edit_ui_updates.js @@ +5,3 @@ > "use strict"; > > let tempScope = {}; Do you need to keep tempScope here? ::: browser/devtools/sourceeditor/test/browser.ini @@ +16,2 @@ > [browser_codemirror.js] > skip-if = os == "linux" Any reason why the codemirror tests are disabled on linux? Is there a bug open for this problem? ::: browser/devtools/sourceeditor/test/head.js @@ +35,3 @@ > } > > +function ch(exp, act, label) { What does ch stand for? When I first saw this function being used in a test I was confusd and thought it's a new function for mochitests -- is, ise, isnot, ok, ch, ... Please rename this function to something less cryptic.
Attachment #831833 - Flags: review?(mihai.sucan) → review+
Comment on attachment 831833 [details] [diff] [review] WIP 5 Review of attachment 831833 [details] [diff] [review]: ----------------------------------------------------------------- can we remove devtools.editor.component from firefox.js too?
Thanks! (In reply to Mihai Sucan [:msucan] from comment #6) > Comment on attachment 831833 [details] [diff] [review] > WIP 5 > > Review of attachment 831833 [details] [diff] [review]: > ----------------------------------------------------------------- > > This is looking good. Thanks for the patch! r+ > > I only have one concern: need moar tests. We had source editor tests for > cut/copy/paste, middle-click paste, drag and drop, and more. I'm sure the > codemirror tests themselves include a lot of API testing - that's good, but > the ones I mentioned are not testable from web-based code. For example, > mochitests for drag and drop in our editor integration would be useful. I agree. I'll be filing bugs and writing more tests. Some things (context menu, for example) are tested from other components. > ::: > browser/devtools/scratchpad/test/ > browser_scratchpad_bug_699130_edit_ui_updates.js > @@ +5,3 @@ > > "use strict"; > > > > let tempScope = {}; > > Do you need to keep tempScope here? You're right, I do not. > ::: browser/devtools/sourceeditor/test/browser.ini > @@ +16,2 @@ > > [browser_codemirror.js] > > skip-if = os == "linux" > > Any reason why the codemirror tests are disabled on linux? Is there a bug > open for this problem? Yeah, there's an intermittent that happens only on Linux. Bug 920570. > ::: browser/devtools/sourceeditor/test/head.js > @@ +35,3 @@ > > } > > > > +function ch(exp, act, label) { > > What does ch stand for? > > When I first saw this function being used in a test I was confused and > thought it's a new function for mochitests -- is, ise, isnot, ok, ch, ... That's the idea! It's like 'is', 'isnot', etc. but for CodeMirror's character objects. It's in head.js because it doesn't make sense to make it any more generic. (In reply to Rob Campbell [:rc] (:robcee) from comment #7) > Comment on attachment 831833 [details] [diff] [review] > WIP 5 > > Review of attachment 831833 [details] [diff] [review]: > ----------------------------------------------------------------- > > can we remove devtools.editor.component from firefox.js too? Good catch.
Attached patch WIP 6Splinter Review
Attachment #831833 - Attachment is obsolete: true
Attachment #8334092 - Flags: review+
Fixed all test failures and verified by running all browser/devtools mochitests locally. Fingers crossed. https://hg.mozilla.org/integration/fx-team/rev/464f36a51d3e
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
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: