Bug 905614 - [Unit tests] Failed: ClockView updateAnalogClock with type error.

https://bugzilla.mozilla.org/show_bug.cgi?id=905614

- Cannot repro test "failures"
- Added if statement to guard against [[Get]] property of undefined objects


Attached to bug:


<img src="https://bug905614.bugzilla.mozilla.org/attachment.cgi?id=790841">
<img src="https://bug905614.bugzilla.mozilla.org/attachment.cgi?id=790839">

Running tests for clock


  [clock] AlarmEditView
    ✓ [clock] should save and delete an alarm
    ✓ [clock] should add an alarm with sound, no vibrate
    ✓ [clock] should update existing alarm with no sound, vibrate

  [clock] ClockView
    ✓ [clock] ClockView.isInitialized
    [clock] updateDayDate
      ✓ [clock] date element is updated with the current time
      ✓ [clock] date element is not updated twice in the same day
      ✓ [clock] date element is updated each day
    [clock] updateDigitalClock
      ✓ [clock] time and hourState elements are updated immediately
      ✓ [clock] time and hourState elements are not updated twice in the same minute
      ✓ [clock] time and hourState elements are updated each minute
    [clock] updateAnalogClock
      ✓ [clock] second-, minute-, and hour- hands are updated immediately
      ◦ [clock] second-, minute-, and hour- hands are not updated twice in the same second      ✓ [clock] second-, minute-, and hour- hands are not updated twice in the same second
      ✓ [clock] second-, minute-, and hour- hands are updated each second
    [clock] show
      ✓ [clock] show() [no mode, no settings, defer to default]
      ✓ [clock] show() [no mode, defer to settings]
      ✓ [clock] show(analog) [no mode, defer to settings]
      ✓ [clock] show(analog)
      ✓ [clock] show(digital)
      ✓ [clock] ClockView.analog.click() shows digital
      ✓ [clock] ClockView.digital.click() shows analog

  [clock] Time functions
    [clock] #summarizeDaysOfWeek
      ✓ [clock] should summarize everyday
      ✓ [clock] should summarize weekdays
      ✓ [clock] should summarize weekends
      ✓ [clock] should summarize never
      ✓ [clock] should summarize a single day
      ✓ [clock] should summarize a single day
    [clock] isDateInRepeat
      ◦ [clock] thursday[4] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday"      ✓ [clock] thursday[4] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ✓ [clock] thursday[4] is not in {"monday":true,"wednesday":true,"friday":true}
      ✓ [clock] friday[5] is in {"monday":true,"wednesday":true,"friday":true}
      ◦ [clock] friday[5] is not in {"sunday":true,"tuesday":true,"thursday":true,"saturda      ✓ [clock] friday[5] is not in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ◦ [clock] saturday[6] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday"      ✓ [clock] saturday[6] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ✓ [clock] saturday[6] is not in {"monday":true,"wednesday":true,"friday":true}
      ◦ [clock] sunday[0] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":t      ✓ [clock] sunday[0] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ✓ [clock] sunday[0] is not in {"monday":true,"wednesday":true,"friday":true}
      ✓ [clock] monday[1] is in {"monday":true,"wednesday":true,"friday":true}
      ◦ [clock] monday[1] is not in {"sunday":true,"tuesday":true,"thursday":true,"saturda      ✓ [clock] monday[1] is not in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ◦ [clock] tuesday[2] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":      ✓ [clock] tuesday[2] is in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
      ✓ [clock] tuesday[2] is not in {"monday":true,"wednesday":true,"friday":true}
      ✓ [clock] wednesday[3] is in {"monday":true,"wednesday":true,"friday":true}
      ◦ [clock] wednesday[3] is not in {"sunday":true,"tuesday":true,"thursday":true,"satu      ✓ [clock] wednesday[3] is not in {"sunday":true,"tuesday":true,"thursday":true,"saturday":true}
    [clock] repeatDays
      ✓ [clock] {} has 0 repeat days
      ✓ [clock] {"monday":true} has 1 repeat days
      ✓ [clock] {"monday":true,"tuesday":true} has 2 repeat days
      ✓ [clock] {"monday":true,"tuesday":true,"wednesday":true} has 3 repeat days
      ◦ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true} has 4 repe      ✓ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true} has 4 repeat days
      ◦ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":tr      ✓ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true} has 5 repeat days
      ◦ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":tr      ✓ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true} has 6 repeat days
      ◦ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":tr      ✓ [clock] {"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"sunday":true} has 7 repeat days
    [clock] #isAlarmPassToday
      ✓ [clock] prior hour, prior minute
      ✓ [clock] prior hour, current minute
      ✓ [clock] prior hour, later minute
      ✓ [clock] current hour, prior minute
      ✓ [clock] current hour, current minute
      ✓ [clock] current hour, later minute
      ✓ [clock] later hour, prior minute
      ✓ [clock] later hour, current minute
      ✓ [clock] later hour, later minute
    [clock] Next alarm time
      ✓ [clock] No repeat -> today
      ✓ [clock] No repeat -> tomorrow
      ✓ [clock] Check alarm-today with repeat wednesday
      ✓ [clock] Check alarm-passed with repeat thursday
      ✓ [clock] Check alarm-passed with repeat friday
      ✓ [clock] Check alarm-passed with repeat saturday
      ✓ [clock] Check alarm-passed with repeat sunday
      ✓ [clock] Check alarm-passed with repeat monday
      ✓ [clock] Check alarm-passed with repeat tuesday
      ✓ [clock] Check alarm-passed with repeat wednesday
    [clock] #changeSelectByValue
      ✓ [clock] correctly selects the specified element
      ✓ [clock] has no effect when specified element does not exist
    [clock] #formatTime
      ✓ [clock] 12:00am, with 12 hour clock settings
      ✓ [clock] 12:30pm, with 12 hour clock settings
      ✓ [clock] 11:30pm, with 12 hour clock settings
      ✓ [clock] 12:30am, with 24 hour clock settings
      ✓ [clock] 12:30pm, with 24 hour clock settings
      ✓ [clock] 11:30pm, with 24 hour clock settings
    [clock] #parseTime
      ✓ [clock] 12:10am
      ✓ [clock] 12:00pm
      ✓ [clock] 11:30pm
      ✓ [clock] 00:15
      ✓ [clock] 23:45


  80 tests complete (4 seconds)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>