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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "content/public/test/browser_test_utils.h" | 54 #include "content/public/test/browser_test_utils.h" |
55 #include "content/public/test/test_utils.h" | 55 #include "content/public/test/test_utils.h" |
56 #include "google_apis/gaia/google_service_auth_error.h" | 56 #include "google_apis/gaia/google_service_auth_error.h" |
57 #include "net/test/spawned_test_server/spawned_test_server.h" | 57 #include "net/test/spawned_test_server/spawned_test_server.h" |
58 #include "testing/gmock/include/gmock/gmock.h" | 58 #include "testing/gmock/include/gmock/gmock.h" |
59 #include "testing/gtest/include/gtest/gtest.h" | 59 #include "testing/gtest/include/gtest/gtest.h" |
60 #include "third_party/WebKit/public/web/WebInputEvent.h" | 60 #include "third_party/WebKit/public/web/WebInputEvent.h" |
61 #include "ui/base/window_open_disposition.h" | 61 #include "ui/base/window_open_disposition.h" |
62 #include "url/gurl.h" | 62 #include "url/gurl.h" |
63 | 63 |
64 #if defined(OS_MACOSX) | 64 #if defined(OS_WIN) |
| 65 #include "base/win/windows_version.h" |
| 66 #elif defined(OS_MACOSX) |
65 #include "base/mac/mac_util.h" | 67 #include "base/mac/mac_util.h" |
66 #include "base/mac/scoped_nsautorelease_pool.h" | 68 #include "base/mac/scoped_nsautorelease_pool.h" |
67 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 69 #include "chrome/browser/ui/cocoa/run_loop_testing.h" |
68 #endif | 70 #endif |
69 | 71 |
70 using base::ASCIIToUTF16; | 72 using base::ASCIIToUTF16; |
71 | 73 |
72 namespace autofill { | 74 namespace autofill { |
73 | 75 |
74 namespace { | 76 namespace { |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 controller()->ForceFinishSubmit(); | 1029 controller()->ForceFinishSubmit(); |
1028 | 1030 |
1029 RunMessageLoop(); | 1031 RunMessageLoop(); |
1030 | 1032 |
1031 EXPECT_EQ(1, test_generated_bubble_controller()->bubbles_shown()); | 1033 EXPECT_EQ(1, test_generated_bubble_controller()->bubbles_shown()); |
1032 EXPECT_EQ(last_four, test_generated_bubble_controller()->backing_card_name()); | 1034 EXPECT_EQ(last_four, test_generated_bubble_controller()->backing_card_name()); |
1033 } | 1035 } |
1034 | 1036 |
1035 // Simulates the user signing in to the dialog from the inline web contents. | 1037 // Simulates the user signing in to the dialog from the inline web contents. |
1036 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, SimulateSuccessfulSignIn) { | 1038 IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest, SimulateSuccessfulSignIn) { |
| 1039 #if defined(OS_WIN) |
| 1040 // TODO(msw): Fix potential flakiness on Windows XP; http://crbug.com/333641 |
| 1041 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1042 return; |
| 1043 #endif |
1037 browser()->profile()->GetPrefs()->SetBoolean( | 1044 browser()->profile()->GetPrefs()->SetBoolean( |
1038 ::prefs::kAutofillDialogPayWithoutWallet, | 1045 ::prefs::kAutofillDialogPayWithoutWallet, |
1039 true); | 1046 true); |
1040 | 1047 |
1041 InitializeController(); | 1048 InitializeController(); |
1042 | 1049 |
1043 controller()->OnDidFetchWalletCookieValue(std::string()); | 1050 controller()->OnDidFetchWalletCookieValue(std::string()); |
1044 controller()->OnDidGetWalletItems( | 1051 controller()->OnDidGetWalletItems( |
1045 wallet::GetTestWalletItemsWithRequiredAction(wallet::GAIA_AUTH)); | 1052 wallet::GetTestWalletItemsWithRequiredAction(wallet::GAIA_AUTH)); |
1046 | 1053 |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 MAYBE_DoesntWorkOnBrokenHttps) { | 1397 MAYBE_DoesntWorkOnBrokenHttps) { |
1391 net::SpawnedTestServer https_server( | 1398 net::SpawnedTestServer https_server( |
1392 net::SpawnedTestServer::TYPE_HTTPS, | 1399 net::SpawnedTestServer::TYPE_HTTPS, |
1393 SSLOptions(SSLOptions::CERT_EXPIRED), | 1400 SSLOptions(SSLOptions::CERT_EXPIRED), |
1394 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); | 1401 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); |
1395 ASSERT_TRUE(https_server.Start()); | 1402 ASSERT_TRUE(https_server.Start()); |
1396 EXPECT_FALSE(RunTestPage(https_server)); | 1403 EXPECT_FALSE(RunTestPage(https_server)); |
1397 } | 1404 } |
1398 | 1405 |
1399 } // namespace autofill | 1406 } // namespace autofill |
OLD | NEW |