| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
| 8 #include "chrome/browser/webdata/autofill_table.h" | 8 #include "chrome/browser/webdata/autofill_table.h" |
| 9 #include "chrome/browser/webdata/web_database.h" | 9 #include "chrome/browser/webdata/web_database.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 "\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\x00\x00" | 90 "\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\x00\x00" |
| 91 "\x0a\x49\x44\x41\x54\x08\xd7\x63\x60\x00\x00\x00\x02\x00\x01\xe2" | 91 "\x0a\x49\x44\x41\x54\x08\xd7\x63\x60\x00\x00\x00\x02\x00\x01\xe2" |
| 92 "\x21\xbc\x33\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"}; | 92 "\x21\xbc\x33\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"}; |
| 93 | 93 |
| 94 const size_t kBlankPngFileLength = 95; | 94 const size_t kBlankPngFileLength = 95; |
| 95 } // anonymous namespace | 95 } // anonymous namespace |
| 96 | 96 |
| 97 // Looks up |element_name| in the Chrome form data DB and ensures that the | 97 // Looks up |element_name| in the Chrome form data DB and ensures that the |
| 98 // results match |matcher|. | 98 // results match |matcher|. |
| 99 ACTION_P2(ExpectFormValuesForElementNameMatch, element_name, matcher) { | 99 ACTION_P2(ExpectFormValuesForElementNameMatch, element_name, matcher) { |
| 100 FilePath root_path; |
| 101 GetChromeFrameProfilePath(&root_path, kIexploreProfileName); |
| 100 FilePath profile_path( | 102 FilePath profile_path( |
| 101 chrome_frame_test::GetProfilePath(kIexploreProfileName) | 103 root_path.Append(L"Default").Append(chrome::kWebDataFilename)); |
| 102 .Append(L"Default").Append(chrome::kWebDataFilename)); | |
| 103 | 104 |
| 104 WebDatabase web_database; | 105 WebDatabase web_database; |
| 105 sql::InitStatus init_status = web_database.Init(profile_path); | 106 sql::InitStatus init_status = web_database.Init(profile_path); |
| 106 EXPECT_EQ(sql::INIT_OK, init_status); | 107 EXPECT_EQ(sql::INIT_OK, init_status); |
| 107 | 108 |
| 108 if (init_status == sql::INIT_OK) { | 109 if (init_status == sql::INIT_OK) { |
| 109 std::vector<string16> values; | 110 std::vector<string16> values; |
| 110 web_database.GetAutofillTable()->GetFormValuesForElementName( | 111 web_database.GetAutofillTable()->GetFormValuesForElementName( |
| 111 element_name, L"", &values, 9999); | 112 element_name, L"", &values, 9999); |
| 112 EXPECT_THAT(values, matcher); | 113 EXPECT_THAT(values, matcher); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 324 |
| 324 // Start it up. Everything else is triggered as mock actions. | 325 // Start it up. Everything else is triggered as mock actions. |
| 325 ASSERT_HRESULT_SUCCEEDED( | 326 ASSERT_HRESULT_SUCCEEDED( |
| 326 ie_mock_.event_sink()->LaunchIEAndNavigate(top_url, &ie_mock_)); | 327 ie_mock_.event_sink()->LaunchIEAndNavigate(top_url, &ie_mock_)); |
| 327 | 328 |
| 328 // 3 navigations + 2 invocations of delete browser history == 5 | 329 // 3 navigations + 2 invocations of delete browser history == 5 |
| 329 loop_.RunFor(kChromeFrameLongNavigationTimeout * 5); | 330 loop_.RunFor(kChromeFrameLongNavigationTimeout * 5); |
| 330 } | 331 } |
| 331 | 332 |
| 332 } // namespace chrome_frame_test | 333 } // namespace chrome_frame_test |
| OLD | NEW |