Commit 9ea307c
committed
Explicitly set _initializationDeferred to false upon enabling tracking (when a user explicitly opts into analytics), move deferInitialization check where this._storageSuffix is actually defined (in the try block)
* set initializedDeferred = false in enableTracking()
* make sure this._storageSuffix is defined when cookies are being checked
* Added tests for sending events after tracking is enabled
* Added assertions to ensure that each test starts with a clean slate (no unsentEvents) before enabling tracking1 parent 91ae64c commit 9ea307c
2 files changed
+25
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
| 1622 | + | |
1622 | 1623 | | |
1623 | 1624 | | |
1624 | 1625 | | |
1625 | 1626 | | |
| 1627 | + | |
1626 | 1628 | | |
1627 | 1629 | | |
1628 | 1630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3369 | 3369 | | |
3370 | 3370 | | |
3371 | 3371 | | |
3372 | | - | |
| 3372 | + | |
3373 | 3373 | | |
3374 | 3374 | | |
3375 | 3375 | | |
| |||
3380 | 3380 | | |
3381 | 3381 | | |
3382 | 3382 | | |
| 3383 | + | |
3383 | 3384 | | |
3384 | 3385 | | |
| 3386 | + | |
3385 | 3387 | | |
3386 | 3388 | | |
3387 | 3389 | | |
3388 | 3390 | | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
3389 | 3405 | | |
3390 | 3406 | | |
3391 | 3407 | | |
| |||
0 commit comments