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
3 // found in the LICENSE file.
5 // Include test fixture.
6 GEN_INCLUDE(['../testing/chromevox_unittest_base.js']);
11 * @extends {ChromeVoxUnitTestBase}
13 function StringUtilUnitTest() {
14 ChromeVoxUnitTestBase.call(this);
17 StringUtilUnitTest.prototype = {
18 __proto__: ChromeVoxUnitTestBase.prototype,
26 TEST_F('StringUtilUnitTest', 'longestCommonPrefixLength', function() {
27 var lcpl = StringUtil.longestCommonPrefixLength;
28 assertEquals(0, lcpl('', ''));
29 assertEquals(0, lcpl('', 'hello'));
30 assertEquals(0, lcpl('hello', ''));
31 assertEquals(1, lcpl('hi', 'hello'));