| 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 "chrome/browser/cookies_tree_model.h" | 5 #include "chrome/browser/cookies_tree_model.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
| 10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 11 #include "chrome/browser/content_settings/mock_settings_observer.h" | 11 #include "chrome/browser/content_settings/mock_settings_observer.h" |
| 12 #include "chrome/browser/mock_browsing_data_appcache_helper.h" | 12 #include "chrome/browser/mock_browsing_data_appcache_helper.h" |
| 13 #include "chrome/browser/mock_browsing_data_cookie_helper.h" | 13 #include "chrome/browser/mock_browsing_data_cookie_helper.h" |
| 14 #include "chrome/browser/mock_browsing_data_database_helper.h" | 14 #include "chrome/browser/mock_browsing_data_database_helper.h" |
| 15 #include "chrome/browser/mock_browsing_data_file_system_helper.h" | 15 #include "chrome/browser/mock_browsing_data_file_system_helper.h" |
| 16 #include "chrome/browser/mock_browsing_data_indexed_db_helper.h" | 16 #include "chrome/browser/mock_browsing_data_indexed_db_helper.h" |
| 17 #include "chrome/browser/mock_browsing_data_local_storage_helper.h" | 17 #include "chrome/browser/mock_browsing_data_local_storage_helper.h" |
| 18 #include "chrome/browser/mock_browsing_data_quota_helper.h" | 18 #include "chrome/browser/mock_browsing_data_quota_helper.h" |
| 19 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
| 20 #include "content/public/browser/notification_details.h" | 20 #include "content/public/browser/notification_details.h" |
| 21 #include "content/public/browser/notification_types.h" | 21 #include "content/public/browser/notification_types.h" |
| 22 #include "content/test/test_browser_thread.h" | 22 #include "content/test/test_browser_thread.h" |
| 23 #include "net/url_request/url_request_context.h" | 23 #include "net/url_request/url_request_context.h" |
| 24 #include "net/url_request/url_request_context_getter.h" | 24 #include "net/url_request/url_request_context_getter.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 26 |
| 27 #include "base/utf_string_conversions.h" | 27 #include "base/utf_string_conversions.h" |
| 28 | 28 |
| 29 using ::testing::_; | 29 using ::testing::_; |
| 30 using content::BrowserThread; |
| 30 | 31 |
| 31 namespace { | 32 namespace { |
| 32 | 33 |
| 33 class CookiesTreeModelTest : public testing::Test { | 34 class CookiesTreeModelTest : public testing::Test { |
| 34 public: | 35 public: |
| 35 CookiesTreeModelTest() : ui_thread_(BrowserThread::UI, &message_loop_), | 36 CookiesTreeModelTest() : ui_thread_(BrowserThread::UI, &message_loop_), |
| 36 io_thread_(BrowserThread::IO, &message_loop_) { | 37 io_thread_(BrowserThread::IO, &message_loop_) { |
| 37 } | 38 } |
| 38 | 39 |
| 39 virtual ~CookiesTreeModelTest() { | 40 virtual ~CookiesTreeModelTest() { |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 cookies_model->UpdateSearchResults(std::wstring(L"fshost3")); | 996 cookies_model->UpdateSearchResults(std::wstring(L"fshost3")); |
| 996 EXPECT_EQ("http://fshost3:3/", | 997 EXPECT_EQ("http://fshost3:3/", |
| 997 GetDisplayedFileSystems(cookies_model.get())); | 998 GetDisplayedFileSystems(cookies_model.get())); |
| 998 | 999 |
| 999 cookies_model->UpdateSearchResults(std::wstring()); | 1000 cookies_model->UpdateSearchResults(std::wstring()); |
| 1000 EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/", | 1001 EXPECT_EQ("http://fshost1:1/,http://fshost2:2/,http://fshost3:3/", |
| 1001 GetDisplayedFileSystems(cookies_model.get())); | 1002 GetDisplayedFileSystems(cookies_model.get())); |
| 1002 } | 1003 } |
| 1003 | 1004 |
| 1004 } // namespace | 1005 } // namespace |
| OLD | NEW |