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

Side by Side Diff: chrome/browser/ui/webui/options/preferences_browsertest.cc

Issue 10956034: Switching from ForXyz naming to FromXyz naming, for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" 5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // Navigates to the settings page, causing the JavaScript pref handling code to 71 // Navigates to the settings page, causing the JavaScript pref handling code to
72 // load and injects JavaScript testing code. 72 // load and injects JavaScript testing code.
73 void PreferencesBrowserTest::SetUpOnMainThread() { 73 void PreferencesBrowserTest::SetUpOnMainThread() {
74 ui_test_utils::NavigateToURL(browser(), 74 ui_test_utils::NavigateToURL(browser(),
75 GURL(chrome::kChromeUISettingsFrameURL)); 75 GURL(chrome::kChromeUISettingsFrameURL));
76 content::WebContents* web_contents = chrome::GetActiveWebContents(browser()); 76 content::WebContents* web_contents = chrome::GetActiveWebContents(browser());
77 ASSERT_TRUE(web_contents); 77 ASSERT_TRUE(web_contents);
78 render_view_host_ = web_contents->GetRenderViewHost(); 78 render_view_host_ = web_contents->GetRenderViewHost();
79 ASSERT_TRUE(render_view_host_); 79 ASSERT_TRUE(render_view_host_);
80 pref_change_registrar_.Init( 80 pref_change_registrar_.Init(
81 PrefServiceBase::ForContext(browser()->profile())); 81 PrefServiceBase::FromBrowserContext(browser()->profile()));
82 pref_service_ = browser()->profile()->GetPrefs(); 82 pref_service_ = browser()->profile()->GetPrefs();
83 ASSERT_TRUE(content::ExecuteJavaScript(render_view_host_, L"", 83 ASSERT_TRUE(content::ExecuteJavaScript(render_view_host_, L"",
84 L"function TestEnv() {" 84 L"function TestEnv() {"
85 L" this.sentinelName_ = 'profile.exited_cleanly';" 85 L" this.sentinelName_ = 'profile.exited_cleanly';"
86 L" this.prefs_ = [];" 86 L" this.prefs_ = [];"
87 L" TestEnv.instance_ = this;" 87 L" TestEnv.instance_ = this;"
88 L"}" 88 L"}"
89 L"" 89 L""
90 L"TestEnv.handleEvent = function(event) {" 90 L"TestEnv.handleEvent = function(event) {"
91 L" var env = TestEnv.instance_;" 91 L" var env = TestEnv.instance_;"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 // Do not set the Boolean pref. It will toogle automatically. 739 // Do not set the Boolean pref. It will toogle automatically.
740 for (size_t i = 1; i < pref_names_.size(); ++i) 740 for (size_t i = 1; i < pref_names_.size(); ++i)
741 chromeos::proxy_cros_settings_parser::SetProxyPrefValue( 741 chromeos::proxy_cros_settings_parser::SetProxyPrefValue(
742 profile, pref_names_[i], non_default_values_[i]->DeepCopy()); 742 profile, pref_names_[i], non_default_values_[i]->DeepCopy());
743 SetupJavaScriptTestEnvironment(pref_names_, &observed_json); 743 SetupJavaScriptTestEnvironment(pref_names_, &observed_json);
744 VerifyObservedPrefs(observed_json, pref_names_, non_default_values_, 744 VerifyObservedPrefs(observed_json, pref_names_, non_default_values_,
745 "", false, false); 745 "", false, false);
746 } 746 }
747 747
748 #endif 748 #endif
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/webdata/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698