This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Reactivate HTML Menu unit tests as part of the test suite #5290
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3f3712c
Split menu specs into HTML and Native. Add HTML and Native versions …
lkcampbell 1db93ab
Set brackets.nativeMenus based on hasNativeMenus URL parameter.
lkcampbell a9a8e47
API changes
lkcampbell 54e3ad0
hasNativeMenus param code cleanup
lkcampbell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -476,8 +476,7 @@ define(function (require, exports, module) { | |
| waitsForDone(promise, "dismiss dialog"); | ||
| } | ||
|
|
||
|
|
||
| function createTestWindowAndRun(spec, callback) { | ||
| function createTestWindowAndRun(spec, callback, options) { | ||
| runs(function () { | ||
| // Position popup windows in the lower right so they're out of the way | ||
| var testWindowWid = 1000, | ||
|
|
@@ -503,6 +502,11 @@ define(function (require, exports, module) { | |
| // disable initial dialog for live development | ||
| params.put("skipLiveDevelopmentInfo", true); | ||
|
|
||
| // option to launch test window with either native or HTML menus | ||
| if (options && options.hasOwnProperty("hasNativeMenus")) { | ||
| params.put("hasNativeMenus", options.hasNativeMenus); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Later,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. These changes are much clearer. The code got a bit convoluted when I was wrestling with the false boolean value versus the truthy "false" string. |
||
| } | ||
|
|
||
| _testWindow = window.open(getBracketsSourceRoot() + "/index.html?" + params.toString(), "_blank", optionsStr); | ||
|
|
||
| _testWindow.isBracketsTestWindow = true; | ||
|
|
@@ -524,7 +528,7 @@ define(function (require, exports, module) { | |
| }); | ||
| }; | ||
| }); | ||
|
|
||
| // FIXME (issue #249): Need an event or something a little more reliable... | ||
| waitsFor( | ||
| function isBracketsDoneLoading() { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This form is simpler, and it also checks for
nulland empty string:Also, how expensive is the call to
params.get("hasNativeMenus")? Should it be stored in avarso it's not called twice?