@Ignore
 @Test
 public void testFindFieldOnGlobalObjectLiteral_OtherFile_BeforeOpen_1() throws Exception {
   String[][] expectedProposals = new String[][] {{"eclipse : {} - {}", "eclipse2 : {} - {}"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_1.js", 4, 5, expectedProposals);
 }
 public void testFindConstructors_OtherFile_AfterEdit_VarDeclaration_ExpressionStarted_0()
     throws Exception {
   String[][] expectedProposals =
       new String[][] {{"MyClassEdit1(a) - MyClassEdit1", "MyClassEdit2() - MyClassEdit2"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test6.js", 0, 8, expectedProposals);
 }
 @Ignore
 @Test
 public void testFindFieldOnGlobalObjectLiteral_SameFile_0() throws Exception {
   String[][] expectedProposals = new String[][] {{"eclipse", "eclipse2"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 10, 4, expectedProposals);
 }
 public void
     testFindConstructors_OtherFile_AfterEdit_ArrayReferenceDeclaration_ExpressionStarted_0()
         throws Exception {
   String[][] expectedProposals = new String[][] {{"testEdit.Foo(x, y, z) - testEdit.Foo"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test9_1.js", 0, 7, expectedProposals);
 }
 @Ignore
 @Test
 public void testFindGlobalObjectLiteral_OtherFile_BeforeOpen_1() throws Exception {
   String[][] expectedProposals = new String[][] {{"org : {} - Global"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_1.js", 2, 1, expectedProposals);
 }
 // WI102885
 @Ignore
 @Test
 public void testNoLeakedGlobal_OtherFile() throws Exception {
   String[][] expectedProposals = new String[][] {{"globalObjLitTestVar"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_1.js", 8, 19, expectedProposals, true, false);
 }
 @Ignore
 @Test
 public void testFindFunctionOnFieldOnGlobalObjectLiteral_OtherFile_BeforeOpen_0()
     throws Exception {
   String[][] expectedProposals = new String[][] {{"fun() - {}", "crazy() - {}"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_1.js", 6, 12, expectedProposals);
 }
 public void testFindConstructors_OtherFile_AfterEdit_ExpressionStarted_2() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {"bar.ClassOne(a, b) - bar.ClassOne", "bar.ClassTwo(c, d, e) - bar.ClassTwo"}
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test2_1.js", 4, 9, expectedProposals);
 }
 public void testFindConstructors_OtherFile_AfterEdit_ExpressionStarted_4() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {"bar.foo.ClassThree(param1, param2, param3, param4) - bar.foo.ClassThree"}
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test2_1.js", 8, 13, expectedProposals);
 }
Пример #10
0
 public void testElementQuerySelector() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "querySelector(String selectors) : Element - Element",
           "querySelectorAll(String selectors) : NodeList - Element"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 42, 36, expectedProposals);
 }
 @Test
 public void testFindFieldsAssignedToGlobals_3() throws Exception {
   String[][] expectedProposals = new String[][] {{"global_FieldAssignments2_0"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup,
       "TestGlobals_FieldAssignments_0.js",
       34,
       25,
       expectedProposals,
       false,
       true);
 }
Пример #12
0
 public void testGeolocation() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "clearWatch(Number watchId) - Geolocation",
           "getCurrentPosition(Function successCallback, Function errorCallback, PositionOptions options) - Geolocation",
           "watchPosition(Function successCallback, Function errorCallback, PositionOptions options) : Number - Geolocation"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 2, 22, expectedProposals);
 }
 public void testFindConstructors_ThisFile_AfterEdit_ExpressionStarted_1() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "bar.ClassOne(a, b) - bar.ClassOne",
           "bar.ClassTwo(c, d, e) - bar.ClassTwo",
           "bar.foo.ClassThree(param1, param2, param3, param4) - bar.foo.ClassThree"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test2_0.js", 21, 6, expectedProposals);
 }
Пример #14
0
 public void testPositionOptions() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "enableHighAccuracy : Boolean - PositionOptions",
           "maximumAge : Number - PositionOptions",
           "timeout : Number - PositionOptions"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 26, 12, expectedProposals);
 }
Пример #15
0
 public void testVideo() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "canPlayType(String type) : String - HTMLMediaElement",
           "load() - HTMLMediaElement",
           "pause() - HTMLMediaElement",
           "play() - HTMLMediaElement",
           "autoplay : Boolean - HTMLMediaElement",
           "buffered : TimeRanges - HTMLMediaElement",
           "className : String - HTMLElement",
           "controls : Boolean - HTMLMediaElement",
           "crossOrigin : String - HTMLMediaElement",
           "currentSrc : String - HTMLMediaElement",
           "currentTime : Number - HTMLMediaElement",
           "defaultMuted : Boolean - HTMLMediaElement",
           "defaultPlaybackRate : Number - HTMLMediaElement",
           "duration : Number - HTMLMediaElement",
           "ended : Boolean - HTMLMediaElement",
           "HAVE_CURRENT_DATA : Number - HTMLMediaElement",
           "HAVE_ENOUGH_DATA : Number - HTMLMediaElement",
           "HAVE_FUTURE_DATA : Number - HTMLMediaElement",
           "HAVE_METADATA : Number - HTMLMediaElement",
           "HAVE_NOTHING : Number - HTMLMediaElement",
           "initialTime : Number - HTMLMediaElement",
           "loop : Boolean - HTMLMediaElement",
           "muted : Boolean - HTMLMediaElement",
           "NETWORK_EMPTY : Number - HTMLMediaElement",
           "NETWORK_IDLE : Number - HTMLMediaElement",
           "NETWORK_LOADING : Number - HTMLMediaElement",
           "NETWORK_NO_SOURCE : Number - HTMLMediaElement",
           "networkState : Number - HTMLMediaElement",
           "paused : Boolean - HTMLMediaElement",
           "playbackRate : Number - HTMLMediaElement",
           "played : TimeRanges - HTMLMediaElement",
           "preload : String - HTMLMediaElement",
           "readyState : Number - HTMLMediaElement",
           "seekable : TimeRanges - HTMLMediaElement",
           "seeking : Boolean - HTMLMediaElement",
           "src : String - HTMLMediaElement",
           "startOffsetTime : Date - HTMLMediaElement",
           "volume : Number - HTMLMediaElement",
           "height : Number - HTMLVideoElement",
           "poster : String - HTMLVideoElement",
           "videoHeight : Number - HTMLVideoElement",
           "videoWidth : Number - HTMLVideoElement",
           "width : Number - HTMLVideoElement"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 52, 12, expectedProposals);
 }
Пример #16
0
 public void testPositionError() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "code : Number - PositionError",
           "message : String - PositionError",
           "PERMISSION_DENIED : Number - PositionError",
           "POSITION_UNAVAILABLE : Number - PositionError",
           "TIMEOUT : Number - PositionError"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 18, 10, expectedProposals);
 }
Пример #17
0
 public void testHistory() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "back() - History",
           "forward() - History",
           "go(arg) - History",
           "pushState(Object data, String title, String url) - History",
           "replaceState(Object data, String title, String url) - History",
           "state : Object - History"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 29, 8, expectedProposals);
 }
Пример #18
0
 public void testCoordinates() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "accuracy : Number - Coordinates",
           "altitude : Number - Coordinates",
           "altitudeAccuracy : Number - Coordinates",
           "heading : Number - Coordinates",
           "latitude : Number - Coordinates",
           "longitude : Number - Coordinates",
           "speed : Number - Coordinates"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 10, 15, expectedProposals);
 }
Пример #19
0
 public void testLocalStorage() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "clear() - Storage",
           "getItem(String key) : String - Storage",
           "key(Number index) : String - Storage",
           "removeItem(String key) - Storage",
           "setItem(String key, String value) - Storage",
           "length : Number - Storage",
           "prototype - Storage"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 33, 13, expectedProposals);
 }
Пример #20
0
 public void testWebSocket() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "close(Number code, String reason) - WebSocket",
           "send(Object data) - WebSocket",
           "binaryType : String - WebSocket",
           "bufferedAmount : Number - WebSocket",
           "CLOSED : Number - WebSocket",
           "CLOSING : Number - WebSocket",
           "CONNECTING : Number - WebSocket",
           "extensions : String - WebSocket",
           "OPEN : Number - WebSocket",
           "protocol : String - WebSocket",
           "readyState : Number - WebSocket",
           "url : String - WebSocket"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestDom5Library_0.js", 36, 7, expectedProposals);
 }
 @Test
 public void testFindGlobalsDefinedFromFieldAssignments_0_2() throws Exception {
   String[][] expectedProposals =
       new String[][] {
         {
           "global_FieldAssignments0 - Global",
           "global_FieldAssignments2 - Global",
           "global_FieldAssignments3 - Global",
           "global_FieldAssignments5 - Global",
           "global_FieldAssignments6 - Global",
           "global_FieldAssignments7 - Global",
           "global_FieldAssignments8 - Global"
         }
       };
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup,
       "TestGlobals_FieldAssignments_0.js",
       26,
       18,
       expectedProposals,
       false,
       true);
 }
 @Test
 public void testFindDuplicateGlobalObjectLiteral_SameFile_1() throws Exception {
   ContentAssistTestUtilities.verifyNoDuplicates(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 8, 1);
 }
 public void testFindConstructors_ThisFile_AfterEdit_ExpressionStarted_0() throws Exception {
   String[][] expectedProposals = new String[][] {{"Awesomeness(param1, param2) - Awesomeness"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "test2_0.js", 19, 6, expectedProposals);
 }
 @Ignore
 @Test
 public void testFindDuplicateFieldOnGlobalObjectLiteral_OtherFile_1() throws Exception {
   ContentAssistTestUtilities.verifyNoDuplicates(
       fTestProjectSetup, "TestGlobalObjectLiterals_1.js", 4, 5);
 }
 @Test
 public void testFindFunctionOnFieldOnGlobalObjectLiteral_SameFile_0() throws Exception {
   String[][] expectedProposals = new String[][] {{"fun()", "crazy()"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 12, 12, expectedProposals);
 }
 public void _testClosures_ExpressionStarted_2() throws Exception {
   String[][] expectedProposals = new String[][] {{"burg : String - {}"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "GlobalVarsDefinedInClosure.html", 13, 10, expectedProposals);
 }
 public void testClosures_ExpressionStarted_0() throws Exception {
   String[][] expectedProposals =
       new String[][] {{"closure : {} - Global", "closure2 : {} - Global"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "GlobalVarsDefinedInClosure.html", 9, 3, expectedProposals);
 }
 @Test
 public void testFindDuplicateFunctionOnFieldOnGlobalObjectLiteral_SameFile_0() throws Exception {
   ContentAssistTestUtilities.verifyNoDuplicates(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 12, 12);
 }
 @Test // new test
 public void testFindGlobalObjectLiteral_SameFile_NegativeTest() throws Exception {
   String[][] expectedProposals = new String[][] {{"eclipse - Global"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 7, 0, expectedProposals, true, false);
 }
 @Test
 public void testFindGlobalObjectLiteral_SameFile_1() throws Exception {
   String[][] expectedProposals = new String[][] {{"org - Global"}};
   ContentAssistTestUtilities.runProposalTest(
       fTestProjectSetup, "TestGlobalObjectLiterals_0.js", 7, 1, expectedProposals);
 }