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

Side by Side Diff: chrome/browser/content_exceptions_table_model_unittest.cc

Issue 6532034: GTTF: Use a fresh TestingBrowserProcess for each test, part #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/content_exceptions_table_model.h" 5 #include "chrome/browser/content_exceptions_table_model.h"
6 6
7 #include "chrome/test/testing_browser_process_test.h"
7 #include "chrome/test/testing_profile.h" 8 #include "chrome/test/testing_profile.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 10
10 namespace { 11 namespace {
11 12
12 class ContentExceptionsTableModelTest : public testing::Test { 13 class ContentExceptionsTableModelTest : public TestingBrowserProcessTest {
13 public: 14 public:
14 ContentExceptionsTableModelTest() 15 ContentExceptionsTableModelTest()
15 : ui_thread_(BrowserThread::UI, &message_loop_) {} 16 : ui_thread_(BrowserThread::UI, &message_loop_) {}
16 17
17 protected: 18 protected:
18 MessageLoop message_loop_; 19 MessageLoop message_loop_;
19 BrowserThread ui_thread_; 20 BrowserThread ui_thread_;
20 }; 21 };
21 22
22 TEST_F(ContentExceptionsTableModelTest, Incognito) { 23 TEST_F(ContentExceptionsTableModelTest, Incognito) {
23 TestingProfile profile; 24 TestingProfile profile;
24 TestingProfile* otr_profile = new TestingProfile(); 25 TestingProfile* otr_profile = new TestingProfile();
25 otr_profile->set_off_the_record(true); 26 otr_profile->set_off_the_record(true);
26 ContentExceptionsTableModel model(profile.GetHostContentSettingsMap(), 27 ContentExceptionsTableModel model(profile.GetHostContentSettingsMap(),
27 otr_profile->GetHostContentSettingsMap(), 28 otr_profile->GetHostContentSettingsMap(),
28 CONTENT_SETTINGS_TYPE_COOKIES); 29 CONTENT_SETTINGS_TYPE_COOKIES);
29 delete otr_profile; 30 delete otr_profile;
30 model.AddException(ContentSettingsPattern("example.com"), 31 model.AddException(ContentSettingsPattern("example.com"),
31 CONTENT_SETTING_BLOCK, true); 32 CONTENT_SETTING_BLOCK, true);
32 } 33 }
33 34
34 } // namespace 35 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698