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

Side by Side Diff: components/autofill/content/browser/content_autofill_driver_unittest.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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 "components/autofill/content/browser/content_autofill_driver.h" 5 #include "components/autofill/content/browser/content_autofill_driver.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 class ContentAutofillDriverTest : public content::RenderViewHostTestHarness { 255 class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
256 public: 256 public:
257 void SetUp() override { 257 void SetUp() override {
258 content::RenderViewHostTestHarness::SetUp(); 258 content::RenderViewHostTestHarness::SetUp();
259 259
260 test_autofill_client_.reset(new TestAutofillClient()); 260 test_autofill_client_.reset(new TestAutofillClient());
261 driver_.reset(new TestContentAutofillDriver(web_contents()->GetMainFrame(), 261 driver_.reset(new TestContentAutofillDriver(web_contents()->GetMainFrame(),
262 test_autofill_client_.get())); 262 test_autofill_client_.get()));
263 263
264 shell::InterfaceProvider* remote_interfaces = 264 service_manager::InterfaceProvider* remote_interfaces =
265 web_contents()->GetMainFrame()->GetRemoteInterfaces(); 265 web_contents()->GetMainFrame()->GetRemoteInterfaces();
266 shell::InterfaceProvider::TestApi test_api(remote_interfaces); 266 service_manager::InterfaceProvider::TestApi test_api(remote_interfaces);
267 test_api.SetBinderForName(mojom::AutofillAgent::Name_, 267 test_api.SetBinderForName(mojom::AutofillAgent::Name_,
268 base::Bind(&FakeAutofillAgent::BindRequest, 268 base::Bind(&FakeAutofillAgent::BindRequest,
269 base::Unretained(&fake_agent_))); 269 base::Unretained(&fake_agent_)));
270 } 270 }
271 271
272 void TearDown() override { 272 void TearDown() override {
273 // Reset the driver now to cause all pref observers to be removed and avoid 273 // Reset the driver now to cause all pref observers to be removed and avoid
274 // crashes that otherwise occur in the destructor. 274 // crashes that otherwise occur in the destructor.
275 driver_.reset(); 275 driver_.reset();
276 content::RenderViewHostTestHarness::TearDown(); 276 content::RenderViewHostTestHarness::TearDown();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 base::RunLoop run_loop; 441 base::RunLoop run_loop;
442 fake_agent_.SetQuitLoopClosure(run_loop.QuitClosure()); 442 fake_agent_.SetQuitLoopClosure(run_loop.QuitClosure());
443 driver_->RendererShouldPreviewFieldWithValue(input_value); 443 driver_->RendererShouldPreviewFieldWithValue(input_value);
444 run_loop.RunUntilIdle(); 444 run_loop.RunUntilIdle();
445 445
446 EXPECT_TRUE(fake_agent_.GetString16PreviewFieldWithValue(&output_value)); 446 EXPECT_TRUE(fake_agent_.GetString16PreviewFieldWithValue(&output_value));
447 EXPECT_EQ(input_value, output_value); 447 EXPECT_EQ(input_value, output_value);
448 } 448 }
449 449
450 } // namespace autofill 450 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698