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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc

Issue 319553008: Updated Plugin bubble model to add "learn more" link and to appear with a sliding yellow thing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated so that the yellow thing occurs only when the content setting is set to allow Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.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/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 453 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
454 NULL, web_contents(), profile(), 454 NULL, web_contents(), profile(),
455 CONTENT_SETTINGS_TYPE_PLUGINS)); 455 CONTENT_SETTINGS_TYPE_PLUGINS));
456 const ContentSettingBubbleModel::BubbleContent& bubble_content = 456 const ContentSettingBubbleModel::BubbleContent& bubble_content =
457 content_setting_bubble_model->bubble_content(); 457 content_setting_bubble_model->bubble_content();
458 EXPECT_FALSE(bubble_content.title.empty()); 458 EXPECT_FALSE(bubble_content.title.empty());
459 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 459 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
460 EXPECT_FALSE(bubble_content.custom_link.empty()); 460 EXPECT_FALSE(bubble_content.custom_link.empty());
461 EXPECT_TRUE(bubble_content.custom_link_enabled); 461 EXPECT_TRUE(bubble_content.custom_link_enabled);
462 EXPECT_FALSE(bubble_content.manage_link.empty()); 462 EXPECT_FALSE(bubble_content.manage_link.empty());
463 EXPECT_FALSE(bubble_content.learn_more_link.empty());
463 } 464 }
464 465
465 TEST_F(ContentSettingBubbleModelTest, PepperBroker) { 466 TEST_F(ContentSettingBubbleModelTest, PepperBroker) {
466 TabSpecificContentSettings* content_settings = 467 TabSpecificContentSettings* content_settings =
467 TabSpecificContentSettings::FromWebContents(web_contents()); 468 TabSpecificContentSettings::FromWebContents(web_contents());
468 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); 469 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER);
469 470
470 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( 471 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
471 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 472 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
472 NULL, web_contents(), profile(), 473 NULL, web_contents(), profile(),
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 { 661 {
661 ProtocolHandler handler = registry.GetHandlerFor("mailto"); 662 ProtocolHandler handler = registry.GetHandlerFor("mailto");
662 ASSERT_FALSE(handler.IsEmpty()); 663 ASSERT_FALSE(handler.IsEmpty());
663 EXPECT_EQ(CONTENT_SETTING_ALLOW, 664 EXPECT_EQ(CONTENT_SETTING_ALLOW,
664 content_settings->pending_protocol_handler_setting()); 665 content_settings->pending_protocol_handler_setting());
665 EXPECT_FALSE(registry.IsIgnored(test_handler)); 666 EXPECT_FALSE(registry.IsIgnored(test_handler));
666 } 667 }
667 668
668 registry.Shutdown(); 669 registry.Shutdown();
669 } 670 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698