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

Issue 6737035: Proxy settings automation hooks and related proxy settings fixes. (Closed)

Created:
9 years, 8 months ago by dtu
Modified:
9 years, 7 months ago
Reviewers:
xiyuan, stanleyw, Nirnimesh
CC:
chromium-reviews, krisr
Visibility:
Public.

Description

Adds two Python/PyAuto functions, GetProxySettings() and SetProxySetting(), that allow tests to read and manipulate Chrome OS proxy settings. Fixes issue with proxy settings where they reset when changing only the port of a proxy without changing the URL. This happens when using the automation hooks because they create a new ProxyCrosSettingsProvider with each invocation. This is done by removing the caching behavior of ProxyCrosSettingsProvider. Modifies the type of the "Port" textboxes in the Proxy Settings UI to Integer so that ProxyCrosSettingsProvider uses a consistent type for both Get() and Set(). BUG=chromium-os:13650, chromium-os:12727 TEST=Manual. Test included for GetProxySettings() that will run in the Autotest lab. stanleyw will add additional tests that use SetProxySetting(). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80537

Patch Set 1 : Initial commit. #

Total comments: 23

Patch Set 2 : Changes per comments. #

Patch Set 3 : Fix Value* ownership from Get(). #

Patch Set 4 : Remove cache_ and related function. #

Total comments: 12

Patch Set 5 : Other nits. #

Total comments: 1

Patch Set 6 : Add "OnChromeOS" to Python function names. #

Patch Set 7 : Fix outdated header. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+260 lines, -93 lines) Patch
M chrome/browser/automation/testing_automation_provider.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider_chromeos.cc View 1 2 3 4 3 chunks +61 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/cros_settings_provider.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/proxy_cros_settings_provider.h View 1 2 3 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/proxy_cros_settings_provider.cc View 1 2 3 6 chunks +52 lines, -71 lines 0 comments Download
M chrome/browser/resources/options/chromeos/proxy.html View 1 2 3 4 5 6 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/options/pref_ui.js View 1 2 chunks +19 lines, -1 line 0 comments Download
M chrome/test/functional/chromeos_wifi.py View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/test/pyautolib/pyauto.py View 1 2 3 4 5 2 chunks +99 lines, -6 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
dtu
+nirnimesh for Python and C++ +xiyuan for C++ +dhg for HTML and JS PTAL
9 years, 8 months ago (2011-04-04 21:03:36 UTC) #1
dtu
Apparently dhg isn't around anymore. xiyuan, can you also take a look at the HTML/JS?
9 years, 8 months ago (2011-04-04 21:10:34 UTC) #2
xiyuan
On 2011/04/04 21:10:34, Dave Tu wrote: > Apparently dhg isn't around anymore. xiyuan, can you ...
9 years, 8 months ago (2011-04-04 21:10:57 UTC) #3
xiyuan
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc File chrome/browser/chromeos/proxy_cros_settings_provider.cc (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc#newcode61 chrome/browser/chromeos/proxy_cros_settings_provider.cc:61: val, config.single_proxy, net::ProxyServer::SCHEME_HTTP)); You need AppendPortIfValid to get cached ...
9 years, 8 months ago (2011-04-04 21:24:20 UTC) #4
Nirnimesh
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider.h File chrome/browser/automation/testing_automation_provider.h (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider.h#newcode1039 chrome/browser/automation/testing_automation_provider.h:1039: void SetProxySetting(DictionaryValue* args, IPC::Message* reply_message); append 's' to the ...
9 years, 8 months ago (2011-04-04 21:38:27 UTC) #5
stanleyw
http://codereview.chromium.org/6737035/diff/10011/chrome/test/pyautolib/pyauto.py File chrome/test/pyautolib/pyauto.py (right): http://codereview.chromium.org/6737035/diff/10011/chrome/test/pyautolib/pyauto.py#newcode2522 chrome/test/pyautolib/pyauto.py:2522: u'single': False, For error throwing, type as a string ...
9 years, 8 months ago (2011-04-04 22:13:27 UTC) #6
dtu
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider.h File chrome/browser/automation/testing_automation_provider.h (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider.h#newcode1039 chrome/browser/automation/testing_automation_provider.h:1039: void SetProxySetting(DictionaryValue* args, IPC::Message* reply_message); On 2011/04/04 21:38:27, Nirnimesh ...
9 years, 8 months ago (2011-04-04 22:48:56 UTC) #7
stanleyw
.py code LGTM
9 years, 8 months ago (2011-04-04 23:30:47 UTC) #8
xiyuan
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode48 chrome/browser/automation/testing_automation_provider_chromeos.cc:48: delete setting_dict; On 2011/04/04 22:48:57, Dave Tu wrote: > ...
9 years, 8 months ago (2011-04-04 23:31:18 UTC) #9
dtu
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode48 chrome/browser/automation/testing_automation_provider_chromeos.cc:48: delete setting_dict; On 2011/04/04 23:31:18, xiyuan wrote: > On ...
9 years, 8 months ago (2011-04-05 00:04:11 UTC) #10
xiyuan
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc File chrome/browser/chromeos/proxy_cros_settings_provider.cc (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc#newcode61 chrome/browser/chromeos/proxy_cros_settings_provider.cc:61: val, config.single_proxy, net::ProxyServer::SCHEME_HTTP)); On 2011/04/05 00:04:11, Dave Tu wrote: ...
9 years, 8 months ago (2011-04-05 16:32:49 UTC) #11
dtu
http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc File chrome/browser/chromeos/proxy_cros_settings_provider.cc (right): http://codereview.chromium.org/6737035/diff/10011/chrome/browser/chromeos/proxy_cros_settings_provider.cc#newcode61 chrome/browser/chromeos/proxy_cros_settings_provider.cc:61: val, config.single_proxy, net::ProxyServer::SCHEME_HTTP)); On 2011/04/05 16:32:49, xiyuan wrote: > ...
9 years, 8 months ago (2011-04-05 18:48:48 UTC) #12
xiyuan
LGTM Thanks for making all the changes. :)
9 years, 8 months ago (2011-04-05 18:50:01 UTC) #13
Nirnimesh
http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode48 chrome/browser/automation/testing_automation_provider_chromeos.cc:48: delete setting_dict; delete setting, not setting dict, since that's ...
9 years, 8 months ago (2011-04-05 19:27:53 UTC) #14
xiyuan
http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode322 chrome/browser/automation/testing_automation_provider_chromeos.cc:322: chromeos::ProxyCrosSettingsProvider().Set(setting_path, value->DeepCopy()); On 2011/04/05 19:27:53, Nirnimesh wrote: > who ...
9 years, 8 months ago (2011-04-05 19:44:32 UTC) #15
Nirnimesh
http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode322 chrome/browser/automation/testing_automation_provider_chromeos.cc:322: chromeos::ProxyCrosSettingsProvider().Set(setting_path, value->DeepCopy()); On 2011/04/05 19:44:32, xiyuan wrote: > On ...
9 years, 8 months ago (2011-04-05 19:49:13 UTC) #16
dtu
http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc File chrome/browser/automation/testing_automation_provider_chromeos.cc (right): http://codereview.chromium.org/6737035/diff/7007/chrome/browser/automation/testing_automation_provider_chromeos.cc#newcode48 chrome/browser/automation/testing_automation_provider_chromeos.cc:48: delete setting_dict; On 2011/04/05 19:27:53, Nirnimesh wrote: > delete ...
9 years, 8 months ago (2011-04-05 21:29:10 UTC) #17
Nirnimesh
9 years, 8 months ago (2011-04-05 21:39:11 UTC) #18
LGTM, with one minor comment.

http://codereview.chromium.org/6737035/diff/9010/chrome/test/pyautolib/pyauto.py
File chrome/test/pyautolib/pyauto.py (right):

http://codereview.chromium.org/6737035/diff/9010/chrome/test/pyautolib/pyauto...
chrome/test/pyautolib/pyauto.py:2519: def GetProxySettings(self):
To reduce the confusion, please add 'OnChromeos' in these function names. These
functions won't work for the desktops right?

Powered by Google App Engine
This is Rietveld 408576698