OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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 from dashboard.pinpoint.models import quest | 7 from dashboard.pinpoint.models import quest |
8 from dashboard.pinpoint.models import quest_generator | 8 from dashboard.pinpoint.models import quest_generator |
9 | 9 |
10 | 10 |
11 _RUN_TEST_ARGUMENTS = [ | 11 _RUN_TEST_ARGUMENTS = [ |
12 'benchmark_name', '--story-filter', 'story_name', | 12 'benchmark_name', '--story-filter', 'story_name', |
13 '--pageset-repeat', '10', '--browser', 'release', | 13 '--pageset-repeat', '10', '--browser', 'release', |
14 '-v', '--upload-results', '--output-format', 'chartjson', | 14 '-v', '--upload-results', '--output-format=chartjson', |
15 '--isolated-script-test-output', '${ISOLATED_OUTDIR}/output.json', | 15 '--isolated-script-test-output', '${ISOLATED_OUTDIR}/output.json', |
16 '--isolated-script-test-chartjson-output', | 16 '--isolated-script-test-chartjson-output', |
17 '${ISOLATED_OUTDIR}/chartjson-output.json', | 17 '${ISOLATED_OUTDIR}/chartjson-output.json', |
18 ] | 18 ] |
19 | 19 |
20 | 20 |
21 class QuestGeneratorTest(unittest.TestCase): | 21 class QuestGeneratorTest(unittest.TestCase): |
22 | 22 |
23 def testQuestGenerator(self): | 23 def testQuestGenerator(self): |
24 with self.assertRaises(TypeError): | 24 with self.assertRaises(TypeError): |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 expected_dict = { | 113 expected_dict = { |
114 'dimensions': {'key': 'value'}, | 114 'dimensions': {'key': 'value'}, |
115 'configuration': 'chromium-rel-mac11-pro', | 115 'configuration': 'chromium-rel-mac11-pro', |
116 'browser': 'release', | 116 'browser': 'release', |
117 'benchmark': 'page_cycler_v2_site_isolation.basic_oopif', | 117 'benchmark': 'page_cycler_v2_site_isolation.basic_oopif', |
118 'story': 'http://www.fifa.com/', | 118 'story': 'http://www.fifa.com/', |
119 'metric': 'pcv1-cold@@timeToFirstMeaningfulPaint_avg', | 119 'metric': 'pcv1-cold@@timeToFirstMeaningfulPaint_avg', |
120 'repeat_count': 10, | 120 'repeat_count': 10, |
121 } | 121 } |
122 self.assertEqual(generator.AsDict(), expected_dict) | 122 self.assertEqual(generator.AsDict(), expected_dict) |
OLD | NEW |