I would expect that DOMAgent.highlightNode.promise() [missing a single required argument] would cause the promise to be rejected, but instead it is fulfilled with value 'null', while logging something to the console. What is the expected behavior here?
<rdar://problem/19772080>
I agree it should reject if it is missing required arguments.
I have written a test for this new behavior, and am implementing changes now.
Created attachment 261142 [details] Proposed Fix
Attachment 261142 [details] did not pass style-queue: ERROR: Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:493: Line contains single-quote character. [js/syntax] [5] ERROR: Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:500: Line contains single-quote character. [js/syntax] [5] ERROR: Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js:506: Line contains single-quote character. [js/syntax] [5] Total errors found: 3 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 261142 [details] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=261142&action=review r=me > LayoutTests/inspector/protocol/inspector-backend-invocation-return-value-expected.txt:25 > +PASS: a successful command should invoke the callback with a 'null' first parameter. Lots of lowercase "a"s in here that should be capitalized. > LayoutTests/inspector/protocol/inspector-backend-invocation-return-value.html:125 > + description: "Backend command's returned promise should be rejected if the command lacks required arguments.", Nit: "Backend command's returned promise ..." => "Backend command callback ..."
Committed r189761: <http://trac.webkit.org/changeset/189761>