Closed
Bug 652653
Opened 14 years ago
Closed 13 years ago
Implement window object that hosts verified email API
Categories
(Cloud Services :: Server: Identity, defect)
Cloud Services
Server: Identity
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 664614
People
(Reporter: ddahl, Unassigned)
References
Details
Attachments
(1 file, 6 obsolete files)
|
43.66 KB,
patch
|
Details | Diff | Splinter Review |
Implement an nsIDOMGlobalPropertyInitializer object to host verifiecation APIs and session APIs
| Reporter | ||
Updated•14 years ago
|
Assignee: nobody → ddahl
| Reporter | ||
Comment 1•14 years ago
|
||
Dan:
What sync apis do I need to know about for looking up a potential verified email address?
| Reporter | ||
Comment 2•14 years ago
|
||
Just getting the bits in place to being writing a test suite to develop against
| Reporter | ||
Comment 3•14 years ago
|
||
After speaking with dougt, who has implemented several navigator properties, you make the navigator on nsGlobalWindow implement a new interface just like he did for nsIDOMNavigatorDesktopNotification
jst also recommended eagerly creating a getter via the "content-document-global-created" topic. this way code loads quite lazily and we can avoid the C++ interface patch.
Comment 4•14 years ago
|
||
/Cc JR who can provide some help on what APIs to use to get ID assertions and such
Comment 5•14 years ago
|
||
https://wiki.mozilla.org/Services/Identity/InternalSpec provides a list of the API points, values and results.
an alpha server is available for testing purposes. I can assist in getting the server operational in a test configuration.
| Reporter | ||
Comment 6•14 years ago
|
||
using Object.createProperty() to add the property to window.navigator. Seems like pretty solid approach instead of spelunking nsGlobalWindow.cpp:)
Attachment #528185 -
Attachment is obsolete: true
| Reporter | ||
Comment 7•14 years ago
|
||
Still digging deep into how the existing web client works, porting concepts over to mozilla/services/ code
Attachment #528749 -
Attachment is obsolete: true
| Reporter | ||
Comment 8•14 years ago
|
||
There is something wrapper related that prevents me from accessing the navigator.id property from inside a browser chrome test. it is always undefined. If I just launch the build, I can access the navigator.id property from content via the web console.
Attachment #529257 -
Attachment is obsolete: true
| Reporter | ||
Comment 9•14 years ago
|
||
bz:
I am doing this to add a property to window.navigator:
Object.defineProperty(aWindow.navigator, "id", { value: idApi,
enumerable: true,
configurable: false });
Not sure if this is why I cannot access the property from inside a browser chrome test? Manually testing from content script I can see the new property.
Comment 10•14 years ago
|
||
Is your chrome test looking at the XRayWrapper for window.navigator, or at the .wrappedJSObject? The former won't show "id", of course; the latter should.
As a side question, is there a reason you're setting this up as a non-configurable property? Is that how IDL-defined props are set up?
| Reporter | ||
Comment 11•14 years ago
|
||
(In reply to comment #10)
> Is your chrome test looking at the XRayWrapper for window.navigator, or at the
> .wrappedJSObject? The former won't show "id", of course; the latter should.
>
I get an XRayWrapper, and have tried 2 ways:
var window = browser.contentDocument.defaultView.wrappedJSObject;
var ID = window.navigator.id;
and:
var window = XPCNativeWrapper.unwrap(browser.contentDocument.defaultView);
var ID = window.navigator.id;
as well as calling unwrap() and .wrappedJSObject on the navigator object directly.
My new property, 'id', is always undefined. (Somehow, wrappers are still mysterious to me)
> As a side question, is there a reason you're setting this up as a
> non-configurable property? Is that how IDL-defined props are set up?
I was just experimenting with 'configurable: false', since it seems the rest of the properties on navigator are immutable (the ones i tried to replace anyway)
Comment 12•14 years ago
|
||
That's .... odd. What about this:
var ID = browser.contentDocument.defaultView.navigator.wrappedJSObject.id;
?
| Reporter | ||
Comment 13•14 years ago
|
||
(In reply to comment #12)
> That's .... odd. What about this:
>
> var ID = browser.contentDocument.defaultView.navigator.wrappedJSObject.id;
>
> ?
I still get 'undefined'
I just ran the build and was able to access the property via the web console.
| Reporter | ||
Comment 14•14 years ago
|
||
Just went through the trouble of setting up mochitest-plain for this code. The mochitest can access the navigator property I added without any trouble. Perhaps mochitest-plain is a better way to test this object anyway as it is a content-accessible dom property.
I wonder if the wrapper is dropping access to the property because it is not in the Navigator's idl or something like that?
Comment 15•14 years ago
|
||
XRayWrapper does exactly that. But if you use .wrappedJSObject it should work.
| Reporter | ||
Comment 16•14 years ago
|
||
Going to test this via mochitest-plain instead of chrome browser tests
Attachment #529881 -
Attachment is obsolete: true
| Reporter | ||
Comment 17•14 years ago
|
||
Attachment #530178 -
Attachment is obsolete: true
| Reporter | ||
Comment 18•14 years ago
|
||
Attachment #530457 -
Attachment is obsolete: true
| Reporter | ||
Updated•14 years ago
|
Assignee: ddahl → nobody
Component: Account Manager → Server: Identity
Product: Firefox → Mozilla Services
QA Contact: account.manager → identity-server
Version: Trunk → unspecified
| Reporter | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•