| 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | |
| 6 | gTestfile = 'String-001.js'; |
| 7 | |
| 8 | /** |
| 9 | File Name: String-001.js |
| 10 | Description: |
| 11 | |
| 12 | When accessing a Java field whose value is a java.lang.String, |
| 13 | JavaScript should read the value as the JavaScript JavaObject, |
| 14 | an object whose class is JavaObject. |
| 15 | |
| 16 | To test this: |
| 17 | |
| 18 | 1. Call a java method that returns a java.lang.String |
| 19 | 2. Check the value of the returned object, which should be the value |
| 20 | of the string |
| 21 | 3. Check the type of the returned object, which should be "object" |
| 22 | 4. Check the class of the object, using Object.prototype.toString, |
| 23 | which should be "[object JavaObject]" |
| 24 | 5. Check the class of the JavaObject, using getClass, and compare |
| 25 | it to java.lang.Class.forName("java.lang.String"); |
| 26 | |
| 27 | NOT DONE. need a test class with a string field. |
| 28 | |
| 29 | @author [email protected] |
| 30 | @version 1.00 |
| 31 | */ |
| 32 | |
| 33 | |
| 34 | var SECTION = "LiveConnect"; |
| 35 | var VERSION = "1_3"; |
| 36 | var TITLE = "Java Number Primitive to JavaScript Object"; |
| 37 | |
| 38 | startTest(); |
| 39 | writeHeaderToLog( SECTION + " "+ TITLE); |
| 40 | |
| 41 | // display test information |
| 42 | |
| 43 | test(); |
| 44 | |
| 45 | function CheckType( et, at ) { |
| 46 | } |
| 47 | function CheckValue( ev, av ) { |
| 48 | } |