summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMike Rennie2013-12-02 14:06:18 (EST)
committer Gerrit Code Review @ Eclipse.org2013-12-03 12:38:56 (EST)
commitd09b86b94457a23bae6210a911df8d5dee28917a (patch)
treea2f5e4a381ab13c2d8b0cfdd27accc12ed2c16b7
parentf17433a32685f771bc37986183e1f4ad81a9c522 (diff)
downloadorg.eclipse.orion.client-d09b86b94457a23bae6210a911df8d5dee28917a.zip
org.eclipse.orion.client-d09b86b94457a23bae6210a911df8d5dee28917a.tar.gz
org.eclipse.orion.client-d09b86b94457a23bae6210a911df8d5dee28917a.tar.bz2
Bug 422963 - Move the remainder of the Esprima tests in the JS bundlev20131203-1738refs/changes/17/19217/5
Change-Id: I0610259de3beae09f3f4749f2b400624d270cc6e Signed-off-by: Mike Rennie <Michael_Rennie@ca.ibm.com>
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/occurrences.js11
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/javascript/outliner.js2
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.html37
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.js (renamed from bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js)27
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.html (renamed from bundles/org.eclipse.orion.client.javascript/web/js-tests/events/test.html)2
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.js (renamed from bundles/org.eclipse.orion.client.javascript/web/js-tests/events/testcase.js)4
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.html37
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.js (renamed from bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js)21
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.html (renamed from bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.html)2
-rw-r--r--bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.js (renamed from bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.js)0
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html30
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html29
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js2
13 files changed, 107 insertions, 97 deletions
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/occurrences.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/occurrences.js
index 8550ace..df73cc3 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/occurrences.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/occurrences.js
@@ -9,18 +9,17 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-/*global define console escope*/
+/*global define*/
define([
-'orion/Deferred',
'orion/objects',
'estraverse',
'javascript/wordfinder'
-], function(Deferred, Objects, Estraverse, WordFinder) {
+], function(Objects, Estraverse, WordFinder) {
/**
* @name javascript.Visitor
* @description The AST visitor passed into estraverse
- * @constrcutor
+ * @constructor
* @private
* @since 5.0
*/
@@ -240,8 +239,8 @@ define([
* @description Delegate function to get the visitor
* @function
* @private
- * @memberof javascript.JSOutliner.prototype
- * @param {Object} context The context (item) to find occurrrences for
+ * @memberof javascript.JavaScriptOccurrences.prototype
+ * @param {Object} context The context (item) to find occurrences for
* @returns The instance of {Visitor} to use
*/
getVisitor: function(context) {
diff --git a/bundles/org.eclipse.orion.client.javascript/web/javascript/outliner.js b/bundles/org.eclipse.orion.client.javascript/web/javascript/outliner.js
index d0a8265..014ca2e 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/javascript/outliner.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/javascript/outliner.js
@@ -19,7 +19,7 @@ define([
/**
* @name javascript.Visitor
* @description The AST visitor passed into estraverse
- * @constrcutor
+ * @constructor
* @private
* @since 5.0
*/
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.html b/bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.html
new file mode 100644
index 0000000..68d3c9b
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <script src="../../orion/plugin.js"></script>
+ <script src="../../requirejs/require.js"></script>
+ <script>
+ /*global window require */
+ require({
+ baseUrl: '../..',
+ paths: {
+ "scriptedLogger": 'javascript/esprima/scriptedLogger',
+ text: 'requirejs/text',
+ i18n: 'requirejs/i18n',
+ domReady: 'requirejs/domReady'
+ }
+ });
+ window.onload = function() {
+ require(['orion/test','js-tests/contentAssistTests'],
+ function(test, jsTests) {
+ test.run(jsTests);
+ });
+ };
+ </script>
+</head>
+<body>
+ <h2>JavaScript Content Assist Tests</h2>
+ <p>
+ This suite tests computing conntent assist proposals for the JavaScript tooling
+ <br>
+ Currently this support is used in:
+ <ul>
+ <li><b>Content Assist</b> - The Espima-based content assist used in the JavaScript editor</li>
+ </ul>
+ </p>
+</body>
+</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js b/bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.js
index 698cc12..d1fbec2 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/contentAssistTests.js
@@ -1,27 +1,24 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andrew Eisenberg (VMware) - initial API and implementation
- * Manu Sridharan (IBM) - Various improvements
+ * IBM Corporation - Various improvements
******************************************************************************/
/*global define esprima console setTimeout doctrine*/
define([
- "javascript/esprima/esprimaJsContentAssist",
- "javascript/esprima/esprimaVisitor",
- "orion/assert",
- "esprima",
- "doctrine/doctrine",
- "orion/Deferred"
+ 'javascript/esprima/esprimaJsContentAssist',
+ 'javascript/esprima/esprimaVisitor',
+ 'orion/assert',
+ 'esprima',
+ 'doctrine/doctrine',
+ 'orion/Deferred'
], function(mEsprimaPlugin, mVisitor, assert, _, __, Deferred) {
//////////////////////////////////////////////////////////
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/test.html b/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.html
index 1b73a8f..fb857d5 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/test.html
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.html
@@ -28,7 +28,7 @@
});
window.onload = function() {
- require(["orion/test","testcase.js"], function(test, testcase) {
+ require(['orion/test','eslintEventTests.js'], function(test, testcase) {
test.run(testcase);
});
};
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/testcase.js b/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.js
index 2d20754..61b14bb 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/testcase.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/events/eslintEventTests.js
@@ -10,8 +10,8 @@
******************************************************************************/
/*global console:true define*/
define([
- "eslint/events",
- "orion/assert"
+ 'eslint/events',
+ 'orion/assert'
], function(events, assert) {
var EventEmitter = events.EventEmitter;
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.html b/bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.html
new file mode 100644
index 0000000..1105b6a
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <script src="../../orion/plugin.js"></script>
+ <script src="../../requirejs/require.js"></script>
+ <script>
+ /*global window require */
+ require({
+ baseUrl: '../..',
+ paths: {
+ "scriptedLogger": 'javascript/esprima/scriptedLogger',
+ text: 'requirejs/text',
+ i18n: 'requirejs/i18n',
+ domReady: 'requirejs/domReady'
+ }
+ });
+ window.onload = function() {
+ require(['orion/test','js-tests/indexFileParsingTests'],
+ function(test, jsTests) {
+ test.run(jsTests);
+ });
+ };
+ </script>
+</head>
+<body>
+ <h2>JavaScript Index File Parsing Tests</h2>
+ <p>
+ This suite tests parsing index files that are used by the JavaScript tooling.
+ <br>
+ Currently this support is used in:
+ <ul>
+ <li><b>Content Assist</b> - The Espima-based content assist uses the index files to help find relevant proposals</li>
+ </ul>
+ </p>
+</body>
+</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js b/bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.js
index f3174c2..ffdab20 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/indexFileParsingTests.js
@@ -1,21 +1,22 @@
/*******************************************************************************
* @license
- * Copyright (c) 2012 VMware, Inc. All Rights Reserved.
- * Copyright (c) 2013 IBM Corporation.
- *
- * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
- * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
- * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
- * You can obtain a current copy of the Eclipse Public License from
- * http://www.opensource.org/licenses/eclipse-1.0.php
+ * Copyright (c) 2012, 2013 VMware, Inc. and others.
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html).
*
* Contributors:
* Andrew Eisenberg (VMware) - initial API and implementation
- * Manu Sridharan (IBM) - Various improvements
+ * IBM Corporation - Various improvements
******************************************************************************/
/*global define esprima console setTimeout doctrine*/
-define(["javascript/esprima/typesFromIndexFile", "javascript/esprima/typeEnvironment", "orion/assert"], function(mTypes, typeEnv, assert) {
+define([
+ 'javascript/esprima/typesFromIndexFile',
+ 'javascript/esprima/typeEnvironment',
+ 'orion/assert'
+], function(mTypes, typeEnv, assert) {
//////////////////////////////////////////////////////////
// helpers
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.html b/bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.html
index af337dc..585edc8 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.html
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.html
@@ -16,7 +16,7 @@
});
window.onload = function() {
- require(["orion/test","javascript/jsOutlinerTests.js"], function(test, testcase) {
+ require(["orion/test","js-tests/outlinerTests.js"], function(test, testcase) {
test.run(testcase);
});
};
diff --git a/bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.js b/bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.js
index 8da32de..8da32de 100644
--- a/bundles/org.eclipse.orion.client.javascript/web/js-tests/jsOutlinerTests.js
+++ b/bundles/org.eclipse.orion.client.javascript/web/js-tests/outlinerTests.js
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html
deleted file mode 100644
index 943143b..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/esprimaJsContentAssistTests.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <script src="../../orion/plugin.js"></script>
- <script src="../../requirejs/require.js"></script>
- <script>
- /*global window require */
- require({
- baseUrl: '../..',
- paths: {
- esprima: "esprima/esprima",
- "scriptedLogger": "javascript/esprima/scriptedLogger",
- text: 'requirejs/text',
- i18n: 'requirejs/i18n',
- domReady: 'requirejs/domReady'
- }
- });
- window.onload = function() {
- require(["orion/test","js-tests/esprima/esprimaJsContentAssistTests"],
- function(test, jsTests) {
- test.run(jsTests);
- });
- };
- </script>
-</head>
-<body>
- <h1>Unit tests for Esprima Content assistant</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html b/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html
deleted file mode 100644
index ea7bcac..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/esprima/indexFileParsingTests.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <script src="../../orion/plugin.js"></script>
- <script src="../../requirejs/require.js"></script>
- <script>
- /*global window require */
- require({
- baseUrl: '../..',
- paths: {
- "scriptedLogger": "javascript/esprima/scriptedLogger",
- text: 'requirejs/text',
- i18n: 'requirejs/i18n',
- domReady: 'requirejs/domReady'
- }
- });
- window.onload = function() {
- require(["orion/test","js-tests/esprima/indexFileParsingTests"],
- function(test, jsTests) {
- test.run(jsTests);
- });
- };
- </script>
-</head>
-<body>
- <h1>Unit tests for index file parsing</h1>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
index 9292b4c..3a07a43 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
@@ -103,8 +103,6 @@ OrionTestCase("xhr", "/js-tests/xhr/test.html");
OrionTestCase("config", "/js-tests/config/test.html");
OrionTestCase("metatype", "/js-tests/metatype/test.html");
OrionTestCase("setting", "/js-tests/settings/test.html");
-OrionTestCase("esprima-content-assist", "/js-tests/esprima/esprimaJsContentAssistTests.html");
-OrionTestCase("index-file-parsing", "/js-tests/esprima/indexFileParsingTests.html");
OrionTestCase("asyncStyler", "/js-tests/asyncStyler/test.html");
//OrionTestCase("ast", "/js-tests/ast/astManagerTests.html");
OrionTestCase("commands", "/js-tests/commands/test.html");