Improve test cases for network information APIs
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 10:12:47 +0000 (10:12 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 10:12:47 +0000 (10:12 +0000)
commiteaee69e124c61dfc3eace0a30a6fb0229a91c729
treec793d7ebf2f018672a02fc0f7d00f4edf86a1671
parent517925b11cdf40456266494447a91ceb66bdd109
Improve test cases for network information APIs
https://bugs.webkit.org/show_bug.cgi?id=90162

Reviewed by Adam Barth.

Existing implementation doesn't test port implementation in network info APIs.
This patch lets test cases use bandwidth and metered functions implemented by port layer.

In addition, expected results need to check return type instead of property name.

Source/WebCore:

No new tests. Covered by existing tests.

* Modules/networkinfo/NetworkInfoConnection.cpp:
(WebCore::NetworkInfoConnection::bandwidth):
(WebCore::NetworkInfoConnection::metered):

LayoutTests:

* networkinformation/add-listener-from-callback-expected.txt:
* networkinformation/basic-all-types-of-events-expected.txt:
* networkinformation/basic-operation-expected.txt:
* networkinformation/multiple-frames-expected.txt:
* networkinformation/script-tests/add-listener-from-callback.js:
(checkNetworkInformation):
* networkinformation/script-tests/basic-all-types-of-events.js:
(checkNetworkInformation):
* networkinformation/script-tests/basic-operation.js:
* networkinformation/script-tests/multiple-frames.js:
(checkNetworkInformation):
(checkChildNetworkInformation):
* networkinformation/script-tests/updates.js:
(checkNetworkInformation):
* networkinformation/updates-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/networkinformation/add-listener-from-callback-expected.txt
LayoutTests/networkinformation/basic-all-types-of-events-expected.txt
LayoutTests/networkinformation/basic-operation-expected.txt
LayoutTests/networkinformation/multiple-frames-expected.txt
LayoutTests/networkinformation/script-tests/add-listener-from-callback.js
LayoutTests/networkinformation/script-tests/basic-all-types-of-events.js
LayoutTests/networkinformation/script-tests/basic-operation.js
LayoutTests/networkinformation/script-tests/multiple-frames.js
LayoutTests/networkinformation/script-tests/updates.js
LayoutTests/networkinformation/updates-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/networkinfo/NetworkInfoConnection.cpp