| Index: tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py
|
| diff --git a/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py b/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..643cf8096787be80ce3bad7392c2ae3f76ba3fb7
|
| --- /dev/null
|
| +++ b/tools/chrome_remote_control/chrome_remote_control/let_it_run_interaction.py
|
| @@ -0,0 +1,22 @@
|
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +import time
|
| +
|
| +from chrome_remote_control import interaction
|
| +
|
| +class LetItRunInteraction(interaction.Interaction):
|
| + def SupportedForPage(self, page, tab):
|
| + if page.let_it_run_time_in_seconds == None:
|
| + raise interaction.InteractionNotSupported(
|
| + 'Page %s must specify let_it_run_time_in_seconds' % str(page))
|
| +
|
| + def PerformInteraction(self, page, tab, test):
|
| + test.WillPerformInteraction(self, page, tab)
|
| + time.sleep(page.let_it_run_time_in_seconds)
|
| + test.DidPerformInteraction(self, page, tab)
|
| +
|
| + def CleanUp(self, page, tab):
|
| + pass
|
| +
|
| +interaction.RegisterClass('let_it_run', LetItRunInteraction)
|
|
|