Description
Devin Rousso
2017-06-14 18:34:29 PDT
Created attachment 312954 [details]
[Patch] WIP
Created attachment 313084 [details]
Patch
Created attachment 313380 [details]
Patch
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`) Comment on attachment 313380 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313380&action=review > Source/WebCore/ChangeLog:8 > + No new tests because this just adds extra values to an existing enum. At minimum we should test that WebGL2 and WebGPU contexts are being instrumented. Adding two simple test cases to LayoutTests/inspector/canvas/create-canvas-contexts.html should be enough: let simpleTestCases = [ ... { name: "CreateWebGL2CanvasContext", expression: `createCanvas("webgl2")`, contextType: WebInspector.Canvas.ContextType.WebGL2, }, { name: "CreateWebGPUCanvasContext", expression: `createCanvas("webgpu")`, contextType: WebInspector.Canvas.ContextType.WebGPU, } ]; For this to work, you'll need to add the following to your test: if (window.internals) { internals.settings.setWebGL2Enabled(true); internals.settings.setWebGPUEnabled(true); } > Source/WebCore/inspector/InspectorCanvasAgent.cpp:274 > + else if (is<WebGL2RenderingContext>(context)) There is a separate WEBGL2 guard. Created attachment 313464 [details]
Patch
Comment on attachment 313464 [details] Patch Attachment 313464 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3969299 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313477 [details]
Archive of layout-test-results from ews115 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 313464 [details] Patch Attachment 313464 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3969430 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313480 [details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 313490 [details]
Patch
Comment on attachment 313490 [details] Patch Attachment 313490 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3970240 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313494 [details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 313495 [details]
Patch
Comment on attachment 313495 [details] Patch Attachment 313495 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3970425 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313497 [details]
Archive of layout-test-results from ews100 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 313495 [details] Patch Attachment 313495 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3970518 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313499 [details]
Archive of layout-test-results from ews117 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 313528 [details]
Patch
Comment on attachment 313528 [details] Patch Attachment 313528 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3973153 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313536 [details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 313528 [details] Patch Attachment 313528 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3973168 New failing tests: inspector/canvas/create-canvas-contexts.html Created attachment 313537 [details]
Archive of layout-test-results from ews114 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 313528 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313528&action=review > LayoutTests/inspector/canvas/create-canvas-contexts.html:8 > + window.internals.settings.setWebGPUEnabled(true); The WebGPU portions of this test are only going to pass if a port enables ENABLE_WEBGPU. The WebGL2 portions of this test are only going to pass if a port enables ENABLE_WEBGL2. I think some ports don't do this (GTK/Windows) so they would fail this test. It might be easier to break these out into their own test that can be skipped per-port based on feature availability. LayoutTests/inspector/canvas/canvas-contexts.html # if needed a test for multiple LayoutTests/inspector/canvas/context-type-2d.html LayoutTests/inspector/canvas/context-type-webgl.html LayoutTests/inspector/canvas/context-type-webgl2.html LayoutTests/inspector/canvas/context-type-webgpu.html There is a way to share code between tests if you want to go that approach. Its up to you though if you want to go down this road. -- I'm not sure why this test is timing out. You can add `InspectorTest.debug()`, attach a new patch, and when EWS fails, you can get the debug output. Created attachment 314093 [details]
Patch
Comment on attachment 314093 [details] Patch Attachment 314093 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4017477 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314107 [details]
Archive of layout-test-results from ews114 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 314093 [details] Patch Attachment 314093 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4020738 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314149 [details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 314179 [details]
Patch
Attachment 314179 [details] did not pass style-queue:
WARNING: Not running on native Windows.
ERROR: LayoutTests/platform/win/TestExpectations:2386: Path does not exist. [test/expectations] [5]
ERROR: LayoutTests/platform/ios/TestExpectations:45: Path does not exist. [test/expectations] [5]
ERROR: LayoutTests/platform/gtk/TestExpectations:1263: Path does not exist. [test/expectations] [5]
Total errors found: 3 in 22 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 314179 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=314179&action=review Very nice! > LayoutTests/inspector/canvas/resources/create-context-utilities.js:69 > + name: suite.name + "." + name, I'm on the fence about this. I think its fine, you are generating tests. But one of the things I've always tried to strive for is the ability to search our code for the name of a failing test case: "Canvas.CreateContextWebGPU.NoCanvases" and find the code associated with it. This breaks that, but I'm probably overblowing the usefulness. I don't think I've actually done this search many times. > LayoutTests/inspector/canvas/resources/create-context-utilities.js:91 > + window.addCSSCanvasTestCase = function(contextType) { It is my understanding that you can't change the context inside of a -webkit-canvas. Can you throw an error if this gets called more than once in a test? Basically something like this: let addedCSSCanvas = false; window.addCSSCanvasTestCase = function(contextType) { InspectorTest.assert(!addedCSSCanvas, "addCSSCanvasTestCase should only be called once in a test"); addedCSSCanvas = true; ... suite.addTestCase ... }); > LayoutTests/platform/gtk/TestExpectations:1263 > +inspector/canvas/create-context-webpu.html [ Skip ] This is a typo it should be webgpu.html > LayoutTests/platform/ios/TestExpectations:45 > +inspector/canvas/create-context-webpu.html [ Skip ] This is a typo it should be webgpu.html > LayoutTests/platform/win/TestExpectations:2386 > +inspector/canvas/create-context-webpu.html [ Skip ] Remove this line. > Source/WebCore/inspector/InspectorCanvasAgent.cpp:49 > +#if ENABLE(WEBGL) > +#if ENABLE(WEBGL2) > +#include "WebGL2RenderingContext.h" > +#endif > #include "WebGLContextAttributes.h" > +#include "WebGLRenderingContext.h" > #include "WebGLRenderingContextBase.h" > +#endif > + > +#if ENABLE(WEBGPU) > +#include "WebGPURenderingContext.h" > +#endif This is a mess. I'd recommend not nesting WEBGL2 and WEBGL. Just: #if ENABLE(WEBGL) #include "WebGLRenderingContext.h" #endif #if ENABLE(WEBGL2) #include "WebGLContextAttributes.h" #include "WebGL2RenderingContext.h" #include "WebGLRenderingContextBase.h" #endif #if ENABLE(WEBGPU) #include "WebGPURenderingContext.h" #endif > Source/WebCore/inspector/InspectorCanvasAgent.cpp:52 > #include <inspector/IdentifiersFactory.h> > #include <inspector/InspectorProtocolObjects.h> Style: These would normally be next to line 36. > Source/WebCore/inspector/InspectorCanvasAgent.cpp:283 > +#if ENABLE(WEBGL) > + else if (is<WebGLRenderingContext>(context)) > contextType = Inspector::Protocol::Canvas::ContextType::WebGL; > +#if ENABLE(WEBGL2) > + else if (is<WebGL2RenderingContext>(context)) > + contextType = Inspector::Protocol::Canvas::ContextType::WebGL2; > +#endif > +#endif Likewise this doesn't need to nest and it becomes much more readable: #if ENABLE(WEBGL) else if (is<WebGLRenderingContext>(context)) contextType = Inspector::Protocol::Canvas::ContextType::WebGL; #endif #if ENABLE(WEBGL2) else if (is<WebGL2RenderingContext>(context)) contextType = Inspector::Protocol::Canvas::ContextType::WebGL2; #endif #if ENABLE(WEBGPU) else if (is<WebGPURenderingContext>(context)) contextType = Inspector::Protocol::Canvas::ContextType::WebGPU; #endif > Source/WebInspectorUI/UserInterface/Models/Canvas.js:189 > Canvas2D: "canvas-2d", > WebGL: "webgl", > + WebGL2: "webgl2", > + WebGPU: "webgpu", Have we considered different icons for these? Comment on attachment 314179 [details] Patch Attachment 314179 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4022399 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314186 [details]
Archive of layout-test-results from ews102 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 314179 [details] Patch Attachment 314179 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4022428 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314189 [details]
Archive of layout-test-results from ews115 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 314179 [details]
Patch
Hmm, the test is failing on Mac. Maybe we should spend some time trying to figure out why.
Created attachment 314330 [details]
[Patch] For bots
Comment on attachment 314330 [details] [Patch] For bots Attachment 314330 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4030645 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314350 [details]
Archive of layout-test-results from ews103 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 314330 [details] [Patch] For bots Attachment 314330 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4030613 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314352 [details]
Archive of layout-test-results from ews113 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 314330 [details] [Patch] For bots Attachment 314330 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4030844 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314357 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 314369 [details]
Patch
Created attachment 314375 [details]
Patch
Comment on attachment 314375 [details] Patch Attachment 314375 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4032891 New failing tests: inspector/canvas/create-context-webgpu.html inspector/canvas/create-context-webgl2.html Created attachment 314378 [details]
Archive of layout-test-results from ews101 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 314387 [details]
Patch
Comment on attachment 314387 [details]
Patch
r=me
Comment on attachment 314387 [details] Patch Clearing flags on attachment: 314387 Committed r219078: <http://trac.webkit.org/changeset/219078> All reviewed patches have been landed. Closing bug. |