| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 11 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
| 12 #include "chrome/browser/autofill/autofill_common_test.h" | 12 #include "chrome/browser/autofill/autofill_common_test.h" |
| 13 #include "chrome/browser/autofill/autofill_manager.h" | 13 #include "chrome/browser/autofill/autofill_manager.h" |
| 14 #include "chrome/browser/autofill/autofill_metrics.h" | 14 #include "chrome/browser/autofill/autofill_metrics.h" |
| 15 #include "chrome/browser/autofill/personal_data_manager.h" | 15 #include "chrome/browser/autofill/personal_data_manager.h" |
| 16 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 16 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 18 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 18 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
| 19 #include "chrome/browser/webdata/web_data_service.h" | 19 #include "chrome/browser/webdata/web_data_service.h" |
| 20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 21 #include "content/browser/tab_contents/test_tab_contents.h" | 21 #include "content/browser/tab_contents/test_tab_contents.h" |
| 22 #include "content/test/test_browser_thread.h" | 22 #include "content/test/test_browser_thread.h" |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "webkit/glue/form_data.h" | 25 #include "webkit/glue/form_data.h" |
| 26 #include "webkit/glue/form_field.h" | 26 #include "webkit/glue/form_field.h" |
| 27 | 27 |
| 28 using content::BrowserThread; |
| 28 using ::testing::_; | 29 using ::testing::_; |
| 29 using ::testing::AnyNumber; | 30 using ::testing::AnyNumber; |
| 30 using ::testing::Mock; | 31 using ::testing::Mock; |
| 31 using base::TimeTicks; | 32 using base::TimeTicks; |
| 32 using base::TimeDelta; | 33 using base::TimeDelta; |
| 33 using webkit_glue::FormData; | 34 using webkit_glue::FormData; |
| 34 using webkit_glue::FormField; | 35 using webkit_glue::FormField; |
| 35 | 36 |
| 36 namespace { | 37 namespace { |
| 37 | 38 |
| (...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), | 1411 autofill_manager_->OnTextFieldDidChange(form, form.fields.front(), |
| 1411 TimeTicks::FromInternalValue(3)); | 1412 TimeTicks::FromInternalValue(3)); |
| 1412 autofill_manager_->OnFormSubmitted(form, TimeTicks::FromInternalValue(17)); | 1413 autofill_manager_->OnFormSubmitted(form, TimeTicks::FromInternalValue(17)); |
| 1413 autofill_manager_->Reset(); | 1414 autofill_manager_->Reset(); |
| 1414 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); | 1415 Mock::VerifyAndClearExpectations(autofill_manager_->metric_logger()); |
| 1415 } | 1416 } |
| 1416 | 1417 |
| 1417 // Restore the global Gmock verbosity level to its default value. | 1418 // Restore the global Gmock verbosity level to its default value. |
| 1418 ::testing::FLAGS_gmock_verbose = "warning"; | 1419 ::testing::FLAGS_gmock_verbose = "warning"; |
| 1419 } | 1420 } |
| OLD | NEW |