Ejemplo n.º 1
0
 def testModulesPassedToInstallApplicationForBundle(self):
     self.finder_options.modules_to_install = ['base']
     self.fs.CreateFile('foo_bundle')
     possible_browser = android_browser_finder.PossibleAndroidBrowser(
         'android-chromium-bundle', self.finder_options, self.fake_platform,
         android_browser_backend_settings.ANDROID_CHROMIUM_BUNDLE,
         'foo_bundle')
     with mock.patch.object(self.fake_platform, 'InstallApplication') as m:
         possible_browser.UpdateExecutableIfNeeded()
         m.assert_called_with('foo_bundle', modules=set(['base']))
Ejemplo n.º 2
0
 def testAndroidWeblayerTagInTypExpectationsTags(self):
     self.finder_options.modules_to_install = ['base']
     self.fs.CreateFile('foo_bundle')
     with mock.patch.object(self.fake_platform,
                            'GetTypExpectationsTags',
                            return_value=['android']):
         possible_browser = android_browser_finder.PossibleAndroidBrowser(
             'android-weblayer', self.finder_options, self.fake_platform,
             android_browser_backend_settings.ANDROID_WEBLAYER,
             'foo_bundle')
         self.assertIn('android-weblayer',
                       possible_browser.GetTypExpectationsTags())
         self.assertIn('android', possible_browser.GetTypExpectationsTags())
Ejemplo n.º 3
0
 def testAndroid_Not_WebviewTagInTypExpectationsTags(self):
   self.finder_options.modules_to_install = ['base']
   self.fs.CreateFile('foo_bundle')
   with mock.patch.object(self.fake_platform,
                          'GetTypExpectationsTags', return_value=['android']):
     possible_browser = android_browser_finder.PossibleAndroidBrowser(
         'android-chromium-bundle', self.finder_options, self.fake_platform,
         android_browser_backend_settings.ANDROID_CHROMIUM_BUNDLE,
         'foo_bundle')
     self.assertIn('android-not-webview',
                   possible_browser.GetTypExpectationsTags())
     self.assertIn('android',
                   possible_browser.GetTypExpectationsTags())