Lines Matching refs:TestObject
126 assertEquals("undefined", executeJavaScriptAndGetStringResult("typeof testObject"));
130 getWebView().addJavascriptInterface(new Object(), "testObject");
133 assertEquals("undefined", executeJavaScriptAndGetStringResult("typeof testObject"));
141 assertEquals("object", executeJavaScriptAndGetStringResult("typeof testObject"));
145 injectObjectAndReload(new Object(), "testObject");
146 assertEquals("object", executeJavaScriptAndGetStringResult("typeof testObject"));
150 getWebView().removeJavascriptInterface("testObject");
153 assertEquals("object", executeJavaScriptAndGetStringResult("typeof testObject"));
161 assertEquals("undefined", executeJavaScriptAndGetStringResult("typeof testObject"));
192 }, "testObject");
193 assertRaisesException("testObject.method()");
198 injectObjectAndReload(new ObjectWithStaticMethod(), "testObject");
199 executeJavaScript("testController.setStringValue(typeof testObject.staticMethod)");
205 injectObjectAndReload(new ObjectWithStaticMethod(), "testObject");
206 executeJavaScript("testController.setStringValue(testObject.staticMethod())");
213 }, "testObject");
215 executeJavaScriptAndGetStringResult("typeof testObject.method"));
221 }, "testObject");
222 executeJavaScript("testObject.method()");
227 }, "testObject");
228 executeJavaScript("testObject.method()");
233 injectObjectAndReload(null, "testObject");
234 assertEquals("undefined", executeJavaScriptAndGetStringResult("typeof testObject"));
238 injectObjectAndReload(new Object(), "testObject");
239 assertEquals("object", executeJavaScriptAndGetStringResult("typeof testObject"));
240 injectObjectAndReload(null, "testObject");
241 assertEquals("object", executeJavaScriptAndGetStringResult("typeof testObject"));
249 }, "testObject");
250 executeJavaScript("testObject.method()");
252 executeJavaScript("testObject.method(42)");
254 executeJavaScript("testObject.method(null)");
256 executeJavaScript("testObject.method(undefined)");
258 executeJavaScript("testObject.method(42, 42)");
280 class TestObject {
284 final TestObject testObject = new TestObject();
288 getWebView().addJavascriptInterface(testObject, "testObject1");
289 getWebView().addJavascriptInterface(testObject, "testObject2");
307 }, "testObject");
308 executeJavaScript("testObject.getInnerObject().method(42)");
326 getWebView().addJavascriptInterface(object, "testObject");
332 executeJavaScript("testObject.getInnerObject().method()");
343 }, "testObject");
344 executeJavaScript("testObject.captureThreadId()");
361 injectObjectAndReload(new Derived(), "testObject");
362 assertEquals("function", executeJavaScriptAndGetStringResult("typeof testObject.method"));
363 executeJavaScript("testObject.method(42)");
373 injectObjectAndReload(new Derived(), "testObject");
374 assertEquals("undefined", executeJavaScriptAndGetStringResult("typeof testObject.method"));
384 injectObjectAndReload(new Derived(), "testObject");
385 executeJavaScript("testObject.method()");
395 }, "testObject");
398 "for (x in testObject) { result += \" \" + x } " +
407 }, "testObject");
409 "testObjecttestObject, null)" +
416 }, "testObject");
418 "testObject.getClass().getField('field').get(testObject).toString()"));
424 }, "testObject");
425 assertRaisesException("testObject.getClass().getMethod('method', null)");
429 "testObject.getClass().getDeclaredMethod('method', null).invoke(testObject, null)");
435 }, "testObject");
436 assertRaisesException("testObject.getClass().getField('field')");
440 "testObject.getClass().getDeclaredField('field').getInt(testObject)");