Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Issue 771003002: Add support for deferring app initialization when testing. (Closed)

Created:
6 years ago by Jamie
Modified:
6 years ago
Reviewers:
*weitao, garykac
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add support for deferring app initialization when testing. This will allow certain app features such as authentication and loading of the host list to be replaced with mocks before they are used; in normal operation, these features are run automatically when the app is loaded, giving browser tests no opportunity to intervene. This is achieved by using the "source" URL parameter. Production code is unaffected by virtue of the fact that "source" is not passed by default, and even if a user is running with a command-line override, it will never be set to "test". As protection against the possibility that the previous sentence is false, when started in this test mode, initialization proceeds via a button click, making it user-accessible; this CL also adds a test that this button works. Committed: https://crrev.com/0932e48fc8387c01cd1edf092c42957f794b9b01 Cr-Commit-Position: refs/heads/master@{#308513}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 5

Patch Set 3 : Rebase. #

Patch Set 4 : Rebase. #

Total comments: 6

Patch Set 5 : Simplified ScopedOverride logic and made it work irrespective of command-line settings. #

Patch Set 6 : Improved comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -22 lines) Patch
M chrome/test/remoting/auth_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/remoting/launch_browsertest.cc View 1 chunk +12 lines, -1 line 0 comments Download
M chrome/test/remoting/me2me_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/remoting/page_load_notification_observer.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/test/remoting/page_load_notification_observer.cc View 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/test/remoting/remote_desktop_browsertest.h View 2 chunks +17 lines, -12 lines 0 comments Download
M chrome/test/remoting/remote_desktop_browsertest.cc View 1 2 3 4 5 4 chunks +14 lines, -2 lines 0 comments Download
M remoting/webapp/crd/html/template_main.html View 1 1 chunk +9 lines, -0 lines 0 comments Download
M remoting/webapp/crd/js/crd_main.js View 1 2 1 chunk +21 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
Jamie
Weitao: PTAL Gary: FYI, since I'm modifying some of the start-up code you've been looking ...
6 years ago (2014-12-02 01:30:13 UTC) #3
cylee1
https://codereview.chromium.org/771003002/diff/20001/chrome/test/remoting/remote_desktop_browsertest.cc File chrome/test/remoting/remote_desktop_browsertest.cc (right): https://codereview.chromium.org/771003002/diff/20001/chrome/test/remoting/remote_desktop_browsertest.cc#newcode186 chrome/test/remoting/remote_desktop_browsertest.cc:186: // even if they have the trace_app_source command-line option ...
6 years ago (2014-12-02 14:10:33 UTC) #4
garykac
https://codereview.chromium.org/771003002/diff/20001/remoting/webapp/crd/js/event_handlers.js File remoting/webapp/crd/js/event_handlers.js (right): https://codereview.chromium.org/771003002/diff/20001/remoting/webapp/crd/js/event_handlers.js#newcode118 remoting/webapp/crd/js/event_handlers.js:118: remoting.initForTesting(); Note that https://codereview.chromium.org/742473002/ removes the remoting.init() call here. ...
6 years ago (2014-12-02 16:43:22 UTC) #5
Jamie
ptal
6 years ago (2014-12-12 21:35:27 UTC) #7
weitao
https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc File chrome/test/remoting/remote_desktop_browsertest.cc (right): https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc#newcode186 chrome/test/remoting/remote_desktop_browsertest.cc:186: } Where is the "test" URL parameter added? https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.h ...
6 years ago (2014-12-12 22:49:52 UTC) #8
Jamie
ptal https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc File chrome/test/remoting/remote_desktop_browsertest.cc (right): https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc#newcode186 chrome/test/remoting/remote_desktop_browsertest.cc:186: } On 2014/12/12 22:49:52, weitaosu wrote: > Where ...
6 years ago (2014-12-13 01:03:43 UTC) #9
Jamie
Ping Weitao.
6 years ago (2014-12-15 19:12:23 UTC) #10
weitao
LGTM with nits. https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc File chrome/test/remoting/remote_desktop_browsertest.cc (right): https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc#newcode186 chrome/test/remoting/remote_desktop_browsertest.cc:186: } On 2014/12/13 01:03:43, Jamie wrote: ...
6 years ago (2014-12-16 01:06:27 UTC) #11
Jamie
FYI https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc File chrome/test/remoting/remote_desktop_browsertest.cc (right): https://codereview.chromium.org/771003002/diff/60001/chrome/test/remoting/remote_desktop_browsertest.cc#newcode186 chrome/test/remoting/remote_desktop_browsertest.cc:186: } On 2014/12/16 01:06:27, weitaosu wrote: > On ...
6 years ago (2014-12-16 01:33:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/771003002/100001
6 years ago (2014-12-16 01:34:52 UTC) #14
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years ago (2014-12-16 02:50:06 UTC) #15
commit-bot: I haz the power
6 years ago (2014-12-16 02:50:56 UTC) #16
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0932e48fc8387c01cd1edf092c42957f794b9b01
Cr-Commit-Position: refs/heads/master@{#308513}

Powered by Google App Engine
This is Rietveld 408576698