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

Issue 1088763002: Plugin Power Saver: Add comprehensive browser tests. (Closed)

Created:
5 years, 8 months ago by tommycli
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@0260-plugins-overhaul-prerender-tests
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plugin Power Saver: Add comprehensive browser tests. These browser tests should end the need for constant manual testing. These have been a long time coming. BUG=475688 Committed: https://crrev.com/0dd13013ffb72091053f670e5c883acb65017422 Cr-Commit-Position: refs/heads/master@{#326867}

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Patch Set 9 : #

Total comments: 4

Patch Set 10 : make a separate power saver test plugin #

Total comments: 14

Patch Set 11 : #

Patch Set 12 : fix windows build. add dependency to gypi #

Patch Set 13 : update isolate #

Total comments: 6

Patch Set 14 : add warn unused #

Total comments: 8

Patch Set 15 : move to a event-based notification when marked peripheral #

Patch Set 16 : #

Total comments: 10

Patch Set 17 : address thestig comments #

Patch Set 18 : add back PostMessage undef #

Total comments: 5

Patch Set 19 : x #

Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -38 lines) Patch
A chrome/browser/plugins/plugin_power_saver_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +156 lines, -0 lines 0 comments Download
M chrome/browser_tests.isolate View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/test/ppapi_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -2 lines 0 comments Download
M content/public/test/ppapi_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +36 lines, -16 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +16 lines, -1 line 0 comments Download
M content/renderer/pepper/plugin_module.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -5 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M ppapi/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M ppapi/api/private/ppb_testing_private.idl View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M ppapi/c/private/ppb_testing_private.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M ppapi/ppapi_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +20 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_testing_proxy.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/ppb_testing_proxy.cc View 1 2 3 4 5 6 7 4 chunks +29 lines, -11 lines 0 comments Download
M ppapi/shared_impl/ppapi_constants.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
A ppapi/tests/power_saver_test_plugin.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (11 generated)
tommycli
raymes / teravest: This patch is a followup to https://codereview.chromium.org/1062163004/. I had a question below: ...
5 years, 8 months ago (2015-04-14 18:30:56 UTC) #2
Lei Zhang
https://codereview.chromium.org/1088763002/diff/80001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/80001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode88 chrome/browser/plugins/plugin_power_saver_browsertest.cc:88: EXPECT_TRUE(IsPluginPeripheral("plugin")); Can you remind me why this is peripheral? ...
5 years, 8 months ago (2015-04-15 05:52:45 UTC) #4
Lei Zhang
Also, the browser tests are flaky. Sometimes IsPluginPeripheral() will return true when the expected result ...
5 years, 8 months ago (2015-04-15 07:04:08 UTC) #5
Lei Zhang
On 2015/04/15 05:52:45, Lei Zhang (slow to respond) wrote: > https://codereview.chromium.org/1088763002/diff/80001/chrome/browser/plugins/plugin_power_saver_browsertest.cc > File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): ...
5 years, 8 months ago (2015-04-15 07:29:38 UTC) #6
tommycli
On 2015/04/15 07:04:08, Lei Zhang (slow to respond) wrote: > Also, the browser tests are ...
5 years, 8 months ago (2015-04-15 22:30:12 UTC) #7
tommycli
https://codereview.chromium.org/1088763002/diff/80001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/80001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode88 chrome/browser/plugins/plugin_power_saver_browsertest.cc:88: EXPECT_TRUE(IsPluginPeripheral("plugin")); On 2015/04/15 05:52:44, Lei Zhang (slow to respond) ...
5 years, 8 months ago (2015-04-15 22:30:28 UTC) #8
raymes
I didn't review the browser test itself, just the pepper stuff. https://codereview.chromium.org/1088763002/diff/120001/content/renderer/pepper/message_channel.cc File content/renderer/pepper/message_channel.cc (right): ...
5 years, 8 months ago (2015-04-16 02:27:57 UTC) #9
raymes
On 2015/04/16 02:27:57, raymes wrote: > I didn't review the browser test itself, just the ...
5 years, 8 months ago (2015-04-16 02:28:34 UTC) #10
tommycli
raymes: I moved it to PPB_Testing_Private. See if this one appears better to you. Thanks! ...
5 years, 8 months ago (2015-04-17 00:02:17 UTC) #13
raymes
https://codereview.chromium.org/1088763002/diff/200001/content/renderer/pepper/plugin_power_saver_helper.cc File content/renderer/pepper/plugin_power_saver_helper.cc (right): https://codereview.chromium.org/1088763002/diff/200001/content/renderer/pepper/plugin_power_saver_helper.cc#newcode12 content/renderer/pepper/plugin_power_saver_helper.cc:12: #include "content/public/test/ppapi_test_utils.h" nit: is this needed? https://codereview.chromium.org/1088763002/diff/200001/ppapi/tests/testing_instance.cc File ppapi/tests/testing_instance.cc ...
5 years, 8 months ago (2015-04-17 01:13:45 UTC) #14
raymes
Thanks!
5 years, 8 months ago (2015-04-17 01:13:57 UTC) #15
tommycli
raymes: I made this a separate plugin. Seems to work! tsepez: May I have a ...
5 years, 8 months ago (2015-04-17 23:45:33 UTC) #17
raymes
lgtm with nits Thanks! https://codereview.chromium.org/1088763002/diff/220001/ppapi/tests/power_saver_test_plugin.cc File ppapi/tests/power_saver_test_plugin.cc (right): https://codereview.chromium.org/1088763002/diff/220001/ppapi/tests/power_saver_test_plugin.cc#newcode20 ppapi/tests/power_saver_test_plugin.cc:20: // PostMessage. nit: please change ...
5 years, 8 months ago (2015-04-20 01:05:32 UTC) #18
Tom Sepez
Tommy - what happens if your new message happens to arrive at a production plugin ...
5 years, 8 months ago (2015-04-20 15:43:29 UTC) #19
tommycli
On 2015/04/20 15:43:29, Tom Sepez wrote: > Tommy - what happens if your new message ...
5 years, 8 months ago (2015-04-20 16:26:39 UTC) #20
Tom Sepez
> tsepez: The Pepper Testing interface is only created when > --enable-pepper-testing flag is passed ...
5 years, 8 months ago (2015-04-20 16:33:20 UTC) #21
tommycli
raymes: thanks! https://codereview.chromium.org/1088763002/diff/220001/ppapi/tests/power_saver_test_plugin.cc File ppapi/tests/power_saver_test_plugin.cc (right): https://codereview.chromium.org/1088763002/diff/220001/ppapi/tests/power_saver_test_plugin.cc#newcode20 ppapi/tests/power_saver_test_plugin.cc:20: // PostMessage. On 2015/04/20 01:05:32, raymes wrote: ...
5 years, 8 months ago (2015-04-20 18:04:01 UTC) #23
tommycli
thestig: ptal chrome/ phajdan.jr: ptal content/public/test thanks all
5 years, 8 months ago (2015-04-20 18:04:14 UTC) #24
Paweł Hajdan Jr.
https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode77 chrome/browser/plugins/plugin_power_saver_browsertest.cc:77: " setTimeout(checkEssential, 50);" Is there no way to wait ...
5 years, 8 months ago (2015-04-20 22:38:17 UTC) #25
tommycli
phajdan.jr: Thanks! https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode77 chrome/browser/plugins/plugin_power_saver_browsertest.cc:77: " setTimeout(checkEssential, 50);" On 2015/04/20 22:38:17, Paweł ...
5 years, 8 months ago (2015-04-20 23:25:30 UTC) #26
Lei Zhang
https://codereview.chromium.org/1088763002/diff/300001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/300001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode13 chrome/browser/plugins/plugin_power_saver_browsertest.cc:13: #include "content/public/test/ppapi_test_utils.h" not needed? https://codereview.chromium.org/1088763002/diff/300001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode14 chrome/browser/plugins/plugin_power_saver_browsertest.cc:14: #include "content/public/test/test_utils.h" ditto ...
5 years, 8 months ago (2015-04-21 01:28:14 UTC) #27
Paweł Hajdan Jr.
https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode77 chrome/browser/plugins/plugin_power_saver_browsertest.cc:77: " setTimeout(checkEssential, 50);" On 2015/04/20 23:25:30, tommycli wrote: > ...
5 years, 8 months ago (2015-04-21 15:54:49 UTC) #28
tommycli
On 2015/04/21 15:54:49, Paweł Hajdan Jr. wrote: > https://codereview.chromium.org/1088763002/diff/280001/chrome/browser/plugins/plugin_power_saver_browsertest.cc > File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): > > ...
5 years, 8 months ago (2015-04-21 16:35:07 UTC) #29
tommycli
thestig, phajdan.jr: Okay I was able to get rid of the polling and move to ...
5 years, 8 months ago (2015-04-22 18:17:46 UTC) #30
Lei Zhang
https://codereview.chromium.org/1088763002/diff/340001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/340001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode45 chrome/browser/plugins/plugin_power_saver_browsertest.cc:45: " window.domAutomationController.send(-1);" Aren't you trying to extract a bool? ...
5 years, 8 months ago (2015-04-22 23:35:20 UTC) #31
tommycli
thestig: thanks! https://codereview.chromium.org/1088763002/diff/340001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/340001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode45 chrome/browser/plugins/plugin_power_saver_browsertest.cc:45: " window.domAutomationController.send(-1);" On 2015/04/22 23:35:20, Lei Zhang ...
5 years, 8 months ago (2015-04-23 20:11:23 UTC) #32
Lei Zhang
https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode67 chrome/browser/plugins/plugin_power_saver_browsertest.cc:67: RESULT_PERIPHERAL, might be easier to write: var RESULT_PERIPHERAL = ...
5 years, 8 months ago (2015-04-23 22:38:03 UTC) #33
Paweł Hajdan Jr.
LGTM, thanks!
5 years, 8 months ago (2015-04-23 23:20:27 UTC) #34
tommycli
thestig: addressed your comments below. Thanks! https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode67 chrome/browser/plugins/plugin_power_saver_browsertest.cc:67: RESULT_PERIPHERAL, On 2015/04/23 ...
5 years, 8 months ago (2015-04-24 18:08:26 UTC) #35
Lei Zhang
https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode67 chrome/browser/plugins/plugin_power_saver_browsertest.cc:67: RESULT_PERIPHERAL, On 2015/04/24 18:08:26, tommycli wrote: > On 2015/04/23 ...
5 years, 8 months ago (2015-04-24 18:30:36 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1088763002/400001
5 years, 8 months ago (2015-04-24 18:36:59 UTC) #40
tommycli
On 2015/04/24 18:30:36, Lei Zhang wrote: > https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc > File chrome/browser/plugins/plugin_power_saver_browsertest.cc (right): > > https://codereview.chromium.org/1088763002/diff/380001/chrome/browser/plugins/plugin_power_saver_browsertest.cc#newcode67 ...
5 years, 8 months ago (2015-04-24 19:16:53 UTC) #41
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 8 months ago (2015-04-24 19:22:41 UTC) #43
Lei Zhang
lgtm
5 years, 8 months ago (2015-04-24 20:12:15 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1088763002/400001
5 years, 8 months ago (2015-04-24 20:25:49 UTC) #46
commit-bot: I haz the power
Committed patchset #19 (id:400001)
5 years, 8 months ago (2015-04-24 20:27:36 UTC) #47
commit-bot: I haz the power
5 years, 8 months ago (2015-04-24 20:28:19 UTC) #48
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/0dd13013ffb72091053f670e5c883acb65017422
Cr-Commit-Position: refs/heads/master@{#326867}

Powered by Google App Engine
This is Rietveld 408576698