Stub for web-base client for DevTools bridge and tests
This patch mostly consists of testing environment for web WebClient. While
WebClient intended to be base for a new DeviceProvider in DevTools frontend
(https://codereview.chromium.org/720133002/) it is convinient to run
tests on android. It lets to test the client directly against server
counterpart avoiding flakiness of network and cloud services.
TBR=jochen@chromium.org
BUG=383418
Committed: https://crrev.com/ff7a801dfddaa22643accaf3e0df192470fb7a7b
Cr-Commit-Position: refs/heads/master@{#305131}
https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/android/client/javatests/AndroidManifest.xml File components/devtools_bridge/android/client/javatests/AndroidManifest.xml (right): https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/android/client/javatests/AndroidManifest.xml#newcode12 components/devtools_bridge/android/client/javatests/AndroidManifest.xml:12: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> You probably not need most of the ...
https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/a...
File
components/devtools_bridge/android/client/javatests/src/org/chromium/components/devtools_bridge/WebClientTest.java
(right):
https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/a...
components/devtools_bridge/android/client/javatests/src/org/chromium/components/devtools_bridge/WebClientTest.java:35:
} catch (ProcessInitException e) {
On 2014/11/20 21:10:38, SeRya wrote:
> On 2014/11/20 19:02:42, mnaganov (cr) wrote:
> > You can avoid catching exceptions yourself, if you just add "throws
Exception"
> > to your test methods. This way, the testing framework will automatically log
> the
> > exception and mark the test run as failed. You will only need to catch
> > exceptions if you really intend to handle them in tests.
>
> It would be so unless this method is used not inside
> ThreadUtils.runOnUiThreadBlocking.
I'm not convinced. If the operation has thrown an exception, FutureTask will
raise ExecutionException when retrieving the result on the caller's thread via
get() (and this is what runOnUiThreadBlocking uses). See
http://developer.android.com/reference/java/util/concurrent/FutureTask.html#s...
https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/a...
File
components/devtools_bridge/android/client/javatests/src/org/chromium/components/devtools_bridge/WebClientTest.java
(right):
https://codereview.chromium.org/736363002/diff/1/components/devtools_bridge/a...
components/devtools_bridge/android/client/javatests/src/org/chromium/components/devtools_bridge/WebClientTest.java:35:
} catch (ProcessInitException e) {
On 2014/11/20 21:54:48, mnaganov (cr) wrote:
> On 2014/11/20 21:10:38, SeRya wrote:
> > On 2014/11/20 19:02:42, mnaganov (cr) wrote:
> > > You can avoid catching exceptions yourself, if you just add "throws
> Exception"
> > > to your test methods. This way, the testing framework will automatically
log
> > the
> > > exception and mark the test run as failed. You will only need to catch
> > > exceptions if you really intend to handle them in tests.
> >
> > It would be so unless this method is used not inside
> > ThreadUtils.runOnUiThreadBlocking.
>
> I'm not convinced. If the operation has thrown an exception, FutureTask will
> raise ExecutionException when retrieving the result on the caller's thread via
> get() (and this is what runOnUiThreadBlocking uses). See
>
http://developer.android.com/reference/java/util/concurrent/FutureTask.html#s...
Done.
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/25690)
6 years, 1 month ago
(2014-11-20 23:40:05 UTC)
#12
Issue 736363002: Stub for web-base client for DevTools bridge and tests
(Closed)
Created 6 years, 1 month ago by SeRya
Modified 6 years, 1 month ago
Reviewers: mnaganov (inactive), dgozman
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 20