blob: a108a55a02938e6ddc55d64f54c639c6e5c1bd4b [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tracing/core/test_utils.html">
<link rel="import" href="testing_common.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('sortQueryPart sorts query string', function() {
var query = 'c=1&b=2&a=3';
assert.equal('a=3&b=2&c=1',
testing_common.sortQueryPart(query));
});
test('sortQueryPart sorts query string with path', function() {
var query = 'path?c=1&b=2&a=3';
assert.equal('path?a=3&b=2&c=1',
testing_common.sortQueryPart(query));
});
test('sortQueryPart does not support repeated keys', function() {
var query = 'path?a=1&a=3&a=2';
assert.equal('path?a=2',
testing_common.sortQueryPart(query));
});
});
</script>