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

Issue 115896: Making the browser tests work on Unix (Closed)

Created:
11 years, 6 months ago by jcampan
Modified:
9 years, 7 months ago
Reviewers:
tony, Amanda Walker, sgk
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Porting the browser tests to Unix. The browser tests are an alternative to UI tests. They provide a way to exercise the browser from within the test (without having the test and the browser running in different processes). In order to ensure atexit hanlders are run after each tests and static initializers start fresh for each test, each test is run in a new process (on Linux and Mac). On Windows, a DLL containing the test is loaded/unloaded for each tests. BUG=None TEST=Run the browser tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17781

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 4

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+699 lines, -286 lines) Patch
M base/command_line.cc View 1 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M base/native_library.h View 1 2 3 4 5 6 2 chunks +28 lines, -5 lines 0 comments Download
M base/native_library_linux.cc View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M base/native_library_mac.mm View 1 2 3 4 5 6 2 chunks +37 lines, -4 lines 0 comments Download
M base/native_library_win.cc View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 5 6 5 chunks +18 lines, -4 lines 0 comments Download
M chrome/browser/task_manager_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 2 chunks +185 lines, -77 lines 2 comments Download
A chrome/test/browser/browser_test_launcher_in_proc.cc View 1 2 3 4 5 1 chunk +124 lines, -0 lines 0 comments Download
A chrome/test/browser/browser_test_launcher_out_of_proc.cc View 1 chunk +85 lines, -0 lines 0 comments Download
A chrome/test/browser/browser_test_runner.h View 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/test/browser/browser_test_runner.cc View 1 1 chunk +126 lines, -0 lines 0 comments Download
D chrome/test/browser/browser_tests_launcher.cc View 1 2 3 4 5 6 1 chunk +0 lines, -174 lines 0 comments Download
M chrome/test/browser/run_all_unittests.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/test/in_process_browser_test.cc View 1 2 3 4 5 6 5 chunks +7 lines, -2 lines 0 comments Download
M chrome/test/ui_test_utils.cc View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M webkit/glue/plugins/plugin_lib.cc View 1 2 3 4 5 6 2 chunks +3 lines, -12 lines 0 comments Download
M webkit/glue/plugins/plugin_lib_mac.mm View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
jcampan
11 years, 6 months ago (2009-05-29 00:46:24 UTC) #1
Amanda Walker
LGTM! Only one minor nit. http://codereview.chromium.org/115896/diff/1031/1033 File webkit/glue/plugins/plugin_lib_mac.mm (right): http://codereview.chromium.org/115896/diff/1031/1033#newcode303 Line 303: // not leaked. ...
11 years, 6 months ago (2009-06-01 18:29:00 UTC) #2
tony
drive-by wstring/filepath nits http://codereview.chromium.org/115896/diff/75/1089 File base/native_library.h (right): http://codereview.chromium.org/115896/diff/75/1089#newcode66 Line 66: std::wstring GetNativeLibraryName(const std::wstring& name); Nit: ...
11 years, 6 months ago (2009-06-01 19:21:20 UTC) #3
jcampan
http://codereview.chromium.org/115896/diff/75/1089 File base/native_library.h (right): http://codereview.chromium.org/115896/diff/75/1089#newcode66 Line 66: std::wstring GetNativeLibraryName(const std::wstring& name); On 2009/06/01 19:21:20, tony ...
11 years, 6 months ago (2009-06-03 00:02:49 UTC) #4
tony
LGTM! (sorry, didn't realize you were waiting on me)
11 years, 6 months ago (2009-06-03 23:22:47 UTC) #5
sgk
11 years, 6 months ago (2009-06-05 21:59:09 UTC) #6
http://codereview.chromium.org/115896/diff/1123/1139
File chrome/chrome.gyp (right):

http://codereview.chromium.org/115896/diff/1123/1139#newcode3626
Line 3626: # IMPORTANT NOTE: you must also put them in browser_tests_dll
So people don't have to duplicate, let's put these in a variable defined up in
the top 'variables' section:

'browser_test_sources': [
  'browser/ssl/ssl_browser_tests.cc',
  etc.
],

And then you can include the variable in both this and the sources list below as
follows (including a comment to direct people where to look):

  # <@(browser_tests_sources) defined in 'variables'
  # at the top of the file
  '<@(browser_tests_sources)',

http://codereview.chromium.org/115896/diff/1123/1139#newcode4033
Line 4033: 'dependencies': [
I'd expect this to have a dependency on 'browser_tests_dll'.  Yes, it's not
necessary for actally building the .exe, but since the .dll is (I presume)
necessary to actually *run* browser_tests.exe and have it do something, I think
it makes sense to guarantee that it's there.  We make 'chrome.exe' (in the 'app'
target) depend on 'chrome.dll' for similar reasons.

Powered by Google App Engine
This is Rietveld 408576698