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

Issue 298263002: Battery Status API: add testing support for LayoutTests. (Closed)

Created:
6 years, 7 months ago by timvolodine
Modified:
6 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Battery Status API: add testing support for LayoutTests. Adds plumbing to make it possible to test the blink implementation of the Battery Status API using LayoutTests and TestRunner. In test mode a fake battery status dispatcher is used to allow manual triggering of battery status changes using TestRunner.didChangeBatteryStatus method. BUG=122593, 360068 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274652

Patch Set 1 #

Patch Set 2 : some style fixes #

Total comments: 6

Patch Set 3 : fixed Jochen's comments #

Patch Set 4 : rebased #

Total comments: 4

Patch Set 5 : fix comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -0 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/layouttest_support.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
A content/renderer/battery_status/fake_battery_status_dispatcher.h View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
A content/renderer/battery_status/fake_battery_status_dispatcher.cc View 1 chunk +34 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 4 chunks +18 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/WebTestDelegate.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/test_runner.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M content/shell/renderer/test_runner/test_runner.cc View 1 2 3 4 6 chunks +43 lines, -0 lines 0 comments Download
M content/shell/renderer/webkit_test_runner.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/shell/renderer/webkit_test_runner.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 4 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
timvolodine
6 years, 6 months ago (2014-05-28 10:22:55 UTC) #1
jochen (gone - plz use gerrit)
https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h File content/renderer/battery_status/fake_battery_status_dispatcher.h (right): https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h#newcode8 content/renderer/battery_status/fake_battery_status_dispatcher.h:8: #include "content/public/renderer/render_process_observer.h" not needed? https://codereview.chromium.org/298263002/diff/20001/content/shell/renderer/test_runner/test_runner.cc File content/shell/renderer/test_runner/test_runner.cc (right): https://codereview.chromium.org/298263002/diff/20001/content/shell/renderer/test_runner/test_runner.cc#newcode872 ...
6 years, 6 months ago (2014-05-28 12:08:17 UTC) #2
timvolodine
https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h File content/renderer/battery_status/fake_battery_status_dispatcher.h (right): https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h#newcode8 content/renderer/battery_status/fake_battery_status_dispatcher.h:8: #include "content/public/renderer/render_process_observer.h" On 2014/05/28 12:08:17, jochen wrote: > not ...
6 years, 6 months ago (2014-05-29 08:52:05 UTC) #3
timvolodine
On 2014/05/29 08:52:05, timvolodine wrote: > https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h > File content/renderer/battery_status/fake_battery_status_dispatcher.h (right): > > https://codereview.chromium.org/298263002/diff/20001/content/renderer/battery_status/fake_battery_status_dispatcher.h#newcode8 > ...
6 years, 6 months ago (2014-06-02 15:06:47 UTC) #4
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/298263002/diff/60001/content/renderer/renderer_webkitplatformsupport_impl.h File content/renderer/renderer_webkitplatformsupport_impl.h (right): https://codereview.chromium.org/298263002/diff/60001/content/renderer/renderer_webkitplatformsupport_impl.h#newcode190 content/renderer/renderer_webkitplatformsupport_impl.h:190: static void MockBatteryStatusChanged(const blink::WebBatteryStatus& status); nit. add ForTesting() ...
6 years, 6 months ago (2014-06-03 11:20:58 UTC) #5
timvolodine
https://codereview.chromium.org/298263002/diff/60001/content/renderer/renderer_webkitplatformsupport_impl.h File content/renderer/renderer_webkitplatformsupport_impl.h (right): https://codereview.chromium.org/298263002/diff/60001/content/renderer/renderer_webkitplatformsupport_impl.h#newcode190 content/renderer/renderer_webkitplatformsupport_impl.h:190: static void MockBatteryStatusChanged(const blink::WebBatteryStatus& status); On 2014/06/03 11:20:59, jochen ...
6 years, 6 months ago (2014-06-03 15:30:07 UTC) #6
timvolodine
The CQ bit was checked by timvolodine@chromium.org
6 years, 6 months ago (2014-06-03 18:20:38 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/298263002/80001
6 years, 6 months ago (2014-06-03 18:21:33 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-06-03 22:30:30 UTC) #9
Message was sent while issue was closed.
Change committed as 274652

Powered by Google App Engine
This is Rietveld 408576698