diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
commit | 55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28 (patch) | |
tree | 9c283aee59bc21de2843c49eb0bbf03a428cfcfc /ipc/ipc_sync_message_unittest.cc | |
parent | 904f191f2f7edc9b331e2590c77eb4e8dd845549 (diff) | |
download | chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.zip chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.gz chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.bz2 |
Reland 55888: Allow per-plugin content settings.
Now with Fixed Unit Tests!
Run with --enable-resource-content-settings and --enable-click-to-play to enable.
TabSpecificContentSettings now keeps track of which resources were blocked. The content setting bubble displays those resource, and selecting the "allow radio buttons adds exceptions for these resources.
The infobar for non-sandboxed plug-ins now also shows a button to always allow the blocked plug-in on that site.
Screenshot of the plugin bubble: http://imgur.com/6npqv.png
Because we need to change the title and radio button labels depending on whether we track specific plug-ins, we copy them from the ContentSettingBubbleModel.
XIB changes: Add a text field for the blocked plug-ins to ContentBlockedPlugins.xib, hooked up to the |blockedResourcesField_| outlet.
BUG=39252,38432
TEST=HostContentSettingsMapTest.*,manual
Review URL: http://codereview.chromium.org/2873104
Review URL: http://codereview.chromium.org/3124018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_sync_message_unittest.cc')
-rw-r--r-- | ipc/ipc_sync_message_unittest.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ipc/ipc_sync_message_unittest.cc b/ipc/ipc_sync_message_unittest.cc index 1c92574..506f4c0 100644 --- a/ipc/ipc_sync_message_unittest.cc +++ b/ipc/ipc_sync_message_unittest.cc @@ -93,6 +93,15 @@ class TestMessageReceiver { *out3 = false; } + void On_3_4(bool in1, int in2, std::string in3, int* out1, bool* out2, + std::string* out3, bool* out4) { + DCHECK(in1 && in2 == 3 && in3 == "3_4"); + *out1 = 34; + *out2 = true; + *out3 = "3_4"; + *out4 = false; + } + bool Send(IPC::Message* message) { // gets the reply message, stash in global DCHECK(g_reply == NULL); @@ -114,6 +123,7 @@ class TestMessageReceiver { IPC_MESSAGE_HANDLER(Msg_C_3_1, On_3_1) IPC_MESSAGE_HANDLER(Msg_C_3_2, On_3_2) IPC_MESSAGE_HANDLER(Msg_C_3_3, On_3_3) + IPC_MESSAGE_HANDLER(Msg_C_3_4, On_3_4) IPC_MESSAGE_HANDLER(Msg_R_0_1, On_0_1) IPC_MESSAGE_HANDLER(Msg_R_0_2, On_0_2) IPC_MESSAGE_HANDLER(Msg_R_0_3, On_0_3) @@ -201,6 +211,11 @@ TEST(IPCSyncMessageTest, Main) { Send(new Msg_C_3_3(3, "3_3", true, &string1, &int1, &bool1)); DCHECK(string1 == "3_3" && int1 == 33 && !bool1); + bool1 = false; + bool bool2 = true; + Send(new Msg_C_3_4(true, 3, "3_4", &int1, &bool1, &string1, &bool2)); + DCHECK(int1 == 34 && bool1 && string1 == "3_4" && !bool2); + // Routed messages, just a copy of the above but with extra routing paramater Send(new Msg_R_0_1(0, &bool1)); DCHECK(!bool1); |