Closed Bug 1095529 Opened 10 years ago Closed 10 years ago

[ftu] js/language.js LanguageManager defined and initialized LanguageManager.init() in some place

Categories

(Firefox OS Graveyard :: Gaia::First Time Experience, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S9 (21Nov)

People

(Reporter: sv99, Assigned: sv99)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
sfoster
: review+
Details | Review
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141105030203



Actual results:

Error in unit tests environment - problems in LanguageManager.init() - wich requierd:
1) document.querySelector('#languages ul');
2) LanguageList.get 

test-agent load requireApp('ftu/js/language.js'); and in console we have script error
Attached file Link to PR
Attachment #8518995 - Flags: review?(kgrandon)
Summary: [ftu] js/languge.js LanguageManager defined and initialized LanguageManager.init() → [ftu] js/language.js LanguageManager defined and initialized LanguageManager.init() in some place
in js/app.js other components initialized in method init
var AppManager = {

  init: function init(versionInfo) {
    this.isInitialized = true;

    UIManager.init();
    Navigation.init();
...
    SimManager.init();
    WifiManager.init();
    ImportIntegration.init();
    TimeManager.init();
    DataMobile.init();
    Tutorial.init();

but LanguageManager init in some place were defined??
I think your PR has the right idea, LanguageManager should be initialized in AppManager, I dislike modules that initialize themselves instantly - makes sequencing difficult. Actually I'd like to refactor this at some point so the knowledge of the document structure in buildLanguageList moves to UIManager. I can take the review of this.
Comment on attachment 8518995 [details] [review]
Link to PR

Forwarding this to Sam.
Attachment #8518995 - Flags: review?(kgrandon) → review?(sfoster)
My PR remove some annoying error messages when test-agent initialized test suite for FTU.
I don't have enough experience for rewriting this application. This changes may be made in another bug??

Thanks
> My PR remove some annoying error messages when test-agent initialized test
> suite for FTU.
> I don't have enough experience for rewriting this application. This changes
> may be made in another bug??

Yes absolutely, I didn't mean for you to try and do any rewriting here.
Comment on attachment 8518995 [details] [review]
Link to PR

Gaia-Try looks good, thanks for tidying this up. r=me
Attachment #8518995 - Flags: review?(sfoster) → review+
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/commit/59063be9cab6997540c927584c2ff3ceaaeff924
Assignee: nobody → sv99
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S9 (21Nov)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: