OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import time | 6 import time |
7 import unittest | 7 import unittest |
8 | 8 |
9 from telemetry.core import platform as platform_module | 9 from telemetry.core import platform as platform_module |
10 from telemetry.internal.app import android_app | 10 from telemetry.internal.app import android_app |
11 from telemetry.internal.backends import android_app_backend | 11 from telemetry.internal.backends import android_app_backend |
12 from telemetry.internal.platform import android_device | 12 from telemetry.internal.platform import android_device |
13 from telemetry.testing import options_for_unittests | 13 from telemetry.testing import options_for_unittests |
14 | 14 |
15 from pylib.device import intent | 15 from devil.android.sdk import intent |
16 | 16 |
17 | 17 |
18 class AndroidAppTest(unittest.TestCase): | 18 class AndroidAppTest(unittest.TestCase): |
19 def setUp(self): | 19 def setUp(self): |
20 self._options = options_for_unittests.GetCopy() | 20 self._options = options_for_unittests.GetCopy() |
21 self._device = android_device.GetDevice(self._options) | 21 self._device = android_device.GetDevice(self._options) |
22 | 22 |
23 def CreateAndroidApp(self, start_intent): | 23 def CreateAndroidApp(self, start_intent): |
24 platform = platform_module.GetPlatformForDevice(self._device, self._options) | 24 platform = platform_module.GetPlatformForDevice(self._device, self._options) |
25 platform_backend = platform._platform_backend | 25 platform_backend = platform._platform_backend |
(...skipping 20 matching lines...) Expand all Loading... |
46 # TODO(ariblue): Replace the app used in this test with one in which the | 46 # TODO(ariblue): Replace the app used in this test with one in which the |
47 # setWebContentsDebuggingEnabled method is called on the WebView class. | 47 # setWebContentsDebuggingEnabled method is called on the WebView class. |
48 # This will configure webviews for debugging with chrome devtools inspector | 48 # This will configure webviews for debugging with chrome devtools inspector |
49 # and allow us to remove this check. | 49 # and allow us to remove this check. |
50 if search_process._devtools_client is None: | 50 if search_process._devtools_client is None: |
51 return | 51 return |
52 | 52 |
53 webview = search_app.GetProcess(':search').GetWebViews().pop() | 53 webview = search_app.GetProcess(':search').GetWebViews().pop() |
54 webview.Navigate('https://www.google.com/search?q=flowers') | 54 webview.Navigate('https://www.google.com/search?q=flowers') |
55 time.sleep(5) | 55 time.sleep(5) |
OLD | NEW |