summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWooyoung Cho2013-08-14 13:14:20 (EDT)
committerChris Jaun2013-08-14 14:26:20 (EDT)
commit657bda17239c03295608733e8a356cb2bb78b84a (patch)
tree79301db147f768e6f129314a8ef4ff5ab7f152af
parent6b42c40379f95d971dcbeeae506a4e0df1d11cd5 (diff)
downloadwebtools.jsdt.tests-657bda17239c03295608733e8a356cb2bb78b84a.zip
webtools.jsdt.tests-657bda17239c03295608733e8a356cb2bb78b84a.tar.gz
webtools.jsdt.tests-657bda17239c03295608733e8a356cb2bb78b84a.tar.bz2
Bugzilla 377241. Content Assist does not work when an object propertyv201308141853
is referenced by array-style(obj["objfield"].) syntax even though the property name is specified as a constant string. This corrects a previous commit: b4c9d5c9b73f2e2f54f35d4b6738902bc6bae92b
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/AllContentAssistTests.java3
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/ArrayStylePropertyAccessTests.java6
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241.js6
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_01.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_02.js8
-rw-r--r--tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_03.js6
6 files changed, 19 insertions, 18 deletions
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/AllContentAssistTests.java b/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/AllContentAssistTests.java
index 22594b5..1b9a904 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/AllContentAssistTests.java
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/AllContentAssistTests.java
@@ -61,13 +61,14 @@ public class AllContentAssistTests extends TestSuite {
public static Test suite() {
TestSuite all = new TestSuite(TEST_NAME);
+
all.addTest(GlobalFunctionTests.suite());
all.addTest(GlobalVariableTests.suite());
all.addTest(ConstructorTests.suite());
all.addTest(InnerFunctionTests.suite());
all.addTest(DoublyNestedFunctionTests.suite());
all.addTest(CamelCasingTests.suite());
- all.addTest(OtherContentAssistTests.suite());
+ all.addTest(OtherContentAssistTests.suite());
all.addTest(TypeTests.suite());
all.addTest(DuplicatesTests.suite());
all.addTest(StaticTests.suite());
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/ArrayStylePropertyAccessTests.java b/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/ArrayStylePropertyAccessTests.java
index 3877b0f..dca6a58 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/ArrayStylePropertyAccessTests.java
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/src/org/eclipse/wst/jsdt/ui/tests/contentassist/ArrayStylePropertyAccessTests.java
@@ -84,21 +84,21 @@ public class ArrayStylePropertyAccessTests extends TestCase {
public void testPropertyAccessUsingArrayStyle_377241() throws Exception {
// When an object property is referenced by array-style, test if
// ContentAssist lists are properly show.
- String[][] expectedProposals = new String[][]{{"id : Number - foo"}};
+ String[][] expectedProposals = new String[][]{{"id : Number - bar"}};
ContentAssistTestUtilities.runProposalTest(fTestProjectSetup, "test377241.js", 5, 10, expectedProposals);
}
public void testPropertyAccessUsingArrayStyle_377241_01() throws Exception {
// When an object property is referenced by array-style, test if
// ContentAssist lists are properly show.
- String[][] expectedProposals = new String[][]{{"id : Number - foo"}};
+ String[][] expectedProposals = new String[][]{{"id : Number - bar"}};
ContentAssistTestUtilities.runProposalTest(fTestProjectSetup,"test377241_01.js", 5, 10, expectedProposals);
}
public void testPropertyAccessUsingArrayStyle_377241_02() throws Exception {
// When an object property is referenced by array-style, test if
// ContentAssist lists are properly show.
- String[][] expectedProposals = new String[][]{{"id : Number - foo"}};
+ String[][] expectedProposals = new String[][]{{"id : Number - bar"}};
ContentAssistTestUtilities.runProposalTest(fTestProjectSetup,"test377241_02.js", 5, 10, expectedProposals);
}
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241.js b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241.js
index 771562f..339109e 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241.js
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241.js
@@ -1,6 +1,6 @@
-function foo() {
+function bar() {
this.id = 0;
}
-var obj = {p1:new foo()};
+var tst = {p1:new bar()};
-obj["p1"].
+tst["p1"].
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_01.js b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_01.js
index c1a6fb3..15dbe31 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_01.js
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_01.js
@@ -1,6 +1,6 @@
-function foo() {
+function bar() {
this.id = 0;
}
-var obj = {};
-obj.p2 = new foo();
-obj["p2"].
+var tst = {};
+tst.p2 = new bar();
+tst["p2"].
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_02.js b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_02.js
index 1e57bcd..ab2bfd4 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_02.js
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_02.js
@@ -1,6 +1,6 @@
-function foo() {
+function bar() {
this.id = 0;
}
-var obj = {};
-obj["p3"] = new foo();
-obj["p3"].
+var tst = {};
+tst["p3"] = new bar();
+tst["p3"].
diff --git a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_03.js b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_03.js
index 629d96a..7a4e24a 100644
--- a/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_03.js
+++ b/tests/org.eclipse.wst.jsdt.ui.tests/testresources/ContentAssist/root/test377241_03.js
@@ -1,3 +1,3 @@
-var obj = {};
-obj.p1 = {id:10, data:"empty"};
-obj["p1"].
+var tst = {};
+tst.p1 = {id:10, data:"empty"};
+tst["p1"].