[AndroidWebViewShell] Add MediaStream API layout tests.
commit4ea676b503f0be363da2b4aacceac7b1482f4402
authortimvolodine <timvolodine@chromium.org>
Thu, 10 Sep 2015 12:41:07 +0000 (10 05:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 10 Sep 2015 12:41:50 +0000 (10 12:41 +0000)
treec25ffd0335a3e32e555d36b5028243e8ca62c206
parent5c0a9df053e5cf30af85c09754890b34e76ac038
[AndroidWebViewShell] Add MediaStream API layout tests.

Add two layout tests for the MediaStream API (aka getUserMedia).
The tests check correctness of callbacks for the following cases:
- when permissions are denied
- success case (i.e. getUserMedia succeeds).

This patch also adds the 'shouldBe' and related JavaScript
testing primitives and the ability to grant/deny permissions in
tests.

BUG=515926

Review URL: https://codereview.chromium.org/1314033003

Cr-Commit-Position: refs/heads/master@{#348142}
android_webview/tools/WebViewShell/src/org/chromium/webview_shell/WebViewLayoutTest.java
android_webview/tools/WebViewShell/src/org/chromium/webview_shell/WebViewLayoutTestActivity.java
android_webview/tools/WebViewShell/test/blink-apis/geolocation/geolocation-permission-callbacks-expected.txt
android_webview/tools/WebViewShell/test/blink-apis/webrtc/mediastream-callbacks-expected.txt [new file with mode: 0644]
android_webview/tools/WebViewShell/test/blink-apis/webrtc/mediastream-callbacks.html [new file with mode: 0644]
android_webview/tools/WebViewShell/test/blink-apis/webrtc/mediastream-permission-denied-callbacks-expected.txt [new file with mode: 0644]
android_webview/tools/WebViewShell/test/blink-apis/webrtc/mediastream-permission-denied-callbacks.html [new file with mode: 0644]
android_webview/tools/WebViewShell/test/resources/js-test.js