Closed
Bug 5352
Opened 25 years ago
Closed 25 years ago
navigator.javaEnabled() is always false
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
M7
People
(Reporter: beard, Assigned: beard)
References
()
Details
(Whiteboard: QA BLOCKER - test configuration problem?)
This should be easy to hook up.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•25 years ago
|
||
I hooked it up, now it probably always returns whatever
nsIJVMManager::IsJavaEnabled() returns.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M5
Assignee | ||
Comment 2•25 years ago
|
||
I've got a fix in my tree for this.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M5 → M6
Assignee | ||
Comment 3•25 years ago
|
||
Not crucial, moving to M6.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•25 years ago
|
||
This has been fixed, in mozilla/dom/src/base/nsGlobalWindow.cpp v1.63.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 6•25 years ago
|
||
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.
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 7•25 years ago
|
||
OK, this needs to be wired to the preference as well. I'll have to study how the
preference is maintained.
Assignee | ||
Comment 8•25 years ago
|
||
I've fixed, this still waiting for approval to check in.
Comment 9•25 years ago
|
||
ok. can you check in today?
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 10•25 years ago
|
||
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.
Comment 11•25 years ago
|
||
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.
Comment 12•25 years ago
|
||
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
Comment 13•25 years ago
|
||
This is a bummer for QA automated test. But not a blocker for M6, moving to M7.
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•25 years ago
|
||
This works for me in my 6/13/99 build. Please verify.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 15•25 years ago
|
||
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.
Assignee | ||
Comment 16•25 years ago
|
||
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.
Comment 17•25 years ago
|
||
I'm also using that. Somehow it just does not return anything.
Comment 18•25 years ago
|
||
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.
Comment 19•25 years ago
|
||
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():
Assignee | ||
Comment 20•25 years ago
|
||
I claim this is fixed, and you have a configuration error. Are you testing with
viewer or appRunner? It only works with appRunner.
Comment 21•25 years ago
|
||
Testing it with both.
Updated•25 years ago
|
Whiteboard: QA BLOCKER → QA BLOCKER - test configuration problem?
Assignee | ||
Comment 22•25 years ago
|
||
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.
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 23•25 years ago
|
||
Checked in a fix for this in mozilla/dom/src/base/nsGlobalWindow.cpp,1.91.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 24•25 years ago
|
||
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.
You need to log in
before you can comment on or make changes to this bug.
Description
•