FUEL/0.1/Tests

From MozillaWiki
< FUEL‎ | 0.1
Jump to: navigation, search

< FUEL/0.1

Application

  • Check for existence of Application - [expect object is defined]
  • Complete sub tests for each Application property
    • Console
    • Storage
    • Preferences
    • Events
      • events are - "start", "ready", "idle", "quit"
    • Extensions

Extension

[TODO] Need to find and use a known extension for these tests

  • Use extension.id to read the id - [expect known id]
  • Use extension.name to read the name - [expect known name]
  • Complete sub tests for each Extension property
    • Storage
    • Preferences
    • Events
      • events are - "install", "uninstall"

Console

[TODO] There appears to be no automatic way to verify, so we will manually check the Error Console after the tests complete.

  • Use console.log to write test names during all other tests - [succeed]
  • [TODO] Use console.display to open the Error Console window

Storage

  • Use storage.has to check for non-existent item - [expect false]
  • Use storage.get to check value of for non-existent item - [expect default value]
  • Use storage.set to add an item
  • Use storage.has to check for item - [expect true]
  • Use storage.get to check value of item - [expect set value]
  • Use storage.set to overwrite value of item
  • Use storage.get to check overwritten value of item - [expect overwritten value]
  • Use events to monitor when a storage item changes

Preferences

  • REPEAT for STRING, INT and BOOLEAN
    • Use storage.get to check value of for non-existent item - [expect default value]
    • Use storage.set to add a pref
    • Use storage.get to check value of pref - [expect set value]
    • Use storage.set to overwrite value of pref
    • Use storage.get to check overwritten value of pref - [expect overwritten value]
  • Use storage.set to add a STRING pref
  • Use storage.set to overwrite with an INT pref [expect ???]
  • Use storage.get to check overwritten INT pref [expect ???]
  • Use storage.set to add a INT pref
  • Use storage.set to overwrite with an BOOLEAN pref [expect ???]
  • Use storage.get to check overwritten BOOLEAN pref [expect ???]
  • Use events to monitor when a pref changes

Events

  • Use events.add to attach an event listener
  • Cause/Wait for the event to fire - [expect event listener to fire]

Extensions

[TODO] Need at least one extension loaded to test

  • Use extensions.has to check for a nonexistent extension - [expect false]
  • Use extensions.has to check for an known extension - [expect true]
  • Use extensions.get to check for a nonexistent extension - [expect null]
  • Use extensions.get to check for an known extension - [expect valid Extension]