diff options
Diffstat (limited to 'chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js')
-rw-r--r-- | chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js b/chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js new file mode 100644 index 00000000000..7adbc57a8d3 --- /dev/null +++ b/chromium/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js @@ -0,0 +1,31 @@ +// Copyright 2014 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. + +// Include test fixture. +GEN_INCLUDE(['../testing/chromevox_unittest_base.js']); + +/** + * Test fixture. + * @constructor + * @extends {ChromeVoxUnitTestBase} + */ +function CvoxSelectionUtilUnitTest() {} + +CvoxSelectionUtilUnitTest.prototype = { + __proto__: ChromeVoxUnitTestBase.prototype, + + /** @override */ + closureModuleDeps: [ + 'cvox.SelectionUtil' + ] +}; + +TEST_F('CvoxSelectionUtilUnitTest', 'SimpleFindPos', function() { + this.loadDoc(function() {/*! + <div id="foo" style="position:absolute;top:50px"> + </div> + */}); + element = $('foo'); + assertEquals(cvox.SelectionUtil.findPos_(element)[1], 50); +}); |