Diff
Modified: trunk/LayoutTests/ChangeLog (205401 => 205402)
--- trunk/LayoutTests/ChangeLog 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/LayoutTests/ChangeLog 2016-09-03 14:40:36 UTC (rev 205402)
@@ -1,3 +1,13 @@
+2016-09-03 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Address ESLint undefined variable errors
+ https://bugs.webkit.org/show_bug.cgi?id=161563
+
+ Reviewed by Darin Adler.
+
+ * inspector/protocol/inspector-backend-invocation-return-value-expected.txt:
+ * inspector/protocol/inspector-backend-invocation-return-value.html:
+
2016-09-03 Chris Dumez <[email protected]>
Align meta element http-equiv="refresh" parsing with the HTML specification
Modified: trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value-expected.txt (205401 => 205402)
--- trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value-expected.txt 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value-expected.txt 2016-09-03 14:40:36 UTC (rev 205402)
@@ -16,6 +16,11 @@
PASS: A backend command should return a Promise when invoked without a callback.
PASS: An invalid command invocation's promise should be rejected.
+-- Running test case: RejectCommandPromiseWithExtraArgumentThatIsNotCallback
+ERROR: Protocol Error: Protocol Error: Optional callback argument for command 'Runtime.enable' call must be a function but its type is 'number'.
+PASS: A backend command should return a Promise when invoked without a callback.
+PASS: An invalid command invocation's promise should be rejected.
+
-- Running test case: ReturnNothingIfCallback
PASS: A backend command should not have a return value when invoked with a callback.
Modified: trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value.html (205401 => 205402)
--- trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value.html 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/LayoutTests/inspector/protocol/inspector-backend-invocation-return-value.html 2016-09-03 14:40:36 UTC (rev 205402)
@@ -73,6 +73,27 @@
}
});
+ suite.addTestCase({
+ name: "RejectCommandPromiseWithExtraArgumentThatIsNotCallback",
+ description: "Backend command's returned promise should be rejected if the command has an extra argument that is not a callback.",
+ test: (resolve, reject) => {
+ let result = RuntimeAgent.enable(1);
+
+ InspectorTest.expectThat(result instanceof Promise, "A backend command should return a Promise when invoked without a callback.");
+ // If a promise wasn't returned, we can't test the rest so just die.
+ if (!(result instanceof Promise))
+ reject();
+
+ result.then(function resolved(result) {
+ InspectorTest.log("FAIL: An invalid command invocation's promise should be rejected.");
+ reject();
+ }, function rejected(result) {
+ InspectorTest.log("PASS: An invalid command invocation's promise should be rejected.");
+ resolve();
+ });
+ }
+ });
+
// Test behavior for function-based callbacks.
suite.addTestCase({
Modified: trunk/Source/WebInspectorUI/ChangeLog (205401 => 205402)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-09-03 14:40:36 UTC (rev 205402)
@@ -1,5 +1,18 @@
2016-09-03 Joseph Pecoraro <[email protected]>
+ Web Inspector: Address ESLint undefined variable errors
+ https://bugs.webkit.org/show_bug.cgi?id=161563
+
+ Reviewed by Darin Adler.
+
+ * UserInterface/Controllers/CSSStyleManager.js:
+ (WebInspector.CSSStyleManager.protocolMediaSourceToEnum):
+ * UserInterface/Models/IssueMessage.js:
+ (WebInspector.IssueMessage):
+ * UserInterface/Protocol/InspectorBackend.js:
+
+2016-09-03 Joseph Pecoraro <[email protected]>
+
Web Inspector: Address ESLint undefined variable errors in UserInterface/Views
https://bugs.webkit.org/show_bug.cgi?id=161565
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js (205401 => 205402)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js 2016-09-03 14:40:36 UTC (rev 205402)
@@ -83,7 +83,7 @@
case CSSAgent.CSSMediaSource.InlineSheet:
return WebInspector.CSSMedia.Type.InlineStyleSheet;
default:
- console.assert(false, "Unknown CSS.CSSMediaSource", origin);
+ console.assert(false, "Unknown CSS.CSSMediaSource", source);
return WebInspector.CSSMedia.Type.MediaRule;
}
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js (205401 => 205402)
--- trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/IssueMessage.js 2016-09-03 14:40:36 UTC (rev 205402)
@@ -70,7 +70,7 @@
break;
default:
- console.error("Unknown issue source:", source);
+ console.error("Unknown issue source:", this._consoleMessage.source);
this._type = WebInspector.IssueMessage.Type.OtherIssue;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (205401 => 205402)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2016-09-03 14:38:38 UTC (rev 205401)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2016-09-03 14:40:36 UTC (rev 205402)
@@ -583,7 +583,7 @@
}
if (!callback && commandArguments.length === 1 && commandArguments[0] !== undefined)
- return deliverFailure(`Protocol Error: Optional callback argument for command '${instance.qualifiedName}' call must be a function but its type is '${typeof args[0]}'.`);
+ return deliverFailure(`Protocol Error: Optional callback argument for command '${instance.qualifiedName}' call must be a function but its type is '${typeof commandArguments[0]}'.`);
if (callback)
instance._backend._sendCommandToBackendWithCallback(instance, parameters, callback);