Skip to content

Commit fc20ff1

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 f147193 commit fc20ff1

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
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
@@ -105,15 +105,21 @@ function
105105
)
106106
{
107107
await
108-
SpecialPowers
108+
pushPref
109+
(
110+
"
111+
devtools
109112
.
110-
pushPrefEnv
113+
webconsole
114+
.
115+
timestampMessages
116+
"
117+
true
118+
)
119+
;
120+
await
121+
pushPref
111122
(
112-
{
113-
set
114-
:
115-
[
116-
[
117123
"
118124
devtools
119125
.
@@ -122,9 +128,6 @@ webconsole
122128
persistlog
123129
"
124130
true
125-
]
126-
]
127-
}
128131
)
129132
;
130133
let

devtools/client/webconsole/webconsole-ui.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,21 +3438,6 @@ handleTabNavigated
34383438
packet
34393439
)
34403440
{
3441-
if
3442-
(
3443-
!
3444-
packet
3445-
.
3446-
nativeConsoleAPI
3447-
)
3448-
{
3449-
this
3450-
.
3451-
logWarningAboutReplacedAPI
3452-
(
3453-
)
3454-
;
3455-
}
34563441
/
34573442
/
34583443
Wait
@@ -3485,6 +3470,21 @@ waitAsyncDispatches
34853470
(
34863471
)
34873472
;
3473+
if
3474+
(
3475+
!
3476+
packet
3477+
.
3478+
nativeConsoleAPI
3479+
)
3480+
{
3481+
this
3482+
.
3483+
logWarningAboutReplacedAPI
3484+
(
3485+
)
3486+
;
3487+
}
34883488
this
34893489
.
34903490
emit

0 commit comments

Comments
 (0)