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

Issue 405093003: Taking screenshots while running a test (Closed)

Created:
6 years, 5 months ago by Lisa Ignatyeva
Modified:
6 years, 5 months ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Taking screenshots while running a test Adds a class ScreenshotTester, which now adds an opportunity to take a screenshot while running a test and then save it to a directory specified by some switch. it is now fully included in LoginUIVisible test. Taking screenshots also requires waiting until all the animation finishes loading. To handle with it, a class AnimationDelayHandler is implemented (in LoginUIVisible). To turn taking screenshots on, switch --enable-test-screenshots should be used. To specify the directory where all the screenshots will be stored, use --screenshot-dest=value, where value is the full path to the directory. It is planned that working with this class will have two modes: taking a new screenshot and saving it, and taking a screenshot and comparing it with the previously stored one. Now only the first mode is implemented, and running it also requires a switch --update-golden-screenshots. Pixel output is usually off in the tests, so before taking screenshots switches --enable-pixel-output-in-tests and --ui-enable-impl-side-painting should be also used. BUG=395653 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284504

Patch Set 1 #

Total comments: 53

Patch Set 2 : Lots of style bugs fixed; switches restuctured, renamed and moved #

Patch Set 3 : Switches restructured again #

Total comments: 8

Patch Set 4 : added comments for ScreenshotTester fields & fixed some minor style bugs #

Total comments: 2

Patch Set 5 : added namespace chromeos & removed golden_screenshot_path_ field from ScreenshotTester #

Total comments: 6

Patch Set 6 : minor fixes #

Patch Set 7 : last DCHECK replaced with DCHECK_CURRENTLY_ON #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -2 lines) Patch
M chrome/browser/chromeos/login/login_ui_browsertest.cc View 1 2 3 4 5 3 chunks +139 lines, -1 line 0 comments Download
A chrome/browser/chromeos/login/screenshot_tester.h View 1 2 3 4 5 1 chunk +67 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/login/screenshot_tester.cc View 1 2 3 4 5 6 1 chunk +103 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/chromeos_switches.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chromeos/chromeos_switches.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
ygorshenin1
First bunch of comments. https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc File chrome/browser/chromeos/login/login_ui_browsertest.cc (right): https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc#newcode67 chrome/browser/chromeos/login/login_ui_browsertest.cc:67: bool waiter_loop_is_on_, login_or_lock_webui_visible_; nit: declare ...
6 years, 5 months ago (2014-07-21 09:48:23 UTC) #1
Denis Kuznetsov (DE-MUC)
https://chromiumcodereview.appspot.com/405093003/diff/1/chrome/browser/chromeos/login/screenshot_tester.cc File chrome/browser/chromeos/login/screenshot_tester.cc (right): https://chromiumcodereview.appspot.com/405093003/diff/1/chrome/browser/chromeos/login/screenshot_tester.cc#newcode47 chrome/browser/chromeos/login/screenshot_tester.cc:47: if (screenshot_dest_enabled_) { On 2014/07/21 09:48:22, ygorshenin1 wrote: > ...
6 years, 5 months ago (2014-07-21 12:13:17 UTC) #2
Lisa Ignatyeva
The CQ bit was checked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 13:34:11 UTC) #3
Lisa Ignatyeva
The CQ bit was unchecked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 13:34:12 UTC) #4
Lisa Ignatyeva
The CQ bit was checked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 13:38:51 UTC) #5
Lisa Ignatyeva
The CQ bit was unchecked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 13:38:52 UTC) #6
Lisa Ignatyeva
https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc File chrome/browser/chromeos/login/login_ui_browsertest.cc (right): https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc#newcode67 chrome/browser/chromeos/login/login_ui_browsertest.cc:67: bool waiter_loop_is_on_, login_or_lock_webui_visible_; On 2014/07/21 09:48:22, ygorshenin1 wrote: > ...
6 years, 5 months ago (2014-07-21 13:41:04 UTC) #7
Denis Kuznetsov (DE-MUC)
https://chromiumcodereview.appspot.com/405093003/diff/40001/chrome/browser/chromeos/login/screenshot_tester.h File chrome/browser/chromeos/login/screenshot_tester.h (right): https://chromiumcodereview.appspot.com/405093003/diff/40001/chrome/browser/chromeos/login/screenshot_tester.h#newcode20 chrome/browser/chromeos/login/screenshot_tester.h:20: typedef scoped_refptr<base::RefCountedBytes> PNGFile; This is used only in private ...
6 years, 5 months ago (2014-07-21 13:49:43 UTC) #8
Lisa Ignatyeva
https://codereview.chromium.org/405093003/diff/40001/chrome/browser/chromeos/login/screenshot_tester.h File chrome/browser/chromeos/login/screenshot_tester.h (right): https://codereview.chromium.org/405093003/diff/40001/chrome/browser/chromeos/login/screenshot_tester.h#newcode20 chrome/browser/chromeos/login/screenshot_tester.h:20: typedef scoped_refptr<base::RefCountedBytes> PNGFile; On 2014/07/21 13:49:43, Denis Kuznetsov wrote: ...
6 years, 5 months ago (2014-07-21 14:07:04 UTC) #9
Denis Kuznetsov (DE-MUC)
https://chromiumcodereview.appspot.com/405093003/diff/60001/chrome/browser/chromeos/login/screenshot_tester.h File chrome/browser/chromeos/login/screenshot_tester.h (right): https://chromiumcodereview.appspot.com/405093003/diff/60001/chrome/browser/chromeos/login/screenshot_tester.h#newcode15 chrome/browser/chromeos/login/screenshot_tester.h:15: namespace chromeos here and in .cc file
6 years, 5 months ago (2014-07-21 14:25:33 UTC) #10
Lisa Ignatyeva
Also removed an unnecessary golden_screenshot_path_ field from ScreenshotTester. https://codereview.chromium.org/405093003/diff/60001/chrome/browser/chromeos/login/screenshot_tester.h File chrome/browser/chromeos/login/screenshot_tester.h (right): https://codereview.chromium.org/405093003/diff/60001/chrome/browser/chromeos/login/screenshot_tester.h#newcode15 chrome/browser/chromeos/login/screenshot_tester.h:15: On ...
6 years, 5 months ago (2014-07-21 14:40:50 UTC) #11
antrim
lgtm
6 years, 5 months ago (2014-07-21 14:42:13 UTC) #12
Lisa Ignatyeva
The CQ bit was checked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 14:43:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/elizavetai@chromium.org/405093003/80001
6 years, 5 months ago (2014-07-21 14:45:07 UTC) #14
Lisa Ignatyeva
The CQ bit was unchecked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 14:57:53 UTC) #15
Nikita (slow)
Please create a tracking bug and reference it here as: BUG=id
6 years, 5 months ago (2014-07-21 14:58:41 UTC) #16
ygorshenin1
https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc File chrome/browser/chromeos/login/login_ui_browsertest.cc (right): https://codereview.chromium.org/405093003/diff/1/chrome/browser/chromeos/login/login_ui_browsertest.cc#newcode67 chrome/browser/chromeos/login/login_ui_browsertest.cc:67: bool waiter_loop_is_on_, login_or_lock_webui_visible_; Not done :) On 2014/07/21 13:41:02, ...
6 years, 5 months ago (2014-07-21 16:38:43 UTC) #17
Lisa Ignatyeva
https://codereview.chromium.org/405093003/diff/80001/chrome/browser/chromeos/login/login_ui_browsertest.cc File chrome/browser/chromeos/login/login_ui_browsertest.cc (right): https://codereview.chromium.org/405093003/diff/80001/chrome/browser/chromeos/login/login_ui_browsertest.cc#newcode148 chrome/browser/chromeos/login/login_ui_browsertest.cc:148: if (enable_test_screenshots_) { On 2014/07/21 16:38:43, ygorshenin1 wrote: > ...
6 years, 5 months ago (2014-07-21 16:52:40 UTC) #18
ygorshenin1
lgtm
6 years, 5 months ago (2014-07-21 16:55:22 UTC) #19
Lisa Ignatyeva
The CQ bit was checked by elizavetai@chromium.org
6 years, 5 months ago (2014-07-21 16:59:23 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/elizavetai@chromium.org/405093003/120001
6 years, 5 months ago (2014-07-21 17:01:02 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-21 18:54:15 UTC) #22
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 21:44:03 UTC) #23
Message was sent while issue was closed.
Change committed as 284504

Powered by Google App Engine
This is Rietveld 408576698