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

Unified Diff: client/site_tests/factory_ExternalStorage/factory_ExternalStorage.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_ExternalStorage/factory_ExternalStorage.py
diff --git a/client/site_tests/factory_ExternalStorage/factory_ExternalStorage.py b/client/site_tests/factory_ExternalStorage/factory_ExternalStorage.py
index 5ae943233b64850e037e122e8bfb009d17eaa8f7..a03e3c08501693b909bf2d6f38febbc77c53c294 100644
--- a/client/site_tests/factory_ExternalStorage/factory_ExternalStorage.py
+++ b/client/site_tests/factory_ExternalStorage/factory_ExternalStorage.py
@@ -54,23 +54,12 @@ class factory_ExternalStorage(test.test):
version = 1
preserve_srcdir = True
- def key_release_callback(self, widget, event):
- char = event.keyval in range(32,127) and chr(event.keyval) or None
- factory.log('key_release_callback %s(%s)' %
- (event.keyval, char))
- self._ft_state.exit_on_trigger(event)
- return True
-
def expose_event(self, widget, event):
context = widget.window.cairo_create()
context.set_source_surface(self._image, 0, 0)
context.paint()
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 rescan_storage(self, subtest_tag):
if self._state == _STATE_WAIT_INSERT:
new_devices = find_all_storage_dev()
@@ -105,8 +94,6 @@ class factory_ExternalStorage(test.test):
return True
def run_once(self,
- test_widget_size=None,
- trigger_set=None,
subtest_tag=None,
media=None):
@@ -135,8 +122,6 @@ class factory_ExternalStorage(test.test):
factory.log('subtest_tag = %s' % subtest_tag)
- self._ft_state = ful.State(trigger_set)
-
label = gtk.Label('')
label.modify_font(pango.FontDescription('courier new condensed 20'))
label.set_alignment(0.5, 0.5)
@@ -163,10 +148,7 @@ class factory_ExternalStorage(test.test):
test_widget.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
test_widget.add(vbox)
- self._ft_state.run_test_widget(
- test_widget=test_widget,
- test_widget_size=test_widget_size,
- window_registration_callback=self.register_callbacks)
+ ful.run_test_widget(self.job, test_widget)
if self._error:
raise error.TestFail(self._error)
« no previous file with comments | « client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py ('k') | client/site_tests/factory_Keyboard/factory_Keyboard.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698