Implement mocks for identity and host-list, add a browser test to test the app in various failure modes.
* Minor refactoring of RemoteDesktopBrowerTest to better support deferred-start tests without needing them to duplicate too much code.
* Added some JavaScript helper functions.
* Interfacified the host-list and OAuth REST APIs, and added mocks.
* Added a mock for the chrome.identity API.
* Added a (partial, due to bugs that I'll fix separately) browser test to check the behaviour of the app in various failure modes.
Note that the first two items could conceivably be a separate CL, since they're likely to be useful independently of this CL. LMK if you'd like me to split it.
Review URL: https://codereview.chromium.org/840023004
Cr-Commit-Position: refs/heads/master@{#310885}
diff --git a/remoting/remoting_webapp_files.gypi b/remoting/remoting_webapp_files.gypi
index e70873e2..34ede972 100644
--- a/remoting/remoting_webapp_files.gypi
+++ b/remoting/remoting_webapp_files.gypi
@@ -38,6 +38,7 @@
'webapp/crd/js/identity.js',
'webapp/crd/js/oauth2.js',
'webapp/crd/js/oauth2_api.js',
+ 'webapp/crd/js/oauth2_api_impl.js',
],
# Client JavaScript files.
'remoting_webapp_js_client_files': [
@@ -90,6 +91,7 @@
'remoting_webapp_js_host_display_files': [
'webapp/crd/js/host_list.js',
'webapp/crd/js/host_list_api.js',
+ 'webapp/crd/js/host_list_api_impl.js',
'webapp/crd/js/host_table_entry.js',
],
# Logging and stats JavaScript files.
@@ -146,9 +148,14 @@
'webapp/browser_test/cancel_pin_browser_test.js',
'webapp/browser_test/invalid_pin_browser_test.js',
'webapp/browser_test/mock_client_plugin.js',
+ 'webapp/browser_test/mock_host_list_api.js',
+ 'webapp/browser_test/mock_identity.js',
+ 'webapp/browser_test/mock_oauth2_api.js',
'webapp/browser_test/mock_session_connector.js',
'webapp/browser_test/mock_signal_strategy.js',
'webapp/browser_test/scrollbar_browser_test.js',
+ 'webapp/browser_test/timeout_waiter.js',
+ 'webapp/browser_test/unauthenticated_browser_test.js',
'webapp/browser_test/update_pin_browser_test.js',
],
# These product files are excluded from our JavaScript unittest