Index: chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js b/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7cd4d543df03bec31ec2ae5846a920fc3d77d100 |
--- /dev/null |
+++ b/chrome/browser/resources/chromeos/chromevox/common/selection_util_test.js |
@@ -0,0 +1,31 @@ |
+// Copyright 2013 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); |
+}); |