|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 function testSameVersion() { |
|
5 let mozSettings = window.navigator.mozSettings; |
|
6 let forceSent = false; |
|
7 |
|
8 mozSettings.addObserver("gecko.updateStatus", function statusObserver(setting) { |
|
9 if (!forceSent) { |
|
10 return; |
|
11 } |
|
12 |
|
13 mozSettings.removeObserver("gecko.updateStatus", statusObserver); |
|
14 is(setting.settingValue, "already-latest-version"); |
|
15 cleanUp(); |
|
16 }); |
|
17 |
|
18 sendContentEvent("force-update-check"); |
|
19 forceSent = true; |
|
20 } |
|
21 |
|
22 // Update lifecycle callbacks |
|
23 function preUpdate() { |
|
24 testSameVersion(); |
|
25 } |