Changeset 143882 in webkit


Ignore:
Timestamp:
Feb 24, 2013 6:02:13 PM (11 years ago)
Author:
kihong.kwon@samsung.com
Message:

Add an ASSERT to didChangeDeviceProximity
https://bugs.webkit.org/show_bug.cgi?id=110317

Reviewed by Hajime Morrita.

Source/WebCore:

Add An ASSERT to didChangeDeviceProximity function to check range of value.

Change exist test cases.

  • Modules/proximity/DeviceProximityController.cpp:

(WebCore::DeviceProximityController::didChangeDeviceProximity):

LayoutTests:

Fix wrong test cases which are found by ASSERT insertion.

  • proximity/basic-operation-expected.txt:
  • proximity/basic-operation.html:
  • proximity/resources/event-after-navigation-new.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143880 r143882  
     12013-02-24  Kihong Kwon  <kihong.kwon@samsung.com>
     2
     3        Add an ASSERT to didChangeDeviceProximity
     4        https://bugs.webkit.org/show_bug.cgi?id=110317
     5
     6        Reviewed by Hajime Morrita.
     7
     8        Fix wrong test cases which are found by ASSERT insertion.
     9
     10        * proximity/basic-operation-expected.txt:
     11        * proximity/basic-operation.html:
     12        * proximity/resources/event-after-navigation-new.html:
     13
    1142013-02-24  Mike West  <mkwst@chromium.org>
    215
  • trunk/LayoutTests/proximity/basic-operation-expected.txt

    r139050 r143882  
    55
    66PASS deviceProximityEvent.value is firedEvent.value
    7 PASS deviceProximityEvent.min is firedEvent.max
    8 PASS deviceProximityEvent.max is firedEvent.min
     7PASS deviceProximityEvent.min is firedEvent.min
     8PASS deviceProximityEvent.max is firedEvent.max
    99PASS successfullyParsed is true
    1010
  • trunk/LayoutTests/proximity/basic-operation.html

    r139050 r143882  
    1313    deviceProximityEvent = e;
    1414    shouldBe('deviceProximityEvent.value', 'firedEvent.value');
    15     shouldBe('deviceProximityEvent.min', 'firedEvent.max');
    16     shouldBe('deviceProximityEvent.max', 'firedEvent.min');
     15    shouldBe('deviceProximityEvent.min', 'firedEvent.min');
     16    shouldBe('deviceProximityEvent.max', 'firedEvent.max');
    1717    finishJSTest();
    1818});
    1919
    20 internals.setDeviceProximity(document, 'webkitdeviceproximity', firedEvent.value, firedEvent.max, firedEvent.min);
     20internals.setDeviceProximity(document, 'webkitdeviceproximity', firedEvent.value, firedEvent.min, firedEvent.max);
    2121window.jsTestIsAsync = true;
    2222</script>
  • trunk/LayoutTests/proximity/resources/event-after-navigation-new.html

    r139050 r143882  
    88    <script>
    99        if (window.testRunner) {
    10             internals.setDeviceProximity(document, 'webkitdeviceproximity', 1.1, 2.2, 3.3);
     10            internals.setDeviceProximity(document, 'webkitdeviceproximity', 2.2, 1.1, 3.3);
    1111            testRunner.notifyDone();
    1212        }
  • trunk/Source/WebCore/ChangeLog

    r143881 r143882  
     12013-02-24  Kihong Kwon  <kihong.kwon@samsung.com>
     2
     3        Add an ASSERT to didChangeDeviceProximity
     4        https://bugs.webkit.org/show_bug.cgi?id=110317
     5
     6        Reviewed by Hajime Morrita.
     7
     8        Add An ASSERT to didChangeDeviceProximity function to check range of value.
     9
     10        Change exist test cases.
     11
     12        * Modules/proximity/DeviceProximityController.cpp:
     13        (WebCore::DeviceProximityController::didChangeDeviceProximity):
     14
    1152013-02-24  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebCore/Modules/proximity/DeviceProximityController.cpp

    r140960 r143882  
    4848void DeviceProximityController::didChangeDeviceProximity(const double value, const double min, const double max)
    4949{
     50    ASSERT(value >= min && value <= max);
     51
    5052    dispatchDeviceEvent(DeviceProximityEvent::create(eventNames().webkitdeviceproximityEvent, value, min, max));
    5153}
Note: See TracChangeset for help on using the changeset viewer.