Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/geolocation/geolocation_settings_state_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
9 #include "chrome/browser/geolocation/geolocation_settings_state.h" 9 #include "chrome/browser/geolocation/geolocation_settings_state.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
11 #include "content/public/browser/navigation_details.h" 11 #include "content/public/browser/navigation_details.h"
12 #include "content/public/browser/navigation_entry.h" 12 #include "content/public/browser/navigation_entry.h"
13 #include "content/public/test/test_browser_thread.h" 13 #include "content/public/test/test_browser_thread.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using content::BrowserThread; 16 using content::BrowserThread;
17 using content::NavigationEntry; 17 using content::NavigationEntry;
18 18
19 namespace { 19 namespace {
20 20
21 class GeolocationSettingsStateTests : public testing::Test { 21 class GeolocationSettingsStateTests : public testing::Test {
22 public: 22 public:
23 GeolocationSettingsStateTests() 23 GeolocationSettingsStateTests()
24 : ui_thread_(BrowserThread::UI, &message_loop_) { 24 : ui_thread_(BrowserThread::UI, &message_loop_) {
25 } 25 }
26 26
27 protected: 27 protected:
28 MessageLoop message_loop_; 28 base::MessageLoop message_loop_;
29 content::TestBrowserThread ui_thread_; 29 content::TestBrowserThread ui_thread_;
30 }; 30 };
31 31
32 TEST_F(GeolocationSettingsStateTests, ClearOnNewOrigin) { 32 TEST_F(GeolocationSettingsStateTests, ClearOnNewOrigin) {
33 TestingProfile profile; 33 TestingProfile profile;
34 GeolocationSettingsState state(&profile); 34 GeolocationSettingsState state(&profile);
35 GURL url_0("http://www.example.com"); 35 GURL url_0("http://www.example.com");
36 36
37 scoped_ptr<NavigationEntry> entry(NavigationEntry::Create()); 37 scoped_ptr<NavigationEntry> entry(NavigationEntry::Create());
38 entry->SetURL(url_0); 38 entry->SetURL(url_0);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 formatted_host_per_state[CONTENT_SETTING_ALLOW].count( 203 formatted_host_per_state[CONTENT_SETTING_ALLOW].count(
204 url_2.host())); 204 url_2.host()));
205 EXPECT_EQ(1U, formatted_host_per_state[CONTENT_SETTING_BLOCK].size()); 205 EXPECT_EQ(1U, formatted_host_per_state[CONTENT_SETTING_BLOCK].size());
206 EXPECT_EQ(1U, 206 EXPECT_EQ(1U,
207 formatted_host_per_state[CONTENT_SETTING_BLOCK].count( 207 formatted_host_per_state[CONTENT_SETTING_BLOCK].count(
208 url_1.spec())); 208 url_1.spec()));
209 } 209 }
210 210
211 211
212 } // namespace 212 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698