Ejemplo n.º 1
0
 def test_graphics_type(self):
     port = chromium_mac.ChromiumMacPort(port_name='chromium-cg-mac')
     self.assertEquals('cpu-cg', port.graphics_type())
     port = chromium_mac.ChromiumMacPort(port_name='chromium-mac')
     self.assertEquals('cpu', port.graphics_type())
     # For now, Mac defaults to cpu graphics type.
     port = chromium_mac.ChromiumMacPort()
     self.assertEquals('cpu', port.graphics_type())
Ejemplo n.º 2
0
    def test_baseline_path(self):
        port = chromium_mac.ChromiumMacPort(port_name='chromium-mac-leopard')
        self.assertEquals(port.baseline_path(),
                          port._webkit_baseline_path('chromium-mac-leopard'))

        port = chromium_mac.ChromiumMacPort(
            port_name='chromium-mac-snowleopard')
        self.assertEquals(port.baseline_path(),
                          port._webkit_baseline_path('chromium-mac'))
Ejemplo n.º 3
0
    def test_versions(self):
        port = chromium_mac.ChromiumMacPort()
        self.assertTrue(port.name() in ('chromium-cg-mac-leopard',
                                        'chromium-cg-mac-snowleopard',
                                        'chromium-cg-mac-future'))

        self.assert_name(None, '10.5.3', 'chromium-cg-mac-leopard')
        self.assert_name('chromium-cg-mac', '10.5.3',
                         'chromium-cg-mac-leopard')
        self.assert_name('chromium-cg-mac-leopard', '10.5.3',
                         'chromium-cg-mac-leopard')
        self.assert_name('chromium-cg-mac-leopard', '10.6.3',
                         'chromium-cg-mac-leopard')

        self.assert_name(None, '10.6.3', 'chromium-cg-mac-snowleopard')
        self.assert_name('chromium-cg-mac', '10.6.3',
                         'chromium-cg-mac-snowleopard')
        self.assert_name('chromium-cg-mac-snowleopard', '10.5.3',
                         'chromium-cg-mac-snowleopard')
        self.assert_name('chromium-cg-mac-snowleopard', '10.6.3',
                         'chromium-cg-mac-snowleopard')

        self.assert_name(None, '10.7', 'chromium-cg-mac-lion')
        self.assert_name(None, '10.7.3', 'chromium-cg-mac-lion')
        self.assert_name(None, '10.8', 'chromium-cg-mac-future')
        self.assert_name('chromium-cg-mac', '10.7.3', 'chromium-cg-mac-lion')
        self.assert_name('chromium-cg-mac-future', '10.4.3',
                         'chromium-cg-mac-future')
        self.assert_name('chromium-cg-mac-future', '10.5.3',
                         'chromium-cg-mac-future')
        self.assert_name('chromium-cg-mac-future', '10.6.3',
                         'chromium-cg-mac-future')
        self.assert_name('chromium-cg-mac-future', '10.7.3',
                         'chromium-cg-mac-future')

        self.assertRaises(
            AssertionError, self.assert_name, None, '10.4.1',
            'should-raise-assertion-so-this-value-does-not-matter')
Ejemplo n.º 4
0
 def assert_name(self, port_name, os_version_string, expected):
     port = chromium_mac.ChromiumMacPort(
         port_name=port_name, os_version_string=os_version_string)
     self.assertEquals(expected, port.name())
Ejemplo n.º 5
0
 def test_check_wdiff(self):
     port = chromium_mac.ChromiumMacPort()
     self.assertTrue(port.check_wdiff())
Ejemplo n.º 6
0
    def test_check_wdiff_install(self):
        port = chromium_mac.ChromiumMacPort()

        # Currently is always true, just logs if missing.
        self.assertTrue(port._check_wdiff_install())