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

Side by Side Diff: tools/variations/fieldtrial_util_unittest.py

Issue 2778313003: Fix perfbotnot feature param setting from trial testing config. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « tools/variations/fieldtrial_util.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 unittest 5 import unittest
6 6
7 import fieldtrial_util 7 import fieldtrial_util
8 import os 8 import os
9 import tempfile 9 import tempfile
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ] 59 ]
60 } 60 }
61 ] 61 ]
62 }''' 62 }'''
63 result = self.runGenerateArgs(config, 'win') 63 result = self.runGenerateArgs(config, 'win')
64 self.assertEqual(['--force-fieldtrials=' 64 self.assertEqual(['--force-fieldtrials='
65 'BrowserBlackList/Enabled/SimpleParams/Default/c/d.', 65 'BrowserBlackList/Enabled/SimpleParams/Default/c/d.',
66 '--force-fieldtrial-params=' 66 '--force-fieldtrial-params='
67 'SimpleParams.Default:id/abc,' 67 'SimpleParams.Default:id/abc,'
68 'c.d%2E:url/http%3A%2F%2Fwww%2Egoogle%2Ecom', 68 'c.d%2E:url/http%3A%2F%2Fwww%2Egoogle%2Ecom',
69 '--enable-features=a,b,x', 69 '--enable-features="a<SimpleParams,b<SimpleParams,x<c"',
70 '--disable-features=y'], result) 70 '--disable-features="y<c"'], result)
perezju 2017/03/30 08:16:06 Are we sure that those quotes are needed there? T
Alexei Svitkine (slow) 2017/03/30 14:28:30 You're right that it might not be necessary, thoug
71 71
72 def test_DuplicateEnableFeatures(self): 72 def test_DuplicateEnableFeatures(self):
73 config = '''{ 73 config = '''{
74 "X": [ 74 "X": [
75 { 75 {
76 "platforms": ["win"], 76 "platforms": ["win"],
77 "experiments": [ 77 "experiments": [
78 { 78 {
79 "name": "x", 79 "name": "x",
80 "enable_features": ["x"] 80 "enable_features": ["x"]
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 ] 156 ]
157 }''' 157 }'''
158 with self.assertRaises(Exception) as raised: 158 with self.assertRaises(Exception) as raised:
159 self.runGenerateArgs(config, 'win') 159 self.runGenerateArgs(config, 'win')
160 self.assertEqual('Conflicting features set as both enabled and disabled: x', 160 self.assertEqual('Conflicting features set as both enabled and disabled: x',
161 str(raised.exception)) 161 str(raised.exception))
162 162
163 if __name__ == '__main__': 163 if __name__ == '__main__':
164 unittest.main() 164 unittest.main()
OLDNEW
« no previous file with comments | « tools/variations/fieldtrial_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698