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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class TestContentAutofillDriver : public ContentAutofillDriver { 48 class TestContentAutofillDriver : public ContentAutofillDriver {
49 public: 49 public:
50 TestContentAutofillDriver(content::WebContents* contents, 50 TestContentAutofillDriver(content::WebContents* contents,
51 AutofillClient* client) 51 AutofillClient* client)
52 : ContentAutofillDriver(contents, client, kAppLocale, kDownloadState) { 52 : ContentAutofillDriver(contents, client, kAppLocale, kDownloadState) {
53 scoped_ptr<AutofillManager> autofill_manager( 53 scoped_ptr<AutofillManager> autofill_manager(
54 new MockAutofillManager(this, client)); 54 new MockAutofillManager(this, client));
55 SetAutofillManager(autofill_manager.Pass()); 55 SetAutofillManager(autofill_manager.Pass());
56 } 56 }
57 virtual ~TestContentAutofillDriver() {} 57 ~TestContentAutofillDriver() override {}
58 58
59 virtual MockAutofillManager* mock_autofill_manager() { 59 virtual MockAutofillManager* mock_autofill_manager() {
60 return static_cast<MockAutofillManager*>(autofill_manager()); 60 return static_cast<MockAutofillManager*>(autofill_manager());
61 } 61 }
62 62
63 using ContentAutofillDriver::DidNavigateMainFrame; 63 using ContentAutofillDriver::DidNavigateMainFrame;
64 }; 64 };
65 65
66 class ContentAutofillDriverTest : public content::RenderViewHostTestHarness { 66 class ContentAutofillDriverTest : public content::RenderViewHostTestHarness {
67 public: 67 public:
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 base::string16 input_value(base::ASCIIToUTF16("barqux")); 314 base::string16 input_value(base::ASCIIToUTF16("barqux"));
315 base::string16 output_value; 315 base::string16 output_value;
316 driver_->RendererShouldPreviewFieldWithValue(input_value); 316 driver_->RendererShouldPreviewFieldWithValue(input_value);
317 EXPECT_TRUE(GetString16FromMessageWithID( 317 EXPECT_TRUE(GetString16FromMessageWithID(
318 AutofillMsg_PreviewFieldWithValue::ID, 318 AutofillMsg_PreviewFieldWithValue::ID,
319 &output_value)); 319 &output_value));
320 EXPECT_EQ(input_value, output_value); 320 EXPECT_EQ(input_value, output_value);
321 } 321 }
322 322
323 } // namespace autofill 323 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698