A FAFT test case to check the developer firmware screen timeout.

When booting in developer mode, the firmware shows a screen to warn user
the disk image is not secured. If a user press Ctrl-D or a timeout reaches,
it will boot to developer mode. This test is to verify the timeout period.

This test tries to boot the system in developer mode twice.
The first one will repeatly press Ctrl-D on booting in order to reduce
the time on developer warning screen. The second one will do nothing and
wait the developer screen timeout. The time difference of these two boots
is close to the developer screen timeout.

BUG=chromium-os:19710
TEST=run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
        servo_vid=0x18d1 servo_pid=0x5001" DevScreenTimeout

Change-Id: I57dbb09778a62cf64e002feb9b2bccb129da50c2
Reviewed-on: https://gerrit.chromium.org/gerrit/12613
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index c30cf75..a37c62e 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -76,7 +76,7 @@
     USB_PLUG_DELAY = 10
     SYNC_DELAY = 5
 
-    _faft_template = None
+    _faft_template = {}
     _faft_sequence = ()
 
 
@@ -96,7 +96,7 @@
     def cleanup(self):
         """Autotest cleanup function."""
         self._faft_sequence = ()
-        self._faft_template = None
+        self._faft_template = {}
         super(FAFTSequence, self).cleanup()
 
 
@@ -330,9 +330,6 @@
         """
         # Change the default firmware_action for dev mode passing the fw screen.
         self.register_faft_template({
-            'state_checker': (None),
-            'userspace_action': (None),
-            'reboot_action': (self.sync_and_hw_reboot),
             'firmware_action': (self.wait_fw_screen_and_ctrl_d if dev_mode
                                 else None),
         })
@@ -462,10 +459,12 @@
     def register_faft_template(self, template):
         """Register FAFT template, the default FAFT_STEP of each step.
 
+        Any missing field falls back to the original faft_template.
+
         Args:
           template: A FAFT_STEP dict.
         """
-        self._faft_template = template
+        self._faft_template.update(template)
 
 
     def register_faft_sequence(self, sequence):