1 <!DOCTYPE html> 2 <!-- 3 Copyright 2015 The Chromium Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style license that can be 5 found in the LICENSE file. 6 --> 7 8 <link rel="import" href="/dashboard/elements/test-picker.html"> 9 10 <link rel="import" href="/tracing/core/test_utils.html"> 11 12 <script> 13 'use strict'; 14 15 tr.b.unittest.testSuite(function() { 16 17 var testOptions = { 18 setUp: function() { 19 }, 20 21 tearDown: function() { 22 } 23 }; 24 25 test('getSuiteItems', function() { 26 var testPicker = document.createElement('test-picker'); 27 testPicker.testSuites = { 28 'endure': { 29 'mas': {'Chromium': {'mac': false, 'win7': true}}, 30 'dep': true 31 }, 32 'dromaeo': { 33 'mas': {'Chromium': {'mac': false, 'win7': false}} 34 }, 35 'scrolling': { 36 'mas': {'Chromium': {'mac': false, 'win7': false}}, 37 'mon': ['average/www.yahoo.com'] 38 } 39 }; 40 var suiteItems = testPicker.getSuiteItems(); 41 // Test suites should be in the order of monitored, unmonitored, 42 // and deprecated. 43 var expectedSuites = ['scrolling', 'dromaeo', 'endure']; 44 var actualSuites = []; 45 for (var i = 0; i < suiteItems.length; i++) { 46 actualSuites.push(suiteItems[i].name); 47 } 48 assert.deepEqual(actualSuites, expectedSuites); 49 }, testOptions); 50 51 }); 52 </script> 53