39 |
39 |
40 // loaded file should see it's name in __FILE__ |
40 // loaded file should see it's name in __FILE__ |
41 load(__DIR__ + "loadedfile.js"); |
41 load(__DIR__ + "loadedfile.js"); |
42 |
42 |
43 // Add check for base part of a URL. We can't test __DIR__ inside |
43 // Add check for base part of a URL. We can't test __DIR__ inside |
44 // a script that is downloaded from a URL. check for Source.baseURL |
44 // a script that is downloaded from a URL. check for SourceHelper.baseURL |
45 // which is exposed as __DIR__ for URL case. |
45 // which is exposed as __DIR__ for URL case. |
46 |
46 |
47 var url = new java.net.URL("http://www.acme.com:8080/foo/bar.js"); |
47 var url = new java.net.URL("http://www.acme.com:8080/foo/bar.js"); |
48 print(Packages.jdk.nashorn.internal.runtime.Source.baseURL(url)); |
48 print(Packages.jdk.nashorn.test.models.SourceHelper.baseURL(url)); |