Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py

Issue 3226005: Refactory UI to grab shortcut keys, and tests to not look for triggers. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py
diff --git a/client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py b/client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py
index 7b3a09014b603cfa6d9583a5cfebfa9e96a8ee2e..b5dc38d58c33db6eb18905bd1563bd449ab690f8 100644
--- a/client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py
+++ b/client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.py
@@ -310,6 +310,7 @@ class DevRecGpio:
def gpio_state(self, name):
return self.table[name][1]
+
class factory_DeveloperRecovery(test.test):
version = 1
preserve_srcdir = True
@@ -322,23 +323,10 @@ class factory_DeveloperRecovery(test.test):
utils.system("/usr/sbin/gpio_setup")
self._gpio_root=gpio_root
- def key_release_callback(self, widget, event):
- self._ft_state.exit_on_trigger(event)
- return True
-
- def register_callbacks(self, window):
- window.connect('key-release-event', self.key_release_callback)
- window.add_events(gtk.gdk.KEY_RELEASE_MASK)
-
- def run_once(self,
- test_widget_size=None,
- trigger_set=None,
- layout=None):
+ def run_once(self, layout=None):
factory.log('%s run_once' % self.__class__)
- self._ft_state = ful.State(trigger_set)
-
os.chdir(self.srcdir)
dr_image = cairo.ImageSurface.create_from_png('%s.png' % layout)
image_size = (dr_image.get_width(), dr_image.get_height())
@@ -353,9 +341,6 @@ class factory_DeveloperRecovery(test.test):
test.start_countdown(test.timeout)
- self._ft_state.run_test_widget(
- test_widget=drawing_area,
- test_widget_size=test_widget_size,
- window_registration_callback=self.register_callbacks)
+ ful.run_test_widget(self.job, drawing_area)
factory.log('%s run_once finished' % self.__class__)
« no previous file with comments | « client/site_tests/factory_Camera/factory_Camera.py ('k') | client/site_tests/factory_Display/factory_Display.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698