aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/editor/focus_test.html
diff options
context:
space:
mode:
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/editor/focus_test.html')
-rw-r--r--contexts/data/lib/closure-library/closure/goog/editor/focus_test.html66
1 files changed, 0 insertions, 66 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/editor/focus_test.html b/contexts/data/lib/closure-library/closure/goog/editor/focus_test.html
deleted file mode 100644
index 749f6fe..0000000
--- a/contexts/data/lib/closure-library/closure/goog/editor/focus_test.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<!--
-
- @author marcosalmeida@google.com (Marcos Almeida)
--->
-<html>
-<!--
-Copyright 2009 The Closure Library Authors. All Rights Reserved.
-
-Use of this source code is governed by the Apache License, Version 2.0.
-See the COPYING file for details.
--->
-<head>
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<title>Closure Unit Tests - goog.editor.focus</title>
-<script src="../base.js"></script>
-<script>
- goog.require('goog.dom.selection');
- goog.require('goog.editor.focus');
- goog.require('goog.editor.BrowserFeature');
- goog.require('goog.testing.jsunit');
-</script>
-</head>
-<body>
-
- <div>
- <input type="text" id="myInput" value="my value">
- <a href="" id="dummyLink">dummy</a>
- </div>
-
-<script>
-
- function setUp() {
- // Make sure focus is not in the input to begin with.
- var dummy = document.getElementById('dummyLink');
- dummy.focus();
- }
-
-
- /**
- * Tests that focusInputField() puts focus in the input field and sets the
- * cursor to the end of the text cointained inside.
- */
- function testFocusInputField() {
- var input = document.getElementById('myInput');
- assertNotEquals('Input should not be focused initially',
- input,
- document.activeElement);
-
- goog.editor.focus.focusInputField(input);
- if (goog.editor.BrowserFeature.HAS_ACTIVE_ELEMENT) {
- assertEquals('Input should be focused after call to focusInputField',
- input,
- document.activeElement);
- }
- assertEquals('Selection should start at the end of the input text',
- input.value.length,
- goog.dom.selection.getStart(input));
- assertEquals('Selection should end at the end of the input text',
- input.value.length,
- goog.dom.selection.getEnd(input));
- }
-
-</script>
-</body>
-</html>