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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 4 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/content_settings/content_settings_details.h" 6 #include "chrome/browser/content_settings/content_settings_details.h"
7 #include "chrome/browser/content_settings/host_content_settings_map.h" 7 #include "chrome/browser/content_settings/host_content_settings_map.h"
8 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 8 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/prefs/scoped_user_pref_update.h" 10 #include "chrome/browser/prefs/scoped_user_pref_update.h"
11 #include "chrome/common/chrome_notification_types.h" 11 #include "chrome/common/chrome_notification_types.h"
12 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 #include "chrome/test/base/testing_browser_process_test.h"
14 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
15 #include "content/browser/browser_thread.h" 14 #include "content/browser/browser_thread.h"
16 #include "content/common/notification_registrar.h" 15 #include "content/common/notification_registrar.h"
17 #include "content/common/notification_service.h" 16 #include "content/common/notification_service.h"
18 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
19 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
20 19
21 using ::testing::_; 20 using ::testing::_;
22 21
23 namespace { 22 namespace {
(...skipping 29 matching lines...) Expand all
53 Details<ContentSettingsDetails>(details).ptr(); 52 Details<ContentSettingsDetails>(details).ptr();
54 OnContentSettingsChanged(map, 53 OnContentSettingsChanged(map,
55 settings_details->type()); 54 settings_details->type());
56 // This checks that calling a Get function from an observer doesn't 55 // This checks that calling a Get function from an observer doesn't
57 // deadlock. 56 // deadlock.
58 // TODO(bauerb): Move into expectation setup. 57 // TODO(bauerb): Move into expectation setup.
59 map->GetContentSetting(GURL("http://random-hostname.com/"), 58 map->GetContentSetting(GURL("http://random-hostname.com/"),
60 GURL("http://foo.random-hostname.com/")); 59 GURL("http://foo.random-hostname.com/"));
61 } 60 }
62 61
63 class GeolocationContentSettingsMapTests : public TestingBrowserProcessTest { 62 class GeolocationContentSettingsMapTests : public testing::Test {
64 public: 63 public:
65 GeolocationContentSettingsMapTests() 64 GeolocationContentSettingsMapTests()
66 : ui_thread_(BrowserThread::UI, &message_loop_) { 65 : ui_thread_(BrowserThread::UI, &message_loop_) {
67 } 66 }
68 67
69 protected: 68 protected:
70 MessageLoop message_loop_; 69 MessageLoop message_loop_;
71 BrowserThread ui_thread_; 70 BrowserThread ui_thread_;
72 }; 71 };
73 72
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 OnContentSettingsChanged(map, CONTENT_SETTINGS_TYPE_DEFAULT)); 308 OnContentSettingsChanged(map, CONTENT_SETTINGS_TYPE_DEFAULT));
310 prefs->SetInteger(prefs::kGeolocationDefaultContentSetting, 309 prefs->SetInteger(prefs::kGeolocationDefaultContentSetting,
311 CONTENT_SETTING_ALLOW); 310 CONTENT_SETTING_ALLOW);
312 311
313 EXPECT_EQ(CONTENT_SETTING_ALLOW, 312 EXPECT_EQ(CONTENT_SETTING_ALLOW,
314 profile.GetHostContentSettingsMap()->GetDefaultContentSetting( 313 profile.GetHostContentSettingsMap()->GetDefaultContentSetting(
315 CONTENT_SETTINGS_TYPE_GEOLOCATION)); 314 CONTENT_SETTINGS_TYPE_GEOLOCATION));
316 } 315 }
317 316
318 } // namespace 317 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698