Vibration can be canceled even if page visibility status is hidden
authorkihong.kwon@samsung.com <kihong.kwon@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jun 2013 08:07:40 +0000 (08:07 +0000)
committerkihong.kwon@samsung.com <kihong.kwon@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Jun 2013 08:07:40 +0000 (08:07 +0000)
commit7560e49173ba419b1506119bc5ad9cd7b8fab1c0
tree817e1912466d984bb21bb198e10050bfcaf0bb05
parent347bc6a339e6eb9f38c5581d60947dfd5bc5bd50
Vibration can be canceled even if page visibility status is hidden
https://bugs.webkit.org/show_bug.cgi?id=117333

Reviewed by Gyuyoung Kim.

Source/WebCore:

vibration can be canceled in the onvisibilitychange listener even if page visibility is changed to hidden status.
Therefore cancelVibration needs to work when page visibility is hidden.

Tests: vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html

* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/Vibration.h:
(WebCore::Vibration::isVibrating):
* testing/Internals.cpp:
(WebCore::Internals::isVibrating):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add a test case for cancel vibration after page visibility is changed to hidden status.
In addition, move navigator-vibration.html to vibration directory.

* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* vibration/cancelVibration-after-pagevisibility-changed-to-hidden-expected.txt: Added.
* vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html: Added.
* vibration/navigator-vibration-expected.txt: Renamed from LayoutTests/fast/dom/navigator-vibration-expected.txt.
* vibration/navigator-vibration.html: Renamed from LayoutTests/fast/dom/navigator-vibration.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/vibration/cancelVibration-after-pagevisibility-changed-to-hidden-expected.txt [new file with mode: 0644]
LayoutTests/vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html [new file with mode: 0644]
LayoutTests/vibration/navigator-vibration-expected.txt [moved from LayoutTests/fast/dom/navigator-vibration-expected.txt with 100% similarity]
LayoutTests/vibration/navigator-vibration.html [moved from LayoutTests/fast/dom/navigator-vibration.html with 77% similarity]
Source/WebCore/ChangeLog
Source/WebCore/Modules/vibration/NavigatorVibration.cpp
Source/WebCore/Modules/vibration/Vibration.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl