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

Side by Side Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 2847313002: Update some host_resolver()->AddRules in chrome/browser. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/test/oobe_base_test.h" 5 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); 75 ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
76 76
77 // Start https wrapper here so that the URLs can be pointed at it in 77 // Start https wrapper here so that the URLs can be pointed at it in
78 // SetUpCommandLine(). 78 // SetUpCommandLine().
79 InitHttpsForwarders(); 79 InitHttpsForwarders();
80 80
81 ExtensionApiTest::SetUp(); 81 ExtensionApiTest::SetUp();
82 } 82 }
83 83
84 void OobeBaseTest::SetUpInProcessBrowserTestFixture() { 84 void OobeBaseTest::SetUpInProcessBrowserTestFixture() {
85 host_resolver()->AddRule("*", "127.0.0.1");
86 network_portal_detector_ = new NetworkPortalDetectorTestImpl(); 85 network_portal_detector_ = new NetworkPortalDetectorTestImpl();
87 network_portal_detector::InitializeForTesting(network_portal_detector_); 86 network_portal_detector::InitializeForTesting(network_portal_detector_);
88 network_portal_detector_->SetDefaultNetworkForTesting( 87 network_portal_detector_->SetDefaultNetworkForTesting(
89 FakeShillManagerClient::kFakeEthernetNetworkGuid); 88 FakeShillManagerClient::kFakeEthernetNetworkGuid);
90 89
91 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 90 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
92 } 91 }
93 92
94 void OobeBaseTest::SetUpOnMainThread() { 93 void OobeBaseTest::SetUpOnMainThread() {
95 if (initialize_fake_merge_session()) { 94 if (initialize_fake_merge_session()) {
96 fake_gaia_->SetFakeMergeSessionParams(kFakeUserEmail, kFakeSIDCookie, 95 fake_gaia_->SetFakeMergeSessionParams(kFakeUserEmail, kFakeSIDCookie,
97 kFakeLSIDCookie); 96 kFakeLSIDCookie);
98 } 97 }
99 98
100 // Start the accept thread as the sandbox host process has already been 99 // Start the accept thread as the sandbox host process has already been
101 // spawned. 100 // spawned.
101 host_resolver()->AddRule("*", "127.0.0.1");
102 embedded_test_server()->StartAcceptingConnections(); 102 embedded_test_server()->StartAcceptingConnections();
103 103
104 login_screen_load_observer_.reset(new content::WindowedNotificationObserver( 104 login_screen_load_observer_.reset(new content::WindowedNotificationObserver(
105 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, 105 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
106 content::NotificationService::AllSources())); 106 content::NotificationService::AllSources()));
107 107
108 js_checker_.set_web_contents( 108 js_checker_.set_web_contents(
109 LoginDisplayHost::default_host()->GetWebUILoginView()->GetWebContents()); 109 LoginDisplayHost::default_host()->GetWebUILoginView()->GetWebContents());
110 110
111 test::UserSessionManagerTestApi session_manager_test_api( 111 test::UserSessionManagerTestApi session_manager_test_api(
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 "document.getElementById('$FieldId').value = '$FieldValue';" 272 "document.getElementById('$FieldId').value = '$FieldValue';"
273 "var e = new Event('input');" 273 "var e = new Event('input');"
274 "document.getElementById('$FieldId').dispatchEvent(e);" 274 "document.getElementById('$FieldId').dispatchEvent(e);"
275 "})();"; 275 "})();";
276 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id); 276 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldId", field_id);
277 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value); 277 base::ReplaceSubstringsAfterOffset(&js, 0, "$FieldValue", field_value);
278 ExecuteJsInSigninFrame(js); 278 ExecuteJsInSigninFrame(js);
279 } 279 }
280 280
281 } // namespace chromeos 281 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_manager_test.cc ('k') | chrome/browser/content_settings/content_settings_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698