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

Side by Side Diff: chrome/browser/gtk/options/content_exceptions_window_gtk_unittest.cc

Issue 2878075: Introduce a resource identifier for content settings. (Closed)
Patch Set: updates Created 10 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
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/gtk/options/content_exceptions_window_gtk.h" 5 #include "chrome/browser/gtk/options/content_exceptions_window_gtk.h"
6 6
7 #include "chrome/test/testing_profile.h" 7 #include "chrome/test/testing_profile.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 10 matching lines...) Expand all
21 ~ContentExceptionsWindowGtkUnittest() { 21 ~ContentExceptionsWindowGtkUnittest() {
22 // This will delete window_ too. 22 // This will delete window_ too.
23 gtk_widget_destroy(window_->dialog_); 23 gtk_widget_destroy(window_->dialog_);
24 message_loop_.RunAllPending(); 24 message_loop_.RunAllPending();
25 } 25 }
26 26
27 void AddException(const std::string& pattern, ContentSetting value) { 27 void AddException(const std::string& pattern, ContentSetting value) {
28 host_content_settings_map_->SetContentSetting( 28 host_content_settings_map_->SetContentSetting(
29 HostContentSettingsMap::Pattern(pattern), 29 HostContentSettingsMap::Pattern(pattern),
30 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 30 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
31 "",
31 value); 32 value);
32 } 33 }
33 34
34 void BuildWindow() { 35 void BuildWindow() {
35 window_ = new ContentExceptionsWindowGtk( 36 window_ = new ContentExceptionsWindowGtk(
36 NULL, 37 NULL,
37 host_content_settings_map_, 38 host_content_settings_map_,
38 NULL, 39 NULL,
39 CONTENT_SETTINGS_TYPE_JAVASCRIPT); 40 CONTENT_SETTINGS_TYPE_JAVASCRIPT);
40 } 41 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Remove(); 202 Remove();
202 203
203 std::set<std::pair<int, int> > selected; 204 std::set<std::pair<int, int> > selected;
204 GetSelectedRows(&selected); 205 GetSelectedRows(&selected);
205 206
206 ASSERT_EQ(1u, selected.size()); 207 ASSERT_EQ(1u, selected.size());
207 EXPECT_EQ(1, selected.begin()->first); 208 EXPECT_EQ(1, selected.begin()->first);
208 EXPECT_EQ(1, selected.begin()->second); 209 EXPECT_EQ(1, selected.begin()->second);
209 EXPECT_THAT(Paths(), ElementsAre("a", "c", "e")); 210 EXPECT_THAT(Paths(), ElementsAre("a", "c", "e"));
210 } 211 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/content_settings_handler.cc ('k') | chrome/browser/host_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698