Add Java Test Plugin

RESOLVED FIXED in mozilla30

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: johns, Assigned: johns)

Tracking

unspecified
mozilla30
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 7 obsolete attachments)

(Assignee)

Description

5 years ago
Originally in bug 738396, but needed more work. Being able to test all the special-cased stuff for java is a plus.
(Assignee)

Comment 1

5 years ago
Created attachment 8374463 [details] [diff] [review]
Add plugin.java.mime

Originally I had a hack in nsObjectLoadingContent to check for x-java-test for <applet> in debug builds, but that breaks on OS X which has a default java plugin. And since we store the pref for both addons as "plugin.state.java" or whathaveyou disabling one and not the other is broken (and not worth fixing)

We also have "application/x-java-vm" hardcoded in a ton of spots to specify magic java behavior, it seems saner to just store this as a pref. Which then lets tests flip the pref to the java test plugin!
Attachment #8374463 - Flags: review?(benjamin)
(Assignee)

Comment 2

5 years ago
Created attachment 8374464 [details] [diff] [review]
Add nptest java plugin

This was r+'d in 738396 ages ago, but was bit-rotted to hell, and the old hacks that plugin.java.mime obsoletes removed. Feel free to rubber stamp.
Attachment #8374464 - Flags: review?(benjamin)
(Assignee)

Comment 3

5 years ago
(In reply to John Schoenick [:johns] from comment #1)
> Originally I had a hack in nsObjectLoadingContent to check for x-java-test
> for <applet> in debug builds, but that breaks on OS X

It also doesn't allow testing other magic-cases like <object classid="java:">

Updated

5 years ago
Attachment #8374464 - Flags: review?(benjamin) → review+

Updated

5 years ago
Attachment #8374463 - Flags: review?(benjamin) → review+
(Assignee)

Comment 4

5 years ago
Created attachment 8377917 [details] [diff] [review]
[Foldme] Always treat plugin.java.mime as a java type, rename npjavatest -> nptestjava

This hit issues on try due to us blacklisting DLLs beginning with "npjava". I don't want to touch that, so s/npjavatest/nptestjava/

I also just made IsJavaMIME() read and recognize java.plugin.mime, rather than the debug-specific application/x-java-test hack.

Uploading these two changes for additional r? due to messing-with-java-plumbing paranoia
Attachment #8377917 - Flags: review?(benjamin)

Updated

5 years ago
Attachment #8377917 - Flags: review?(benjamin) → review+
(Assignee)

Comment 5

5 years ago
Created attachment 8379264 [details] [diff] [review]
Add nptest java plugin. r=bsmedberg
Attachment #8374464 - Attachment is obsolete: true
Attachment #8377917 - Attachment is obsolete: true
Attachment #8379264 - Flags: review+
(Assignee)

Comment 6

5 years ago
Created attachment 8379265 [details] [diff] [review]
Add plugin.java.mime. r=bsmedberg

Folded for landing
Attachment #8374463 - Attachment is obsolete: true
Attachment #8379265 - Flags: review+
I backed this (and everything else from that push to inbound) out in http://hg.mozilla.org/integration/mozilla-inbound/rev/128cbf1edc40 due to various Java/plugin related failures they caused:
Crashtest failure: https://tbpl.mozilla.org/php/getParsedLog.php?id=35003251&tree=Mozilla-Inbound
XPCShell failure: https://tbpl.mozilla.org/php/getParsedLog.php?id=35003355&tree=Mozilla-Inbound
Flags: needinfo?(jschoenick)
(In reply to Wes Kocher (:KWierso) from comment #8)
> XPCShell failure:
> https://tbpl.mozilla.org/php/getParsedLog.php?id=35003355&tree=Mozilla-
> Inbound

TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/tests/services/healthreport/tests/xpcshell/test_provider_addons.js | 3 == 2 - See following stack:

Ouch, we should just check based on the plugin tag count here.
Created attachment 8379700 [details] [diff] [review]
Fix FHR addons provider test.
Attachment #8379700 - Flags: review?(gps)
Created attachment 8379702 [details] [diff] [review]
Fix FHR addons provider test.
Attachment #8379700 - Attachment is obsolete: true
Attachment #8379700 - Flags: review?(gps)
Attachment #8379702 - Flags: review?(gps)
(Assignee)

Comment 12

5 years ago
Created attachment 8379956 [details] [diff] [review]
Add plugin.java.mime. r=bsmedberg

So the assertion failure in a random crash test was CnP fail, the second assert should be nsPluginHost::IsJavaMIME(javaMIME)
Attachment #8379265 - Attachment is obsolete: true
Attachment #8379956 - Flags: review+
(Assignee)

Comment 13

5 years ago
Created attachment 8379964 [details] [diff] [review]
Fix FHR addon provider test for plugin data count.

With the fix we move on to failing slightly lower down. Even more fixage!
Attachment #8379702 - Attachment is obsolete: true
Attachment #8379702 - Flags: review?(gps)
Attachment #8379964 - Flags: review?(gps)
(Assignee)

Comment 14

5 years ago
Created attachment 8380081 [details] [diff] [review]
Add nptest java plugin. r=bsmedberg

Another try push later... test_provider_addons.js still fails. Only on OS X. Because the capitalization in Info.plist didn't match nptest.rc. And this test wants the exact plugin description to match. Just in case.
Attachment #8379264 - Attachment is obsolete: true
Attachment #8380081 - Flags: review+
Comment on attachment 8379964 [details] [diff] [review]
Fix FHR addon provider test for plugin data count.

Review of attachment 8379964 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.
Attachment #8379964 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/b6a4f6e8ef8c
https://hg.mozilla.org/mozilla-central/rev/7254cd0a6d75
https://hg.mozilla.org/mozilla-central/rev/12b636c82b24
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
(Assignee)

Comment 18

5 years ago
Followup, this chunk was removed in the comment 4 patch and but dropped when I folded it:
https://hg.mozilla.org/integration/mozilla-inbound/rev/505119ed119e
You need to log in before you can comment on or make changes to this bug.