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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py

Issue 1294603002: Add run-webkit-tests support and generate baselines for win8 and win10. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove 64 bit versions references Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/win.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 def test_versions(self): 73 def test_versions(self):
74 port = self.make_port() 74 port = self.make_port()
75 self.assertIn(port.name(), ('win-xp', 'win-win7')) 75 self.assertIn(port.name(), ('win-xp', 'win-win7'))
76 76
77 self.assert_name(None, 'xp', 'win-xp') 77 self.assert_name(None, 'xp', 'win-xp')
78 self.assert_name('win', 'xp', 'win-xp') 78 self.assert_name('win', 'xp', 'win-xp')
79 self.assert_name('win-xp', 'xp', 'win-xp') 79 self.assert_name('win-xp', 'xp', 'win-xp')
80 self.assert_name('win-xp', '7sp0', 'win-xp') 80 self.assert_name('win-xp', '7sp0', 'win-xp')
81 81
82 self.assert_name(None, '10', 'win-win10')
83 self.assert_name('win', '10', 'win-win10')
84 self.assert_name('win-win10', '10', 'win-win10')
85 self.assert_name('win-win10', 'xp', 'win-win10')
86
87 self.assert_name(None, '8', 'win-win8')
88 self.assert_name(None, '8.1', 'win-win8')
89 self.assert_name('win', '8', 'win-win8')
90 self.assert_name('win', '8.1', 'win-win8')
91 self.assert_name('win-win8', '8', 'win-win8')
92 self.assert_name('win-win8', '8.1', 'win-win8')
93 self.assert_name('win-win8', 'vista', 'win-win8')
94
95 self.assert_name(None, '7sp1', 'win-win7')
82 self.assert_name(None, '7sp0', 'win-win7') 96 self.assert_name(None, '7sp0', 'win-win7')
83 self.assert_name(None, 'vista', 'win-win7') 97 self.assert_name(None, 'vista', 'win-win7')
98 self.assert_name('win', '7sp1', 'win-win7')
84 self.assert_name('win', '7sp0', 'win-win7') 99 self.assert_name('win', '7sp0', 'win-win7')
85 self.assert_name('win-win7', 'xp', 'win-win7') 100 self.assert_name('win', 'vista', 'win-win7')
101 self.assert_name('win-win7', '7sp1', 'win-win7')
86 self.assert_name('win-win7', '7sp0', 'win-win7') 102 self.assert_name('win-win7', '7sp0', 'win-win7')
87 self.assert_name('win-win7', 'vista', 'win-win7') 103 self.assert_name('win-win7', 'vista', 'win-win7')
104 self.assert_name('win-win7', 'xp', 'win-win7')
105
106 self.assert_name(None, 'future', 'win-win10')
107 self.assert_name('win', 'future', 'win-win10')
108 self.assert_name('win-win8', 'future', 'win-win8')
109 self.assert_name('win-win10', 'future', 'win-win10')
88 110
89 self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'win-xp ') 111 self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'win-xp ')
90 112
113 def assert_baseline_paths(self, port_name, *expected_paths):
114 port = self.make_port(port_name=port_name)
115 self.assertEqual(port.baseline_path(), port._webkit_baseline_path(expect ed_paths[0]))
116 self.assertEqual(len(port.baseline_search_path()), len(expected_paths))
117 for i, path in enumerate(expected_paths):
118 self.assertTrue(port.baseline_search_path()[i].endswith(path))
119
91 def test_baseline_path(self): 120 def test_baseline_path(self):
92 port = self.make_port(port_name='win-xp') 121 self.assert_baseline_paths('win-xp', 'win-xp', '/win7', '/win8', '/win')
93 self.assertEqual(port.baseline_path(), port._webkit_baseline_path('win-x p')) 122 self.assert_baseline_paths('win-win7', 'win7', 'win8', '/win')
94 123 self.assert_baseline_paths('win-win8', 'win8', '/win')
95 port = self.make_port(port_name='win-win7') 124 self.assert_baseline_paths('win-win10', 'win')
96 self.assertEqual(port.baseline_path(), port._webkit_baseline_path('win') )
97 125
98 def test_build_path(self): 126 def test_build_path(self):
99 # Test that optional paths are used regardless of whether they exist. 127 # Test that optional paths are used regardless of whether they exist.
100 options = MockOptions(configuration='Release', build_directory='/foo') 128 options = MockOptions(configuration='Release', build_directory='/foo')
101 self.assert_build_path(options, ['/mock-checkout/out/Release'], '/foo/Re lease') 129 self.assert_build_path(options, ['/mock-checkout/out/Release'], '/foo/Re lease')
102 130
103 # Test that optional relative paths are returned unmodified. 131 # Test that optional relative paths are returned unmodified.
104 options = MockOptions(configuration='Release', build_directory='foo') 132 options = MockOptions(configuration='Release', build_directory='foo')
105 self.assert_build_path(options, ['/mock-checkout/out/Release'], 'foo/Rel ease') 133 self.assert_build_path(options, ['/mock-checkout/out/Release'], 'foo/Rel ease')
106 134
(...skipping 15 matching lines...) Expand all
122 150
123 def test_operating_system(self): 151 def test_operating_system(self):
124 self.assertEqual('win', self.make_port().operating_system()) 152 self.assertEqual('win', self.make_port().operating_system())
125 153
126 def test_driver_name_option(self): 154 def test_driver_name_option(self):
127 self.assertTrue(self.make_port()._path_to_driver().endswith('content_she ll.exe')) 155 self.assertTrue(self.make_port()._path_to_driver().endswith('content_she ll.exe'))
128 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver.exe')) 156 self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDri ver'))._path_to_driver().endswith('OtherDriver.exe'))
129 157
130 def test_path_to_image_diff(self): 158 def test_path_to_image_diff(self):
131 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff.exe') 159 self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout /out/Release/image_diff.exe')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/win.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698