WebKit Bugzilla
Attachment 339847 Details for
Bug 185432
: Consecutive messages logged as JSON are coalesced
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185432-20180508113158.patch (text/plain), 6.24 KB, created by
Eric Carlson
on 2018-05-08 11:31:59 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2018-05-08 11:31:59 PDT
Size:
6.24 KB
patch
obsolete
>Subversion Revision: 231494 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 71bc05b6ffa665a566e0fbca80a2263ba6d2a355..62e09874d595ab60d830c4d185cddc8284f29d51 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-08 Eric Carlson <eric.carlson@apple.com> >+ >+ Consecutive messages logged as JSON are coalesced >+ https://bugs.webkit.org/show_bug.cgi?id=185432 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/ConsoleMessage.cpp: >+ (Inspector::ConsoleMessage::isEqual const): Messages with JSON arguments are not equal. >+ > 2018-05-08 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r231468. >diff --git a/Source/JavaScriptCore/inspector/ConsoleMessage.cpp b/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >index 5cfb04df4af834819bf8f78fb1d8e617738cae4a..f045f2400603f7064730a6aa2f4702e7d4ffbc28 100644 >--- a/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >+++ b/Source/JavaScriptCore/inspector/ConsoleMessage.cpp >@@ -300,6 +300,9 @@ bool ConsoleMessage::isEqual(ConsoleMessage* msg) const > } else if (msg->m_callStack) > return false; > >+ if (m_jsonLogValues.size() || msg->m_jsonLogValues.size()) >+ return false; >+ > return msg->m_source == m_source > && msg->m_type == m_type > && msg->m_level == m_level >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 10dc71a4d26a4f48b4e5b1e303aa52c676160b6d..5f880c9ac2d8423cc80d545d31943ff7aa25c192 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-08 Eric Carlson <eric.carlson@apple.com> >+ >+ Consecutive messages logged as JSON are coalesced >+ https://bugs.webkit.org/show_bug.cgi?id=185432 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/console/webcore-logging-expected.txt: >+ * inspector/console/webcore-logging.html: >+ > 2018-05-08 Said Abou-Hallawa <sabouhallawa@apple.com> > > feTurbulence is not rendered correctly on Retina display >diff --git a/LayoutTests/inspector/console/webcore-logging-expected.txt b/LayoutTests/inspector/console/webcore-logging-expected.txt >index da5181e706f86a36db03a939da609cc57eb927b8..2514aa2a2a7ab3ed261bc7db10e96c4a79115b37 100644 >--- a/LayoutTests/inspector/console/webcore-logging-expected.txt >+++ b/LayoutTests/inspector/console/webcore-logging-expected.txt >@@ -30,3 +30,14 @@ PASS: Media logging disabled. > PASS: Media logging has been enabled. > PASS: Media log message should have source 'media'. > >+-- Running test case: Console.Logging.LogAsJSON >+PASS: Media logging disabled. >+PASS: Verbose media logging has been enabled. >+PASS: Message logged as JSON. >+PASS: ConsoleMessage repeatCount is 1. >+PASS: Message logged as JSON. >+PASS: ConsoleMessage repeatCount is 1. >+PASS: Message logged as JSON. >+PASS: ConsoleMessage repeatCount is 1. >+Received three JSON messages. >+ >diff --git a/LayoutTests/inspector/console/webcore-logging.html b/LayoutTests/inspector/console/webcore-logging.html >index d060821dd5eb81f555661c42e25b10bd9c155eec..5974e10c4e44a4b37599360c5de85db21ff6b71a 100644 >--- a/LayoutTests/inspector/console/webcore-logging.html >+++ b/LayoutTests/inspector/console/webcore-logging.html >@@ -27,6 +27,16 @@ function pause() > TestPage.dispatchEventToFrontend('PauseEvent', {count: 1}); > } > >+function setupTrackTest() >+{ >+ let track = document.createElement('track'); >+ track.src = 'data:text/vtt,'+encodeURIComponent('WEBVTT\n\n00:00:00.000 --> 00:00:00.001\nCue 1\n\n'+ >+ '00:00:00.000 --> 00:00:00.001 line:0\nCue 2\n\n'+ >+ '00:00:00.000 --> 00:00:00.001 line:0%\nCue 3'); >+ track.track.mode = 'showing'; >+ video.appendChild(track); >+} >+ > function test() > { > let suite = InspectorTest.createAsyncSuite("Console.Logging"); >@@ -151,6 +161,48 @@ function test() > } > }); > >+ suite.addTestCase({ >+ name: "Console.Logging.LogAsJSON", >+ description: "JSON messages logged correctly.", >+ test(resolve, reject) { >+ ConsoleAgent.clearMessages(); >+ >+ let channel = WI.logManager.customLoggingChannels.find(channel => channel.source === WI.ConsoleMessage.MessageSource.Media); >+ InspectorTest.expectThat(channel.level === WI.LoggingChannel.Level.Off, "Media logging disabled."); >+ >+ ConsoleAgent.setLoggingChannelLevel(channel.source, WI.LoggingChannel.Level.Verbose) >+ ConsoleAgent.getLoggingChannels((error, channels) => { >+ if (error) { >+ InspectorTest.fail(`ConsoleAgent.getLoggingChannels() failed with error ${error}`); >+ reject(); >+ } >+ >+ let mediaChannel = channels.find(channel => channel.source === WI.ConsoleMessage.MessageSource.Media); >+ InspectorTest.expectThat(mediaChannel.level === WI.LoggingChannel.Level.Verbose, "Verbose media logging has been enabled."); >+ >+ let messageCount = 0; >+ let logListener = WI.logManager.addEventListener(WI.LogManager.Event.MessageAdded, (event) => { >+ let message = event.data.message; >+ InspectorTest.assert(message instanceof WI.ConsoleMessage); >+ InspectorTest.assert(message.source === WI.ConsoleMessage.MessageSource.Media); >+ >+ if (message.messageText.includes("LoadableTextTrack::newCuesAvailable")) { >+ InspectorTest.expectThat(message.parameters.length > 1, "Message logged as JSON."); >+ InspectorTest.expectThat(message.repeatCount === 1, "ConsoleMessage repeatCount is 1."); >+ if (++messageCount == 3) { >+ InspectorTest.log("Received three JSON messages."); >+ WI.logManager.removeEventListener(WI.LogManager.Event.MessageAdded, logListener, null); >+ ConsoleAgent.setLoggingChannelLevel(mediaChannel.source, WI.LoggingChannel.Level.Off) >+ resolve(); >+ } >+ } >+ }); >+ >+ InspectorTest.evaluateInPage(`setupTrackTest()`); >+ }) >+ } >+ }); >+ > suite.runTestCasesAndFinish(); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
joepeck
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185432
: 339847 |
339875
|
339877
|
339924