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

Issue 2572563006: [Blimp] Refactor Blimp test engine with embedded test server and URL rewriting (Closed)

Created:
4 years ago by shenghuazhang
Modified:
3 years, 11 months ago
CC:
anandc+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, chromium-reviews, dtrainor+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, scf+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Blimp] Refactor Blimp test engine with embedded test server and URL rewriting Create test infrastructure to do end to end page loading tests in client side. The framework mainly builds in the blimp engine code, and deals with url getting by the help of embedded test server. The main idea is to create a main() function in blimp/engine/testing/app which should look similar to the one in blimp/engine/app, using mostly same blimp engine methods, and overrides/adding functions for testing needs. Components in the test infrastructure should take care of: - Set up embedded test server - Create URL handler to take care of magic URLs - Deliver related URL to test server and get full URL in server - Rewrite the magic URLs and should pass it to LoadUrl Need to add the test engine main function to be executable in BUILD.gn; should mark it as 'testonly = true' to not interrupt with the normal blimp function. BUG=656122 *** This CL fixed bug 656122. It won't be committed due to bug is marked as WontFix. ***

Patch Set 1 #

Total comments: 4

Patch Set 2 : Function works. Needs to refactor blimp_url_rewriter_unittest.cc #

Total comments: 20

Patch Set 3 : blimp_url_rewriter_unittest.cc done. #

Patch Set 4 : John comment #

Total comments: 56

Patch Set 5 : Kevin's comment #

Patch Set 6 : nit change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+648 lines, -6 lines) Patch
M PRESUBMIT.py View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M blimp/engine/BUILD.gn View 1 2 3 4 4 chunks +97 lines, -0 lines 0 comments Download
M blimp/engine/app/blimp_browser_main_parts.h View 1 2 3 4 1 chunk +11 lines, -5 lines 0 comments Download
M blimp/engine/app/blimp_browser_main_parts.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M blimp/engine/app/blimp_content_browser_client.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M blimp/engine/app/blimp_content_browser_client.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M blimp/engine/app/blimp_content_main_delegate.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M blimp/engine/app/blimp_content_main_delegate.cc View 1 chunk +5 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/blimp_url_rewriter.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/blimp_url_rewriter.cc View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/blimp_url_rewriter_unittest.cc View 1 2 3 4 1 chunk +107 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_browser_main_parts.h View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_browser_main_parts.cc View 1 2 3 4 1 chunk +66 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_content_browser_client.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_content_browser_client.cc View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_content_main_delegate.h View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_content_main_delegate.cc View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A blimp/engine/testing/app/test_blimp_main.cc View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
A blimp/engine/testing/session/test_blimp_engine_session.h View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A blimp/engine/testing/session/test_blimp_engine_session.cc View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
shenghuazhang
https://codereview.chromium.org/2572563006/diff/1/blimp/engine/testing/app/content_testing_main.cc File blimp/engine/testing/app/content_testing_main.cc (right): https://codereview.chromium.org/2572563006/diff/1/blimp/engine/testing/app/content_testing_main.cc#newcode34 blimp/engine/testing/app/content_testing_main.cc:34: DCHECK(blimp::engine::test::g_ets_instance->Start()); main_runner->Run() complains that Zygote should be the single ...
4 years ago (2016-12-13 02:14:19 UTC) #1
jbudorick
https://codereview.chromium.org/2572563006/diff/1/blimp/engine/testing/app/blimp_browser_testing_main_parts.h File blimp/engine/testing/app/blimp_browser_testing_main_parts.h (right): https://codereview.chromium.org/2572563006/diff/1/blimp/engine/testing/app/blimp_browser_testing_main_parts.h#newcode33 blimp/engine/testing/app/blimp_browser_testing_main_parts.h:33: void PreEarlyInitialization() override; Could we set up the ETS ...
4 years ago (2016-12-13 18:31:03 UTC) #3
jbudorick
4 years ago (2016-12-13 18:31:04 UTC) #4
shenghuazhang
The test infra is functionally working. Two things need some suggestions: 1. The location of ...
3 years, 11 months ago (2017-01-05 23:36:33 UTC) #5
jbudorick at gmail
https://codereview.chromium.org/2572563006/diff/20001/blimp/engine/DEPS File blimp/engine/DEPS (right): https://codereview.chromium.org/2572563006/diff/20001/blimp/engine/DEPS#newcode12 blimp/engine/DEPS:12: "+content/browser", I think depending on the nonpublic part of ...
3 years, 11 months ago (2017-01-06 16:09:37 UTC) #7
shenghuazhang
Thanks for the hints! Refactored blimp_url_rewriter_unittest.cc which runs succesfully now. Still have questions around blimp_browser_testing_main_parts.cc, ...
3 years, 11 months ago (2017-01-07 01:21:24 UTC) #8
jbudorick at gmail
https://codereview.chromium.org/2572563006/diff/20001/blimp/engine/testing/app/blimp_browser_testing_main_parts.cc File blimp/engine/testing/app/blimp_browser_testing_main_parts.cc (right): https://codereview.chromium.org/2572563006/diff/20001/blimp/engine/testing/app/blimp_browser_testing_main_parts.cc#newcode64 blimp/engine/testing/app/blimp_browser_testing_main_parts.cc:64: std::move(browser_context), net_log_.get(), engine_config_.get(), On 2017/01/07 01:21:24, shenghuazhang wrote: > ...
3 years, 11 months ago (2017-01-07 02:34:51 UTC) #9
shenghuazhang
Refactored by John's comment. +jochen Hi Jochen, here is a file name added in src/PRESUBMIT.py ...
3 years, 11 months ago (2017-01-09 19:23:47 UTC) #11
shenghuazhang
+kmarshall Thanks Kevin to be the project reviewer of this CL!
3 years, 11 months ago (2017-01-09 19:44:20 UTC) #13
Kevin M
https://codereview.chromium.org/2572563006/diff/60001/blimp/engine/app/blimp_browser_main_parts.h File blimp/engine/app/blimp_browser_main_parts.h (right): https://codereview.chromium.org/2572563006/diff/60001/blimp/engine/app/blimp_browser_main_parts.h#newcode39 blimp/engine/app/blimp_browser_main_parts.h:39: // content::BrowserMainParts implementation. Move this below the non-overrides https://codereview.chromium.org/2572563006/diff/60001/blimp/engine/app/blimp_content_browser_client.h ...
3 years, 11 months ago (2017-01-09 20:17:18 UTC) #16
jochen (gone - plz use gerrit)
the referenced bug is marked as WontFix. Should this CL also be closed?
3 years, 11 months ago (2017-01-10 09:48:18 UTC) #17
shenghuazhang
On 2017/01/10 09:48:18, jochen wrote: > the referenced bug is marked as WontFix. Should this ...
3 years, 11 months ago (2017-01-10 23:20:34 UTC) #18
shenghuazhang
Hi Kevin, thank you for the review! Refactored most of them. Please look at the ...
3 years, 11 months ago (2017-01-10 23:20:50 UTC) #19
Kevin M
lgtm https://codereview.chromium.org/2572563006/diff/60001/blimp/engine/testing/app/blimp_browser_testing_main_parts.cc File blimp/engine/testing/app/blimp_browser_testing_main_parts.cc (right): https://codereview.chromium.org/2572563006/diff/60001/blimp/engine/testing/app/blimp_browser_testing_main_parts.cc#newcode50 blimp/engine/testing/app/blimp_browser_testing_main_parts.cc:50: blimp::engine::test::g_ets_instance.reset(new net::EmbeddedTestServer()); On 2017/01/10 23:20:49, shenghuazhang wrote: > ...
3 years, 11 months ago (2017-01-11 00:28:14 UTC) #20
shenghuazhang
3 years, 11 months ago (2017-01-11 19:48:45 UTC) #23
This CL fixed bug 656122. It won't be committed due to bug is marked as WontFix.
Will close the CL.

Powered by Google App Engine
This is Rietveld 408576698