1 <!DOCTYPE html> 2 <!-- 3 Copyright 2016 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="/tracing/core/test_utils.html"> 9 10 <link rel="import" href="testing_common.html"> 11 12 <script> 13 'use strict'; 14 15 tr.b.unittest.testSuite(function() { 16 17 test('sortQueryPart sorts query string', function() { 18 var query = 'c=1&b=2&a=3'; 19 assert.equal('a=3&b=2&c=1', 20 testing_common.sortQueryPart(query)); 21 }); 22 23 test('sortQueryPart sorts query string with path', function() { 24 var query = 'path?c=1&b=2&a=3'; 25 assert.equal('path?a=3&b=2&c=1', 26 testing_common.sortQueryPart(query)); 27 }); 28 29 test('sortQueryPart does not support repeated keys', function() { 30 var query = 'path?a=1&a=3&a=2'; 31 assert.equal('path?a=2', 32 testing_common.sortQueryPart(query)); 33 }); 34 35 }); 36 </script> 37