Changeset 207375 in webkit


Ignore:
Timestamp:
Oct 15, 2016 7:53:23 AM (8 years ago)
Author:
Chris Dumez
Message:

Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
https://bugs.webkit.org/show_bug.cgi?id=163472

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline w3c test now that more checks are passing.

  • web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt:

Source/WebCore:

Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:

This is because the attribute is of type double (not unrestricted double in the IDL).

Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.

No new tests, rebaselined existing test.

  • html/HTMLMediaElement.idl:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r207368 r207375  
     12016-10-15  Chris Dumez  <cdumez@apple.com>
     2
     3        Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
     4        https://bugs.webkit.org/show_bug.cgi?id=163472
     5
     6        Reviewed by Sam Weinig.
     7
     8        Rebaseline w3c test now that more checks are passing.
     9
     10        * web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt:
     11
    1122016-10-14  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt

    r203333 r207375  
    11
    2 FAIL Setting audio.volume to NaN should throw a TypeError assert_throws: function "function () {
    3         el.volume = aValue;
    4       }" did not throw
    5 FAIL Setting audio.volume to Infinity should throw a TypeError assert_throws: function "function () {
    6         el.volume = aValue;
    7       }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
    8 FAIL Setting audio.volume to -Infinity should throw a TypeError assert_throws: function "function () {
    9         el.volume = aValue;
    10       }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
    11 FAIL Setting video.volume to NaN should throw a TypeError assert_throws: function "function () {
    12         el.volume = aValue;
    13       }" did not throw
    14 FAIL Setting video.volume to Infinity should throw a TypeError assert_throws: function "function () {
    15         el.volume = aValue;
    16       }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
    17 FAIL Setting video.volume to -Infinity should throw a TypeError assert_throws: function "function () {
    18         el.volume = aValue;
    19       }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
     2PASS Setting audio.volume to NaN should throw a TypeError
     3PASS Setting audio.volume to Infinity should throw a TypeError
     4PASS Setting audio.volume to -Infinity should throw a TypeError
     5PASS Setting video.volume to NaN should throw a TypeError
     6PASS Setting video.volume to Infinity should throw a TypeError
     7PASS Setting video.volume to -Infinity should throw a TypeError
    208
  • trunk/Source/WebCore/ChangeLog

    r207374 r207375  
     12016-10-15  Chris Dumez  <cdumez@apple.com>
     2
     3        Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
     4        https://bugs.webkit.org/show_bug.cgi?id=163472
     5
     6        Reviewed by Sam Weinig.
     7
     8        Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:
     9        - https://html.spec.whatwg.org/#dom-media-volume
     10
     11        This is because the attribute is of type double (not unrestricted double in the IDL).
     12
     13        Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.
     14
     15        No new tests, rebaselined existing test.
     16
     17        * html/HTMLMediaElement.idl:
     18
    1192016-10-15  Zalan Bujtas  <zalan@apple.com>
    220
  • trunk/Source/WebCore/html/HTMLMediaElement.idl

    r207355 r207375  
    7878    // controls
    7979    attribute boolean controls;
    80     [SetterMayThrowLegacyException] attribute unrestricted double volume;
     80    [SetterMayThrowLegacyException] attribute double volume;
    8181    attribute boolean muted;
    8282    [Reflect=muted] attribute boolean defaultMuted;
Note: See TracChangeset for help on using the changeset viewer.