| OLD | NEW |
| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 DISALLOW_COPY_AND_ASSIGN(NavEntryCommittedObserver); | 273 DISALLOW_COPY_AND_ASSIGN(NavEntryCommittedObserver); |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 } // namespace | 276 } // namespace |
| 277 | 277 |
| 278 class AutofillDialogControllerTest : public InProcessBrowserTest { | 278 class AutofillDialogControllerTest : public InProcessBrowserTest { |
| 279 public: | 279 public: |
| 280 AutofillDialogControllerTest() : controller_(NULL) {} | 280 AutofillDialogControllerTest() : controller_(NULL) {} |
| 281 virtual ~AutofillDialogControllerTest() {} | 281 virtual ~AutofillDialogControllerTest() {} |
| 282 | 282 |
| 283 virtual void SetUpCommandLine(CommandLine* command_line) override { | 283 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 284 command_line->AppendSwitch(::switches::kReduceSecurityForTesting); | 284 command_line->AppendSwitch(::switches::kReduceSecurityForTesting); |
| 285 } | 285 } |
| 286 | 286 |
| 287 virtual void SetUpOnMainThread() override { | 287 virtual void SetUpOnMainThread() override { |
| 288 autofill::test::DisableSystemServices(browser()->profile()->GetPrefs()); | 288 autofill::test::DisableSystemServices(browser()->profile()->GetPrefs()); |
| 289 InitializeController(); | 289 InitializeController(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 protected: | 292 protected: |
| 293 bool SectionHasField(DialogSection section, ServerFieldType type) { | 293 bool SectionHasField(DialogSection section, ServerFieldType type) { |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 EXPECT_TRUE(RunTestPage(http_server)); | 1467 EXPECT_TRUE(RunTestPage(http_server)); |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 // Like the parent test, but doesn't add the --reduce-security-for-testing flag. | 1470 // Like the parent test, but doesn't add the --reduce-security-for-testing flag. |
| 1471 class AutofillDialogControllerSecurityTest : | 1471 class AutofillDialogControllerSecurityTest : |
| 1472 public AutofillDialogControllerTest { | 1472 public AutofillDialogControllerTest { |
| 1473 public: | 1473 public: |
| 1474 AutofillDialogControllerSecurityTest() {} | 1474 AutofillDialogControllerSecurityTest() {} |
| 1475 ~AutofillDialogControllerSecurityTest() override {} | 1475 ~AutofillDialogControllerSecurityTest() override {} |
| 1476 | 1476 |
| 1477 void SetUpCommandLine(CommandLine* command_line) override { | 1477 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 1478 CHECK(!command_line->HasSwitch(::switches::kReduceSecurityForTesting)); | 1478 CHECK(!command_line->HasSwitch(::switches::kReduceSecurityForTesting)); |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 typedef net::BaseTestServer::SSLOptions SSLOptions; | 1481 typedef net::BaseTestServer::SSLOptions SSLOptions; |
| 1482 | 1482 |
| 1483 private: | 1483 private: |
| 1484 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerSecurityTest); | 1484 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerSecurityTest); |
| 1485 }; | 1485 }; |
| 1486 | 1486 |
| 1487 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerSecurityTest, | 1487 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerSecurityTest, |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 "<input autocomplete='transaction-currency' value='USD' readonly>" | 1754 "<input autocomplete='transaction-currency' value='USD' readonly>" |
| 1755 "<input autocomplete='cc-csc'>"); | 1755 "<input autocomplete='cc-csc'>"); |
| 1756 AutofillDialogControllerImpl* controller = SetUpHtmlAndInvoke(html); | 1756 AutofillDialogControllerImpl* controller = SetUpHtmlAndInvoke(html); |
| 1757 ASSERT_TRUE(controller); | 1757 ASSERT_TRUE(controller); |
| 1758 | 1758 |
| 1759 EXPECT_EQ(ASCIIToUTF16("24"), controller->transaction_amount_); | 1759 EXPECT_EQ(ASCIIToUTF16("24"), controller->transaction_amount_); |
| 1760 EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_); | 1760 EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_); |
| 1761 } | 1761 } |
| 1762 | 1762 |
| 1763 } // namespace autofill | 1763 } // namespace autofill |
| OLD | NEW |