Looking at build history it seems the test was OK in
> buildid: 20150830030440 https://treeherder.mozilla.org/logviewer.html#?job_id=22994&repo=comm-central
but failed in
> buildid: 20150831030205 https://treeherder.mozilla.org/logviewer.html#?job_id=23013&repo=comm-central
Both builds are based on the same comm-central revision, indicating this might be caused by a mozilla-central change.
I first assumed this was just a timing change and the test is failing due to that, but it looks like it is a real bustage. I'll take a look and see if I can reproduce this soon.
It is not limited to Gdata provider. When trying to connect to Google Calendar using CalDAV the same error is reported in CalDAV provider using 2015-09-02 builds:
Error: ReferenceError: OAUTH_BASE_URI is not defined
Source File: file:///[...]/components/calDavCalendar.js
Definitely caused by some change in Thunderbird Core. Verified by using different Thunderbird builds with same Lightning build. Changes: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7db14bebae9196d780b1d64d2fd32d1bda26828b&tochange=cafb1c90f794a73100a8f0afb9fe3301df0f2bde
I have no idea where the OAUTH_ values come from. Maybe some magic is done somewhere. In that case "Bug 1193583 - Fix eval to always execute under a non-extensible lexical scope" might be involved.
Created attachment 8656264 [details] [diff] [review]
This fixes it for me by changing const to var. Don't know if there could be side effects like name collision if objects now live in global scope.
(In reply to Stefan Sitter from comment #4)
> I have no idea where the OAUTH_ values come from. Maybe some magic is done
> somewhere. In that case "Bug 1193583 - Fix eval to always execute under a
> non-extensible lexical scope" might be involved.
Indeed they come from the obfuscation block. Great analysis, this is most definitely the bug causing it.
This will also be a problem for http://mxr.mozilla.org/comm-central/source/mail/components/cloudfile/nsBox.js#734 then, maybe you can go ahead and add this to your patch? I don't think var/const will cause problems, the global scope is just the component/module it is being executed in. CC'ing clokep since he did the box work.
Created attachment 8656291 [details] [diff] [review]
Updated patch including changes for Box.
Comment on attachment 8656291 [details] [diff] [review]
Review of attachment 8656291 [details] [diff] [review]:
Bug 1201169 - TEST-UNEXPECTED-FAIL | xpcshell-libical.ini:calendar/test/unit/test_gdata_provider.js | xpcshell return code: 0. r=fallen,clokep a=test-bustage-fix on CLOSED TREE
Thank you Philipp for creating this unit tests in first place. Don't know how long it would have take otherwise until the problem would have been found by users.
*** Bug 1201812 has been marked as a duplicate of this bug. ***
*** Bug 1228776 has been marked as a duplicate of this bug. ***