Skip to content

Commit cc3c3c4

Browse files
committed
Bug 1565010 - Fix intermittent on browser_webconsole_warn_about_replaced_api.js .r=Honza.
Log the console replaced message only after the current batch of messages are consumed. We also enable the timestamp in the test, so in case of failure we can diagnose what's going on better. Differential Revision: https://phabricator.services.mozilla.com/D72121 UltraBlame original commit: d321839de1603d8bf02752ebaa40434015149320
1 parent 81be210 commit cc3c3c4

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

devtools/client/webconsole/test/browser/browser_webconsole_warn_about_replaced_api.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,21 @@ function
7575
)
7676
{
7777
await
78-
SpecialPowers
78+
pushPref
79+
(
80+
"
81+
devtools
7982
.
80-
pushPrefEnv
83+
webconsole
84+
.
85+
timestampMessages
86+
"
87+
true
88+
)
89+
;
90+
await
91+
pushPref
8192
(
82-
{
83-
set
84-
:
85-
[
86-
[
8793
"
8894
devtools
8995
.
@@ -92,9 +98,6 @@ webconsole
9298
persistlog
9399
"
94100
true
95-
]
96-
]
97-
}
98101
)
99102
;
100103
let

devtools/client/webconsole/webconsole-ui.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,15 @@ handleTabNavigated
22492249
packet
22502250
)
22512251
{
2252+
await
2253+
this
2254+
.
2255+
wrapper
2256+
.
2257+
waitAsyncDispatches
2258+
(
2259+
)
2260+
;
22522261
if
22532262
(
22542263
!
@@ -2264,15 +2273,6 @@ logWarningAboutReplacedAPI
22642273
)
22652274
;
22662275
}
2267-
await
2268-
this
2269-
.
2270-
wrapper
2271-
.
2272-
waitAsyncDispatches
2273-
(
2274-
)
2275-
;
22762276
this
22772277
.
22782278
emit

0 commit comments

Comments
 (0)