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

Issue 11882033: Telemetry support for extensions. (Closed)

Created:
7 years, 11 months ago by achuithb
Modified:
7 years, 10 months ago
Reviewers:
dtu, nduca
CC:
chromium-reviews, chrome-speed-team+watch_google.com, Aaron Boodman, pam+watch_chromium.org, chromium-apps-reviews_chromium.org, telemetry+watch_chromium.org, ilja, zel, krisr
Visibility:
Public.

Description

Telemetry support for extensions. * Browser has new properties supports_extensions and extensions (of type ExtensionDict) * BrowserBackend ctor takes additional arg supports_extensions. * BrowserBackend has new properties supports_extensions and extension_dict_backend (of type ExtensionDictBackend) * BrowserBackend._WaitForBrowserToComeUp waits for all extensions to load and be interactive. * BrowserBackend.ExtensionsNotSupportedException is raised for android browser and content shell. * Add class ExtensionToLoad which is a wrapper for an extension_path. * Add extension_to_load (of type ExtensionToLoad) to BrowserOptions. * Add SupportsOptions to PossibleBrowser, to test extensions support. Returns False for android and content_shell when BrowserOptions.extensions_to_load is not empty * Add ExtensionPage which derives from WebContents * Add ExtensionDictBackend which is a dictionary of ExtensionPage instances with extension ids as keys. * Add ExtensionDict which passes through to ExtensionDictBackend, except it uses ExtensionToLoad instances as keys. * Import crx_id for determining extension id from extension path. * Simple extension manifest.json and background.js for unit tests. * Unit tests for single and multiple extensions. BUG=169954 TEST=browser test. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=182316

Patch Set 1 #

Total comments: 16

Patch Set 2 : rebase #

Patch Set 3 : #

Patch Set 4 : fix conflict #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 6

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : revert context_list #

Patch Set 12 : rebase #

Patch Set 13 : remove unused #

Patch Set 14 : refactor #

Patch Set 15 : crx_id #

Total comments: 15

Patch Set 16 : extension_list_backend #

Patch Set 17 : options #

Patch Set 18 : options #

Patch Set 19 : unittests #

Patch Set 20 : #

Patch Set 21 : content shell support #

Patch Set 22 : wait for document ready state #

Total comments: 24

Patch Set 23 : dtu review #

Total comments: 4

Patch Set 24 : dtu review 2 #

Patch Set 25 : rebase #

Patch Set 26 : rebase #

Total comments: 37

Patch Set 27 : rebase #

Patch Set 28 : Nat feedback #

Patch Set 29 : missed a file #

Patch Set 30 : re-add supports_extensions to PossibleBrowser #

Patch Set 31 : missed another file #

Total comments: 2

Patch Set 32 : remove supports_extensions from PossibleBrowser #

Total comments: 20

Patch Set 33 : rebase #

Patch Set 34 : Nat feedback #

Patch Set 35 : comments #

Patch Set 36 : comments #

Total comments: 18

Patch Set 37 : rebase #

Patch Set 38 : Nat feedback #

Patch Set 39 : Fix comments, get rid of GetExtensionByPath #

Total comments: 8

Patch Set 40 : remove WaitForDocumentToBeInteractiveOrBetter #

Patch Set 41 : remove bogus """ #

Patch Set 42 : dtu feedback #

Patch Set 43 : minor #

Patch Set 44 : more minor #

Total comments: 1

Patch Set 45 : suppress pylint #

Patch Set 46 : test Disconnect #

Total comments: 2

Patch Set 47 : revert Disconnect test #

Patch Set 48 : copyright #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -21 lines) Patch
M tools/telemetry/telemetry/android_browser_backend.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 1 chunk +8 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/android_browser_finder.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 2 chunks +6 lines, -2 lines 0 comments Download
M tools/telemetry/telemetry/browser.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 4 chunks +21 lines, -4 lines 0 comments Download
M tools/telemetry/telemetry/browser_backend.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 6 chunks +36 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/browser_finder.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 1 chunk +1 line, -1 line 0 comments Download
M tools/telemetry/telemetry/browser_options.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 1 chunk +1 line, -0 lines 0 comments Download
M tools/telemetry/telemetry/cros_browser_backend.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 1 chunk +3 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/cros_browser_finder.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 3 chunks +6 lines, -4 lines 0 comments Download
A tools/telemetry/telemetry/crx_id.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +16 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/desktop_browser_backend.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 2 chunks +7 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/desktop_browser_finder.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 2 chunks +6 lines, -2 lines 0 comments Download
A tools/telemetry/telemetry/extension_dict.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +26 lines, -0 lines 0 comments Download
A tools/telemetry/telemetry/extension_dict_backend.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1 chunk +81 lines, -0 lines 0 comments Download
A tools/telemetry/telemetry/extension_page.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 chunk +12 lines, -0 lines 0 comments Download
A tools/telemetry/telemetry/extension_to_load.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 1 chunk +15 lines, -0 lines 0 comments Download
A tools/telemetry/telemetry/extension_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 1 chunk +74 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/possible_browser.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 1 chunk +4 lines, -0 lines 0 comments Download
A tools/telemetry/unittest_data/simple_extension/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +8 lines, -0 lines 0 comments Download
A tools/telemetry/unittest_data/simple_extension/manifest.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (0 generated)
achuithb
Still working on making sense of it all. Please let me know if a further ...
7 years, 11 months ago (2013-01-15 00:53:50 UTC) #1
nduca
So glad to see you picking this up. Thank you, and good job picking this ...
7 years, 11 months ago (2013-01-15 05:31:05 UTC) #2
achuithb
7 years, 11 months ago (2013-01-19 01:19:57 UTC) #3
nduca
This looks really good. We're still missing the logic to figure out extension ids up ...
7 years, 11 months ago (2013-01-22 23:00:01 UTC) #4
achuithb
On 2013/01/22 23:00:01, nduca wrote: > This looks really good. We're still missing the logic ...
7 years, 11 months ago (2013-01-22 23:08:58 UTC) #5
nduca
Please talk to zel, who can set you up with folks from the extensions team ...
7 years, 11 months ago (2013-01-22 23:13:59 UTC) #6
nduca
(also, take a peek at tools/crx_id maybe its helpful?!)
7 years, 11 months ago (2013-01-22 23:14:24 UTC) #7
dtu
The only thing they have in common is that they're inspectable, so inspectable_element? tabstension works ...
7 years, 11 months ago (2013-01-23 00:55:17 UTC) #8
nduca
I think we should leave tab_list alone, and see if we can winnow down the ...
7 years, 11 months ago (2013-01-23 01:01:28 UTC) #9
achuithb
https://codereview.chromium.org/11882033/diff/12002/tools/telemetry/telemetry/browser.py File tools/telemetry/telemetry/browser.py (right): https://codereview.chromium.org/11882033/diff/12002/tools/telemetry/telemetry/browser.py#newcode31 tools/telemetry/telemetry/browser.py:31: if not browser_backend.is_content_shell: On 2013/01/22 23:00:01, nduca wrote: > ...
7 years, 11 months ago (2013-01-23 01:20:21 UTC) #10
achuithb
On 2013/01/23 01:01:28, nduca wrote: > I think we should leave tab_list alone, and see ...
7 years, 11 months ago (2013-01-23 01:25:49 UTC) #11
achuithb
I've gone ahead and copied all the contents of tab_contents_backend.py instead of sub-classing. Nat: PTAL
7 years, 11 months ago (2013-01-23 21:01:31 UTC) #12
dtu
On 2013/01/23 21:01:31, achuith.bhandarkar wrote: > I've gone ahead and copied all the contents of ...
7 years, 11 months ago (2013-01-23 22:34:56 UTC) #13
nduca
Did you find a solution for getting the extension id?
7 years, 11 months ago (2013-01-23 23:20:53 UTC) #14
achuithb
On 2013/01/23 23:20:53, nduca wrote: > Did you find a solution for getting the extension ...
7 years, 11 months ago (2013-01-23 23:26:06 UTC) #15
achuithb
On 2013/01/23 22:34:56, Dave Tu wrote: > On 2013/01/23 21:01:31, achuith.bhandarkar wrote: > > I've ...
7 years, 11 months ago (2013-01-23 23:26:36 UTC) #16
nduca
it should be possible for someone to say "load this extension from this folder" without ...
7 years, 11 months ago (2013-01-24 00:02:12 UTC) #17
achuithb
So crx_id does the job! PTAL, Nat and Dave! https://codereview.chromium.org/11882033/diff/29002/tools/telemetry/telemetry/extension_list.py File tools/telemetry/telemetry/extension_list.py (right): https://codereview.chromium.org/11882033/diff/29002/tools/telemetry/telemetry/extension_list.py#newcode19 tools/telemetry/telemetry/extension_list.py:19: ...
7 years, 11 months ago (2013-01-25 00:53:54 UTC) #18
nduca
Did some of the backend changes disappear from this patch?
7 years, 11 months ago (2013-01-25 19:52:29 UTC) #19
nduca
https://codereview.chromium.org/11882033/diff/29002/tools/telemetry/telemetry/browser.py File tools/telemetry/telemetry/browser.py (right): https://codereview.chromium.org/11882033/diff/29002/tools/telemetry/telemetry/browser.py#newcode62 tools/telemetry/telemetry/browser.py:62: Thinking out loud: do we need a supports_extensions field ...
7 years, 11 months ago (2013-01-25 20:01:52 UTC) #20
achuithb
On 2013/01/25 19:52:29, nduca wrote: > Did some of the backend changes disappear from this ...
7 years, 11 months ago (2013-01-26 01:28:59 UTC) #21
nduca
Where did the browser_options changes go?
7 years, 11 months ago (2013-01-26 01:36:01 UTC) #22
achuithb
So since the last review: * Fixed the crx_id import. * Added the supports_extensions field ...
7 years, 10 months ago (2013-01-29 21:15:55 UTC) #23
dtu
Here's what I think it should look like. Nat, feel free to disagree. For Tab ...
7 years, 10 months ago (2013-01-30 00:01:48 UTC) #24
achuithb
My apologies for the rebase + fixes :( PTAL, Dave and Nat. https://codereview.chromium.org/11882033/diff/33005/tools/telemetry/telemetry/extension_list.py File tools/telemetry/telemetry/extension_list.py ...
7 years, 10 months ago (2013-01-30 10:01:56 UTC) #25
achuithb
On 2013/01/30 00:01:48, Dave Tu wrote: > Here's what I think it should look like. ...
7 years, 10 months ago (2013-01-30 10:03:06 UTC) #26
dtu
This looks very close to me. nduca, did you want to give this an okay, ...
7 years, 10 months ago (2013-01-31 01:37:37 UTC) #27
achuithb
* Renamed _UpdateExtensionIdList to _GetExtensionIds - it now returns a list. * Got rid of ...
7 years, 10 months ago (2013-01-31 02:49:49 UTC) #28
achuithb
ping?
7 years, 10 months ago (2013-01-31 20:22:11 UTC) #29
nduca
dtu can you give exhaustive review?
7 years, 10 months ago (2013-01-31 21:23:38 UTC) #30
nduca
I think we're getting close. Still some issues but not too horrifying. I'd like a ...
7 years, 10 months ago (2013-02-01 00:25:50 UTC) #31
nduca
Hey, can you do one thing for me? Remove the is_component field from this patch ...
7 years, 10 months ago (2013-02-01 23:16:42 UTC) #32
achuithb
Nat, please take a look. I've also gotten rid of component extension support. https://codereview.chromium.org/11882033/diff/57001/tools/telemetry/telemetry/android_browser_backend.py File ...
7 years, 10 months ago (2013-02-06 00:23:03 UTC) #33
achuithb
Added PossibleBrowser.SupportsOptions as discussed over chat with Nat; got rid of PossibleBrowser.supports_extensions. PTAL, Nat and ...
7 years, 10 months ago (2013-02-07 01:30:45 UTC) #34
nduca
>> why 5? > You do see certain failures with 5 that you don't see ...
7 years, 10 months ago (2013-02-07 02:08:33 UTC) #35
nduca
pretty good. Still not there. I'd be open to you breaking out some of the ...
7 years, 10 months ago (2013-02-07 02:21:53 UTC) #36
achuithb
https://codereview.chromium.org/11882033/diff/81002/tools/telemetry/telemetry/browser_finder.py File tools/telemetry/telemetry/browser_finder.py (right): https://codereview.chromium.org/11882033/diff/81002/tools/telemetry/telemetry/browser_finder.py#newcode57 tools/telemetry/telemetry/browser_finder.py:57: (len(options.extensions_to_load) == 0 or b.supports_extensions)] On 2013/02/07 02:21:54, nduca ...
7 years, 10 months ago (2013-02-08 09:51:52 UTC) #37
achuithb
On 2013/02/07 02:08:33, nduca wrote: > >> why 5? > > You do see certain ...
7 years, 10 months ago (2013-02-08 09:53:12 UTC) #38
achuithb
On 2013/02/07 02:21:53, nduca wrote: > pretty good. Still not there. I'd be open to ...
7 years, 10 months ago (2013-02-08 10:04:08 UTC) #39
achuithb
PTAL, Nat and Dave.
7 years, 10 months ago (2013-02-08 10:04:24 UTC) #40
nduca
https://codereview.chromium.org/11882033/diff/80007/tools/telemetry/telemetry/extension_dict.py File tools/telemetry/telemetry/extension_dict.py (right): https://codereview.chromium.org/11882033/diff/80007/tools/telemetry/telemetry/extension_dict.py#newcode11 tools/telemetry/telemetry/extension_dict.py:11: def __iter__(self): dont add this yet. https://codereview.chromium.org/11882033/diff/80007/tools/telemetry/telemetry/extension_dict.py#newcode15 tools/telemetry/telemetry/extension_dict.py:15: def ...
7 years, 10 months ago (2013-02-12 20:12:33 UTC) #41
nduca
https://codereview.chromium.org/11882033/diff/80007/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/80007/tools/telemetry/telemetry/extension_unittest.py#newcode24 tools/telemetry/telemetry/extension_unittest.py:24: if browser_to_create: # comment explaining why you return if ...
7 years, 10 months ago (2013-02-12 20:18:16 UTC) #42
achuithb
Apologies for the botched rebase. The only files that have changed are extension_dict.py extension_dict_backend.py, extensions_to_load.py ...
7 years, 10 months ago (2013-02-12 22:42:54 UTC) #43
nduca
lgtm but please ensure the tests actually run, and pass. https://codereview.chromium.org/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py#newcode29 ...
7 years, 10 months ago (2013-02-12 23:34:05 UTC) #44
achuithb
Thanks for the review! https://codereview.chromium.org/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py#newcode29 tools/telemetry/telemetry/extension_unittest.py:29: # doesn't wait for extensions ...
7 years, 10 months ago (2013-02-12 23:36:29 UTC) #45
dtu
https://chromiumcodereview.appspot.com/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://chromiumcodereview.appspot.com/11882033/diff/83011/tools/telemetry/telemetry/extension_unittest.py#newcode33 tools/telemetry/telemetry/extension_unittest.py:33: extension.WaitForDocumentReadyStateToBeInteractiveOrBetter() On 2013/02/12 23:36:29, achuith.bhandarkar wrote: > On 2013/02/12 ...
7 years, 10 months ago (2013-02-13 00:11:22 UTC) #46
achuithb
You can diff against patchset 41 to see AllExtensionsLoaded moved to BrowserBackend._WaitForBrowserToComeUp. This resolves the ...
7 years, 10 months ago (2013-02-13 09:10:21 UTC) #47
nduca
lgtm nice work :)
7 years, 10 months ago (2013-02-13 09:16:15 UTC) #48
achuithb
On 2013/02/13 09:16:15, nduca wrote: > lgtm nice work :) Thank you! Going to wait ...
7 years, 10 months ago (2013-02-13 09:50:19 UTC) #49
achuithb
https://codereview.chromium.org/11882033/diff/92004/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/92004/tools/telemetry/telemetry/extension_unittest.py#newcode36 tools/telemetry/telemetry/extension_unittest.py:36: self._extension_dirs = [tempfile.mkdtemp() for i in range(3)] I get ...
7 years, 10 months ago (2013-02-13 10:13:51 UTC) #50
nduca
you can # pylint: disable=errno there're examples int he code for this
7 years, 10 months ago (2013-02-13 10:20:40 UTC) #51
achuithb
On 2013/02/13 10:20:40, nduca wrote: > you can # pylint: disable=errno > > there're examples ...
7 years, 10 months ago (2013-02-13 10:29:19 UTC) #52
achuithb
Added the test for Disconnect as discussed elsewhere.
7 years, 10 months ago (2013-02-13 10:49:39 UTC) #53
nduca
https://codereview.chromium.org/11882033/diff/96004/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/96004/tools/telemetry/telemetry/extension_unittest.py#newcode32 tools/telemetry/telemetry/extension_unittest.py:32: extension.Disconnect() Nooo, this is a separate test. you have ...
7 years, 10 months ago (2013-02-13 10:55:48 UTC) #54
achuithb
https://codereview.chromium.org/11882033/diff/96004/tools/telemetry/telemetry/extension_unittest.py File tools/telemetry/telemetry/extension_unittest.py (right): https://codereview.chromium.org/11882033/diff/96004/tools/telemetry/telemetry/extension_unittest.py#newcode32 tools/telemetry/telemetry/extension_unittest.py:32: extension.Disconnect() On 2013/02/13 10:55:48, nduca wrote: > Nooo, this ...
7 years, 10 months ago (2013-02-13 11:13:48 UTC) #55
dtu
7 years, 10 months ago (2013-02-13 19:38:25 UTC) #56
lgtm

Powered by Google App Engine
This is Rietveld 408576698