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

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

Issue 1147363005: Create FormatUrlForSecurityDisplay helper function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change testing strategy, respond to comments. Created 5 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/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.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"
11 #include "chrome/browser/infobars/infobar_service.h" 11 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 12 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
13 #include "chrome/browser/media/media_stream_capture_indicator.h" 13 #include "chrome/browser/media/media_stream_capture_indicator.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 15 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
16 #include "chrome/browser/ui/elide_url.h"
16 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
18 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 20 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
20 #include "chrome/test/base/testing_profile.h" 21 #include "chrome/test/base/testing_profile.h"
21 #include "components/content_settings/core/browser/host_content_settings_map.h" 22 #include "components/content_settings/core/browser/host_content_settings_map.h"
22 #include "components/content_settings/core/common/content_settings.h" 23 #include "components/content_settings/core/common/content_settings.h"
23 #include "components/infobars/core/infobar_delegate.h" 24 #include "components/infobars/core/infobar_delegate.h"
24 #include "content/public/browser/web_contents.h" 25 #include "content/public/browser/web_contents.h"
25 #include "content/public/test/web_contents_tester.h" 26 #include "content/public/test/web_contents_tester.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 NULL, web_contents(), profile(), 147 NULL, web_contents(), profile(),
147 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 148 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
148 const ContentSettingBubbleModel::BubbleContent& bubble_content = 149 const ContentSettingBubbleModel::BubbleContent& bubble_content =
149 content_setting_bubble_model->bubble_content(); 150 content_setting_bubble_model->bubble_content();
150 EXPECT_EQ(bubble_content.title, 151 EXPECT_EQ(bubble_content.title,
151 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED)); 152 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED));
152 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 153 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
153 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 154 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
154 l10n_util::GetStringFUTF8( 155 l10n_util::GetStringFUTF8(
155 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION, 156 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION,
156 base::UTF8ToUTF16(request_host))); 157 FormatUrlForSecurityDisplay(security_origin,
158 profile()->GetPrefs()->GetString(
159 prefs::kAcceptLanguages))));
157 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 160 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
158 l10n_util::GetStringUTF8( 161 l10n_util::GetStringUTF8(
159 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK)); 162 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK));
160 EXPECT_EQ(0, bubble_content.radio_group.default_item); 163 EXPECT_EQ(0, bubble_content.radio_group.default_item);
161 EXPECT_TRUE(bubble_content.custom_link.empty()); 164 EXPECT_TRUE(bubble_content.custom_link.empty());
162 EXPECT_FALSE(bubble_content.custom_link_enabled); 165 EXPECT_FALSE(bubble_content.custom_link_enabled);
163 EXPECT_FALSE(bubble_content.manage_link.empty()); 166 EXPECT_FALSE(bubble_content.manage_link.empty());
164 EXPECT_EQ(2U, bubble_content.media_menus.size()); 167 EXPECT_EQ(2U, bubble_content.media_menus.size());
165 } 168 }
166 169
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 NULL, web_contents(), profile(), 532 NULL, web_contents(), profile(),
530 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 533 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
531 const ContentSettingBubbleModel::BubbleContent& bubble_content = 534 const ContentSettingBubbleModel::BubbleContent& bubble_content =
532 content_setting_bubble_model->bubble_content(); 535 content_setting_bubble_model->bubble_content();
533 EXPECT_EQ(bubble_content.title, 536 EXPECT_EQ(bubble_content.title,
534 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED)); 537 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED));
535 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 538 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
536 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 539 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
537 l10n_util::GetStringFUTF8( 540 l10n_util::GetStringFUTF8(
538 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION, 541 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION,
539 base::UTF8ToUTF16(request_host))); 542 FormatUrlForSecurityDisplay(security_origin,
543 profile()->GetPrefs()->GetString(
544 prefs::kAcceptLanguages))));
540 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 545 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
541 l10n_util::GetStringUTF8( 546 l10n_util::GetStringUTF8(
542 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK)); 547 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK));
543 EXPECT_EQ(0, bubble_content.radio_group.default_item); 548 EXPECT_EQ(0, bubble_content.radio_group.default_item);
544 EXPECT_TRUE(bubble_content.custom_link.empty()); 549 EXPECT_TRUE(bubble_content.custom_link.empty());
545 EXPECT_FALSE(bubble_content.custom_link_enabled); 550 EXPECT_FALSE(bubble_content.custom_link_enabled);
546 EXPECT_FALSE(bubble_content.manage_link.empty()); 551 EXPECT_FALSE(bubble_content.manage_link.empty());
547 EXPECT_EQ(1U, bubble_content.media_menus.size()); 552 EXPECT_EQ(1U, bubble_content.media_menus.size());
548 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 553 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
549 bubble_content.media_menus.begin()->first); 554 bubble_content.media_menus.begin()->first);
(...skipping 11 matching lines...) Expand all
561 NULL, web_contents(), profile(), 566 NULL, web_contents(), profile(),
562 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 567 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
563 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 568 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
564 content_setting_bubble_model->bubble_content(); 569 content_setting_bubble_model->bubble_content();
565 EXPECT_EQ(new_bubble_content.title, 570 EXPECT_EQ(new_bubble_content.title,
566 l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED)); 571 l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED));
567 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 572 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
568 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 573 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
569 l10n_util::GetStringFUTF8( 574 l10n_util::GetStringFUTF8(
570 IDS_BLOCKED_MEDIASTREAM_MIC_ASK, 575 IDS_BLOCKED_MEDIASTREAM_MIC_ASK,
571 base::UTF8ToUTF16(request_host))); 576 FormatUrlForSecurityDisplay(security_origin,
577 profile()->GetPrefs()->GetString(
578 prefs::kAcceptLanguages))));
572 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 579 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
573 l10n_util::GetStringUTF8( 580 l10n_util::GetStringUTF8(
574 IDS_BLOCKED_MEDIASTREAM_MIC_NO_ACTION)); 581 IDS_BLOCKED_MEDIASTREAM_MIC_NO_ACTION));
575 EXPECT_EQ(1, new_bubble_content.radio_group.default_item); 582 EXPECT_EQ(1, new_bubble_content.radio_group.default_item);
576 EXPECT_TRUE(new_bubble_content.custom_link.empty()); 583 EXPECT_TRUE(new_bubble_content.custom_link.empty());
577 EXPECT_FALSE(new_bubble_content.custom_link_enabled); 584 EXPECT_FALSE(new_bubble_content.custom_link_enabled);
578 EXPECT_FALSE(new_bubble_content.manage_link.empty()); 585 EXPECT_FALSE(new_bubble_content.manage_link.empty());
579 EXPECT_EQ(1U, new_bubble_content.media_menus.size()); 586 EXPECT_EQ(1U, new_bubble_content.media_menus.size());
580 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 587 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
581 new_bubble_content.media_menus.begin()->first); 588 new_bubble_content.media_menus.begin()->first);
(...skipping 22 matching lines...) Expand all
604 NULL, web_contents(), profile(), 611 NULL, web_contents(), profile(),
605 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 612 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
606 const ContentSettingBubbleModel::BubbleContent& bubble_content = 613 const ContentSettingBubbleModel::BubbleContent& bubble_content =
607 content_setting_bubble_model->bubble_content(); 614 content_setting_bubble_model->bubble_content();
608 EXPECT_EQ(bubble_content.title, 615 EXPECT_EQ(bubble_content.title,
609 l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED)); 616 l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED));
610 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 617 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
611 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 618 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
612 l10n_util::GetStringFUTF8( 619 l10n_util::GetStringFUTF8(
613 IDS_ALLOWED_MEDIASTREAM_CAMERA_NO_ACTION, 620 IDS_ALLOWED_MEDIASTREAM_CAMERA_NO_ACTION,
614 base::UTF8ToUTF16(request_host))); 621 FormatUrlForSecurityDisplay(security_origin,
622 profile()->GetPrefs()->GetString(
623 prefs::kAcceptLanguages))));
615 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 624 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
616 l10n_util::GetStringUTF8( 625 l10n_util::GetStringUTF8(
617 IDS_ALLOWED_MEDIASTREAM_CAMERA_BLOCK)); 626 IDS_ALLOWED_MEDIASTREAM_CAMERA_BLOCK));
618 EXPECT_EQ(0, bubble_content.radio_group.default_item); 627 EXPECT_EQ(0, bubble_content.radio_group.default_item);
619 EXPECT_TRUE(bubble_content.custom_link.empty()); 628 EXPECT_TRUE(bubble_content.custom_link.empty());
620 EXPECT_FALSE(bubble_content.custom_link_enabled); 629 EXPECT_FALSE(bubble_content.custom_link_enabled);
621 EXPECT_FALSE(bubble_content.manage_link.empty()); 630 EXPECT_FALSE(bubble_content.manage_link.empty());
622 EXPECT_EQ(1U, bubble_content.media_menus.size()); 631 EXPECT_EQ(1U, bubble_content.media_menus.size());
623 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE, 632 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE,
624 bubble_content.media_menus.begin()->first); 633 bubble_content.media_menus.begin()->first);
(...skipping 11 matching lines...) Expand all
636 NULL, web_contents(), profile(), 645 NULL, web_contents(), profile(),
637 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 646 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
638 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 647 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
639 content_setting_bubble_model->bubble_content(); 648 content_setting_bubble_model->bubble_content();
640 EXPECT_EQ(new_bubble_content.title, 649 EXPECT_EQ(new_bubble_content.title,
641 l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED)); 650 l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED));
642 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 651 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
643 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 652 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
644 l10n_util::GetStringFUTF8( 653 l10n_util::GetStringFUTF8(
645 IDS_BLOCKED_MEDIASTREAM_CAMERA_ASK, 654 IDS_BLOCKED_MEDIASTREAM_CAMERA_ASK,
646 base::UTF8ToUTF16(request_host))); 655 FormatUrlForSecurityDisplay(security_origin,
656 profile()->GetPrefs()->GetString(
657 prefs::kAcceptLanguages))));
647 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 658 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
648 l10n_util::GetStringUTF8( 659 l10n_util::GetStringUTF8(
649 IDS_BLOCKED_MEDIASTREAM_CAMERA_NO_ACTION)); 660 IDS_BLOCKED_MEDIASTREAM_CAMERA_NO_ACTION));
650 EXPECT_EQ(1, new_bubble_content.radio_group.default_item); 661 EXPECT_EQ(1, new_bubble_content.radio_group.default_item);
651 EXPECT_TRUE(new_bubble_content.custom_link.empty()); 662 EXPECT_TRUE(new_bubble_content.custom_link.empty());
652 EXPECT_FALSE(new_bubble_content.custom_link_enabled); 663 EXPECT_FALSE(new_bubble_content.custom_link_enabled);
653 EXPECT_FALSE(new_bubble_content.manage_link.empty()); 664 EXPECT_FALSE(new_bubble_content.manage_link.empty());
654 EXPECT_EQ(1U, new_bubble_content.media_menus.size()); 665 EXPECT_EQ(1U, new_bubble_content.media_menus.size());
655 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE, 666 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE,
656 new_bubble_content.media_menus.begin()->first); 667 new_bubble_content.media_menus.begin()->first);
(...skipping 24 matching lines...) Expand all
681 NULL, web_contents(), profile(), 692 NULL, web_contents(), profile(),
682 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 693 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
683 const ContentSettingBubbleModel::BubbleContent& bubble_content = 694 const ContentSettingBubbleModel::BubbleContent& bubble_content =
684 content_setting_bubble_model->bubble_content(); 695 content_setting_bubble_model->bubble_content();
685 EXPECT_EQ(bubble_content.title, 696 EXPECT_EQ(bubble_content.title,
686 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED)); 697 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED));
687 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 698 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
688 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 699 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
689 l10n_util::GetStringFUTF8( 700 l10n_util::GetStringFUTF8(
690 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION, 701 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION,
691 base::UTF8ToUTF16(request_host))); 702 FormatUrlForSecurityDisplay(security_origin,
703 profile()->GetPrefs()->GetString(
704 prefs::kAcceptLanguages))));
692 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 705 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
693 l10n_util::GetStringUTF8( 706 l10n_util::GetStringUTF8(
694 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK)); 707 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK));
695 EXPECT_EQ(0, bubble_content.radio_group.default_item); 708 EXPECT_EQ(0, bubble_content.radio_group.default_item);
696 EXPECT_EQ(1U, bubble_content.media_menus.size()); 709 EXPECT_EQ(1U, bubble_content.media_menus.size());
697 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 710 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
698 bubble_content.media_menus.begin()->first); 711 bubble_content.media_menus.begin()->first);
699 712
700 // Then add camera access. 713 // Then add camera access.
701 microphone_camera_state |= TabSpecificContentSettings::CAMERA_ACCESSED; 714 microphone_camera_state |= TabSpecificContentSettings::CAMERA_ACCESSED;
702 content_settings->OnMediaStreamPermissionSet(security_origin, 715 content_settings->OnMediaStreamPermissionSet(security_origin,
703 microphone_camera_state, 716 microphone_camera_state,
704 GetDefaultAudioDevice(), 717 GetDefaultAudioDevice(),
705 GetDefaultVideoDevice(), 718 GetDefaultVideoDevice(),
706 std::string(), 719 std::string(),
707 std::string()); 720 std::string());
708 721
709 content_setting_bubble_model.reset( 722 content_setting_bubble_model.reset(
710 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 723 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
711 NULL, web_contents(), profile(), 724 NULL, web_contents(), profile(),
712 CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 725 CONTENT_SETTINGS_TYPE_MEDIASTREAM));
713 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 726 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
714 content_setting_bubble_model->bubble_content(); 727 content_setting_bubble_model->bubble_content();
715 EXPECT_EQ(new_bubble_content.title, 728 EXPECT_EQ(new_bubble_content.title,
716 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED)); 729 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED));
717 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 730 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
718 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 731 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
719 l10n_util::GetStringFUTF8( 732 l10n_util::GetStringFUTF8(
720 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION, 733 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION,
721 base::UTF8ToUTF16(request_host))); 734 FormatUrlForSecurityDisplay(security_origin,
735 profile()->GetPrefs()->GetString(
736 prefs::kAcceptLanguages))));
722 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 737 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
723 l10n_util::GetStringUTF8( 738 l10n_util::GetStringUTF8(
724 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK)); 739 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK));
725 EXPECT_EQ(0, new_bubble_content.radio_group.default_item); 740 EXPECT_EQ(0, new_bubble_content.radio_group.default_item);
726 EXPECT_EQ(2U, new_bubble_content.media_menus.size()); 741 EXPECT_EQ(2U, new_bubble_content.media_menus.size());
727 } 742 }
728 743
729 TEST_F(ContentSettingBubbleModelTest, Plugins) { 744 TEST_F(ContentSettingBubbleModelTest, Plugins) {
730 TabSpecificContentSettings* content_settings = 745 TabSpecificContentSettings* content_settings =
731 TabSpecificContentSettings::FromWebContents(web_contents()); 746 TabSpecificContentSettings::FromWebContents(web_contents());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 { 962 {
948 ProtocolHandler handler = registry.GetHandlerFor("mailto"); 963 ProtocolHandler handler = registry.GetHandlerFor("mailto");
949 ASSERT_FALSE(handler.IsEmpty()); 964 ASSERT_FALSE(handler.IsEmpty());
950 EXPECT_EQ(CONTENT_SETTING_ALLOW, 965 EXPECT_EQ(CONTENT_SETTING_ALLOW,
951 content_settings->pending_protocol_handler_setting()); 966 content_settings->pending_protocol_handler_setting());
952 EXPECT_FALSE(registry.IsIgnored(test_handler)); 967 EXPECT_FALSE(registry.IsIgnored(test_handler));
953 } 968 }
954 969
955 registry.Shutdown(); 970 registry.Shutdown();
956 } 971 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | chrome/browser/ui/elide_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698