Bug 180527

Summary: Simplify log channel configuration UI
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: Web InspectorAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, inspector-bugzilla-changes, jlewis3, joepeck, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
none
Updated patch. none

Description Eric Carlson 2017-12-07 06:39:21 PST
Don't include all five log levels in the log channel configuration popups, simplify to just "Off", "Basic", and "Verbose".
Comment 1 Radar WebKit Bug Importer 2017-12-07 06:42:32 PST
<rdar://problem/35908382>
Comment 2 Eric Carlson 2017-12-07 06:45:11 PST
Created attachment 328692 [details]
Proposed patch
Comment 3 Joseph Pecoraro 2017-12-07 10:46:05 PST
Comment on attachment 328692 [details]
Proposed patch

r=me
Comment 4 WebKit Commit Bot 2017-12-07 11:06:20 PST
Comment on attachment 328692 [details]
Proposed patch

Clearing flags on attachment: 328692

Committed r225634: <https://trac.webkit.org/changeset/225634>
Comment 5 WebKit Commit Bot 2017-12-07 11:06:22 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Matt Lewis 2017-12-07 13:11:06 PST
This patch caused the Layout test inspector/console/webcore-logging.html to timeout with a text difference consistently on High Sierra and Sierra:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=inspector%2Fconsole%2Fwebcore-logging.html

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r225635%20(1868)/results.html
https://build.webkit.org/builders/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/builds/1868

Diff:
--- /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/inspector/console/webcore-logging-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk1/build/layout-test-results/inspector/console/webcore-logging-actual.txt
@@ -1,3 +1,4 @@
+FAIL: Timed out waiting for notifyDone to be called
 Test WebKit logging configuration and console display.
 
 
@@ -27,6 +28,8 @@
 
 -- Running test case: Console.Logging.MediaLogging
 PASS: Media logging disabled.
-PASS: Media logging has been enabled.
-PASS: Media log message should have source 'media'.
+ERROR: Protocol Error: Invalid type of argument 'level' for command 'Console.setLoggingChannelLevel' call. It must be 'string' but it is 'undefined'.
+FAIL: Media logging has been enabled.
+    Expected: truthy
+    Actual: false
 

I was able to reproduce the timeout locally and when I tested before this patch the timeout was not reproducible.
Comment 7 Matt Lewis 2017-12-07 13:28:24 PST
Reverted r225634 for reason:

This caused layout tests to time out.

Committed r225643: <https://trac.webkit.org/changeset/225643>
Comment 8 Joseph Pecoraro 2017-12-07 15:58:08 PST
>  -- Running test case: Console.Logging.MediaLogging
>  PASS: Media logging disabled.
> -PASS: Media logging has been enabled.
> -PASS: Media log message should have source 'media'.
> +ERROR: Protocol Error: Invalid type of argument 'level' for command
> 'Console.setLoggingChannelLevel' call. It must be 'string' but it is
> 'undefined'.
> +FAIL: Media logging has been enabled.
> +    Expected: truthy
> +    Actual: false

Oo. Looks like these two lines in the test need to change:

    ConsoleAgent.setLoggingChannelLevel(channel.source, WI.LoggingChannel.Level.Log);
    ...
    InspectorTest.expectThat(mediaChannel.level === WI.LoggingChannel.Level.Log, "Media logging has been enabled.");

From "Level.Log" to "Level.Basic", since "Level.Log" no longer exists.
Comment 9 Eric Carlson 2017-12-07 17:13:34 PST
Created attachment 328760 [details]
Updated patch.
Comment 10 WebKit Commit Bot 2017-12-07 17:53:35 PST
Comment on attachment 328760 [details]
Updated patch.

Clearing flags on attachment: 328760

Committed r225663: <https://trac.webkit.org/changeset/225663>
Comment 11 WebKit Commit Bot 2017-12-07 17:53:36 PST
All reviewed patches have been landed.  Closing bug.