Title: [252632] trunk
Revision
252632
Author
[email protected]
Date
2019-11-19 08:50:55 -0800 (Tue, 19 Nov 2019)

Log Message

OverConstrainedError is missing 'name' property
https://bugs.webkit.org/show_bug.cgi?id=204069

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt:
* web-platform-tests/mediacapture-streams/GUM-invalid-facing-mode.https-expected.txt:
* web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https-expected.txt:

Source/WebCore:

No new tests, existing test and results updated.

* Modules/mediastream/OverconstrainedError.h:
(WebCore::OverconstrainedError::name const):
* Modules/mediastream/OverconstrainedError.idl:

LayoutTests:

* fast/mediastream/MediaDevices-getUserMedia.html:
* fast/mediastream/overconstrainederror-constraint.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (252631 => 252632)


--- trunk/LayoutTests/ChangeLog	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/ChangeLog	2019-11-19 16:50:55 UTC (rev 252632)
@@ -1,3 +1,13 @@
+2019-11-19  Eric Carlson  <[email protected]>
+
+        OverConstrainedError is missing 'name' property
+        https://bugs.webkit.org/show_bug.cgi?id=204069
+
+        Reviewed by Youenn Fablet.
+
+        * fast/mediastream/MediaDevices-getUserMedia.html:
+        * fast/mediastream/overconstrainederror-constraint.html:
+
 2019-11-19  Kate Cheney  <[email protected]>
 
         [ Jazz ] http/tests/resourceLoadStatistics/cookie-deletion.html is timing out

Modified: trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt (252631 => 252632)


--- trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt	2019-11-19 16:50:55 UTC (rev 252632)
@@ -48,7 +48,7 @@
 
 PASS navigator.mediaDevices.getUserMedia({audio:false, video:videoConstraints}).then(invalidGotStream).catch(errorWithConstraints2) did not throw exception.
 PASS Error callback called.
-PASS errorArg.name is "Error"
+PASS errorArg.name is "OverconstrainedError"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html (252631 => 252632)


--- trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia.html	2019-11-19 16:50:55 UTC (rev 252632)
@@ -35,7 +35,7 @@
             function errorWithConstraints2(e) {
                 testPassed("Error callback called.");
                 errorArg = e;
-                shouldBeEqualToString("errorArg.name", "Error");
+                shouldBeEqualToString("errorArg.name", "OverconstrainedError");
 
                 finishJSTest();
             }

Modified: trunk/LayoutTests/fast/mediastream/overconstrainederror-constraint.html (252631 => 252632)


--- trunk/LayoutTests/fast/mediastream/overconstrainederror-constraint.html	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/fast/mediastream/overconstrainederror-constraint.html	2019-11-19 16:50:55 UTC (rev 252632)
@@ -20,6 +20,7 @@
         (e) => {
             assert_true(e instanceof OverconstrainedError);
             assert_equals(e.constraint, "", "constraint should be the empty string");
+            assert_equals(e.name, "OverconstrainedError", "OverconstrainedError name is correct");
         }
     );
 }, "Before grant");
@@ -31,6 +32,7 @@
         (e) => {
             assert_true(e instanceof OverconstrainedError);
             assert_equals(e.constraint, "deviceId", "constraint should be deviceId");
+            assert_equals(e.name, "OverconstrainedError", "OverconstrainedError name is correct");
         }
     );
 }, "After grant");

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (252631 => 252632)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-11-19 16:50:55 UTC (rev 252632)
@@ -1,3 +1,14 @@
+2019-11-19  Eric Carlson  <[email protected]>
+
+        OverConstrainedError is missing 'name' property
+        https://bugs.webkit.org/show_bug.cgi?id=204069
+
+        Reviewed by Youenn Fablet.
+
+        * web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt:
+        * web-platform-tests/mediacapture-streams/GUM-invalid-facing-mode.https-expected.txt:
+        * web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https-expected.txt:
+
 2019-11-19  Wenson Hsieh  <[email protected]>
 
         [Clipboard API] Add support for Clipboard.readText()

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt (252631 => 252632)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt	2019-11-19 16:50:55 UTC (rev 252632)
@@ -5,5 +5,5 @@
 This test checks that setting an impossible mandatory constraint (width >=1G) in getUserMedia works
 
 
-FAIL Tests that setting an impossible constraint in getUserMedia fails assert_equals: An impossible constraint triggers a OverconstrainedError expected "OverconstrainedError" but got "Error"
+FAIL Tests that setting an impossible constraint in getUserMedia fails assert_equals: The name of the not satisfied error is given in error.constraint expected "width" but got ""
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-invalid-facing-mode.https-expected.txt (252631 => 252632)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-invalid-facing-mode.https-expected.txt	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-invalid-facing-mode.https-expected.txt	2019-11-19 16:50:55 UTC (rev 252632)
@@ -3,5 +3,5 @@
 This test checks that trying to set an empty facingMode value in getUserMedia results in an OverconstrainedError.
 
 
-FAIL Tests that setting an invalid facingMode constraint in getUserMedia fails assert_equals: expected "OverconstrainedError" but got "Error"
+FAIL Tests that setting an invalid facingMode constraint in getUserMedia fails assert_equals: expected "facingMode" but got ""
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https-expected.txt (252631 => 252632)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https-expected.txt	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https-expected.txt	2019-11-19 16:50:55 UTC (rev 252632)
@@ -1,9 +1,9 @@
 When prompted, accept to share your video stream.
 
 
-FAIL applyConstraints rejects invalid groupID assert_equals: expected "OverconstrainedError" but got "Error"
+PASS applyConstraints rejects invalid groupID 
 PASS applyConstraints accepts invalid ideal groupID, does not change setting 
-FAIL applyConstraints rejects attempt to switch device using groupId assert_equals: expected "OverconstrainedError" but got "Error"
+PASS applyConstraints rejects attempt to switch device using groupId 
 FAIL applyConstraints rejects invalid resizeMode assert_unreached: applyConstraints() must fail with invalid resizeMode Reached unreachable code
 PASS applyConstraints accepts invalid ideal resizeMode, does not change setting 
 

Modified: trunk/Source/WebCore/ChangeLog (252631 => 252632)


--- trunk/Source/WebCore/ChangeLog	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/Source/WebCore/ChangeLog	2019-11-19 16:50:55 UTC (rev 252632)
@@ -1,3 +1,16 @@
+2019-11-19  Eric Carlson  <[email protected]>
+
+        OverConstrainedError is missing 'name' property
+        https://bugs.webkit.org/show_bug.cgi?id=204069
+
+        Reviewed by Youenn Fablet.
+
+        No new tests, existing test and results updated.
+
+        * Modules/mediastream/OverconstrainedError.h:
+        (WebCore::OverconstrainedError::name const):
+        * Modules/mediastream/OverconstrainedError.idl:
+
 2019-11-19  Chris Dumez  <[email protected]>
 
         Unreviewed iOS build fix.

Modified: trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.h (252631 => 252632)


--- trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.h	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.h	2019-11-19 16:50:55 UTC (rev 252632)
@@ -44,6 +44,7 @@
 
     String constraint() const { return m_constraint; }
     String message() const { return m_message; }
+    String name() const { return "OverconstrainedError"_s; }
 
 protected:
     explicit OverconstrainedError(const String& constraint, const String& message)

Modified: trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.idl (252631 => 252632)


--- trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.idl	2019-11-19 16:30:49 UTC (rev 252631)
+++ trunk/Source/WebCore/Modules/mediastream/OverconstrainedError.idl	2019-11-19 16:50:55 UTC (rev 252632)
@@ -33,4 +33,5 @@
 ] exception OverconstrainedError {
     readonly attribute DOMString message;
     readonly attribute DOMString constraint;
+    readonly attribute DOMString name;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to