Closed Bug 5352 Opened 25 years ago Closed 25 years ago

navigator.javaEnabled() is always false

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: beard, Assigned: beard)

References

()

Details

(Whiteboard: QA BLOCKER - test configuration problem?)

This should be easy to hook up.
Status: NEW → ASSIGNED
I hooked it up, now it probably always returns whatever nsIJVMManager::IsJavaEnabled() returns.
Target Milestone: M5
I've got a fix in my tree for this.
Target Milestone: M5 → M6
Not crucial, moving to M6.
Whiteboard: QA BLOCKER
this is crucial to QA. Putting on QA Blocker radar.
Severity: normal → blocker
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This has been fixed, in mozilla/dom/src/base/nsGlobalWindow.cpp v1.63.
Status: RESOLVED → REOPENED
Actually here is some test I conducted and it still returns false. Product: seamonkey [Apprunner/ Viewer] Build: 05-17-09. Steps to reproduce bug: 1] Please open preferences from edit menu. [This feature is avilable in apprunner only. so considering whole test on apprunner.] 2] Once preferences window is open, please double click feature "Advanced". It will open check boxes to enable Java and lots of other things. 3] Check "Enable Java", and then click "OK". So now Java is enabled. 4] Now please copy code I'm providing, and save it as HTML file. [ALL this file does is prints results of method navigator.javaEnabled().] 5] Open this file in apprunner as well as viewer and compare the results with expected results. Expected Results: navigator.javaEnabled(): true Actual Results: navigator.javaEnabled(): false CODE: <HTML> <HEAD><TITLE>javaEnabled() Test</TITLE></HEAD> <BODY> <form> <SCRIPT LANGUAGE="JavaScript"> <!-- document.writeln('navigator.javaEnabled(): '); document.writeln(navigator.javaEnabled()); //--> </SCRIPT> </form> </BODY> </HTML> END OF CODE.
Status: REOPENED → ASSIGNED
OK, this needs to be wired to the preference as well. I'll have to study how the preference is maintained.
Resolution: FIXED → ---
I've fixed, this still waiting for approval to check in.
ok. can you check in today?
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Now looks at "security.enable_java" preference, which will be wired up to the prefs dialog when bug #6894 is fixed. Right now the default value is true for the preference.
Its still returning false. In any situation its not returning true. I'm just bit confused about which defailt value for preference is true right now. I think in this case we can not verify this till bug 6894 is fixed. Once bug# 6894 is fixed then we'll be able to enable Java from preferences and we'll be able to test it.
Uptill now navigator.javaEnabled() used to return false all the time. I tested it again with todays build [1999-05-27-08] and now it does not return anything. It should return either true or false, but now it just doesn't return anything. Please try to run test case I provided earlier. So reopening the bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: M6 → M7
This is a bummer for QA automated test. But not a blocker for M6, moving to M7.
Depends on: 6894
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
This works for me in my 6/13/99 build. Please verify.
Status: RESOLVED → REOPENED
I'm afraid that its still not working. Build: 1999-06-14-09. [apprunner/Viewer] OS: Windows-95. Its still not returning anything. Not only thins but commands like "navigator.taintEnabled()" and "navigator.preference(javascript.enabled, true)" are also not returning anything. I guess there are seperate bugs for those, but I'm not sure.
This is XP code. This works on the Mac. Why on earth isn't it working on the PC? I'm testing with the fragment of HTML you've shown above.
I'm also using that. Somehow it just does not return anything.
I tried calling this on my build and got an error. Patrick, it seems that we're returning the error code returned by nsIPref::GetBoolPref() from Navigator::JavaEnabled(). A non-NS_OK error code returned by the former method could just mean that the perference doesn't exist. It seems, in that case, we should just return PR_FALSE as the result of JavaEnabled, with a success error code.
Vidur, Patrick, I tried this on WinNT as well as Mac on todays build. Problem seems there on both. navigator.javaEnabled() seems not returning anything on both. Here is test URL. http://bubblegum/desale/test3.html This file is same as piece of code I provided above. Expected Results: navigator.javaEnabled(): true Actual Results: navigator.javaEnabled():
Resolution: FIXED → ---
I claim this is fixed, and you have a configuration error. Are you testing with viewer or appRunner? It only works with appRunner.
Testing it with both.
Whiteboard: QA BLOCKER → QA BLOCKER - test configuration problem?
OK, the real problem is that if the preference isn't defined (i.e. you've never used the preference dialog/advanced panel) then the result is undefined (actually makes some sort of sense, whatever). The correct thing to do is to probably map this to false, but I'd like to understand why the default set of prefs don't include "security.enable_java". I'll change the code to return PR_FALSE if the pref isn't defined yet.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Checked in a fix for this in mozilla/dom/src/base/nsGlobalWindow.cpp,1.91.
Status: RESOLVED → VERIFIED
Yes Patrick, now it started showing correct results. Now I'm getting results "navigator.javaEnabled(): false" which we were getting initially. And after enabling java from preferences I get results "navigator.javaEnabled(): true" So everything is really working fine now. Marking this bug as verified.
No longer depends on: 6894
You need to log in before you can comment on or make changes to this bug.