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

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

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 EXPECT_FALSE(bubble_content_2.title.empty()); 116 EXPECT_FALSE(bubble_content_2.title.empty());
117 EXPECT_NE(title, bubble_content_2.title); 117 EXPECT_NE(title, bubble_content_2.title);
118 ASSERT_EQ(2U, bubble_content_2.radio_group.radio_items.size()); 118 ASSERT_EQ(2U, bubble_content_2.radio_group.radio_items.size());
119 EXPECT_EQ(bubble_content_2.radio_group.radio_items[0], 119 EXPECT_EQ(bubble_content_2.radio_group.radio_items[0],
120 l10n_util::GetStringUTF8(IDS_ALLOWED_COOKIES_NO_ACTION)); 120 l10n_util::GetStringUTF8(IDS_ALLOWED_COOKIES_NO_ACTION));
121 EXPECT_EQ(bubble_content_2.radio_group.radio_items[1], 121 EXPECT_EQ(bubble_content_2.radio_group.radio_items[1],
122 l10n_util::GetStringFUTF8( 122 l10n_util::GetStringFUTF8(
123 IDS_ALLOWED_COOKIES_BLOCK, 123 IDS_ALLOWED_COOKIES_BLOCK,
124 url_formatter::FormatUrlForSecurityDisplay( 124 url_formatter::FormatUrlForSecurityDisplay(
125 web_contents()->GetURL(), profile()->GetPrefs()->GetString( 125 web_contents()->GetURL())));
126 prefs::kAcceptLanguages))));
127 EXPECT_FALSE(bubble_content_2.custom_link.empty()); 126 EXPECT_FALSE(bubble_content_2.custom_link.empty());
128 EXPECT_TRUE(bubble_content_2.custom_link_enabled); 127 EXPECT_TRUE(bubble_content_2.custom_link_enabled);
129 EXPECT_FALSE(bubble_content_2.manage_link.empty()); 128 EXPECT_FALSE(bubble_content_2.manage_link.empty());
130 } 129 }
131 130
132 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) { 131 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) {
133 // Required to break dependency on BrowserMainLoop. 132 // Required to break dependency on BrowserMainLoop.
134 MediaCaptureDevicesDispatcher::GetInstance()-> 133 MediaCaptureDevicesDispatcher::GetInstance()->
135 DisableDeviceEnumerationForTesting(); 134 DisableDeviceEnumerationForTesting();
136 135
(...skipping 15 matching lines...) Expand all
152 new ContentSettingMediaStreamBubbleModel( 151 new ContentSettingMediaStreamBubbleModel(
153 nullptr, web_contents(), profile())); 152 nullptr, web_contents(), profile()));
154 const ContentSettingBubbleModel::BubbleContent& bubble_content = 153 const ContentSettingBubbleModel::BubbleContent& bubble_content =
155 content_setting_bubble_model->bubble_content(); 154 content_setting_bubble_model->bubble_content();
156 EXPECT_EQ(bubble_content.title, 155 EXPECT_EQ(bubble_content.title,
157 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED)); 156 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED));
158 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 157 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
159 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 158 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
160 l10n_util::GetStringFUTF8( 159 l10n_util::GetStringFUTF8(
161 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION, 160 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION,
162 url_formatter::FormatUrlForSecurityDisplay( 161 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
163 security_origin, profile()->GetPrefs()->GetString(
164 prefs::kAcceptLanguages))));
165 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 162 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
166 l10n_util::GetStringUTF8( 163 l10n_util::GetStringUTF8(
167 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK)); 164 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK));
168 EXPECT_EQ(0, bubble_content.radio_group.default_item); 165 EXPECT_EQ(0, bubble_content.radio_group.default_item);
169 EXPECT_TRUE(bubble_content.custom_link.empty()); 166 EXPECT_TRUE(bubble_content.custom_link.empty());
170 EXPECT_FALSE(bubble_content.custom_link_enabled); 167 EXPECT_FALSE(bubble_content.custom_link_enabled);
171 EXPECT_FALSE(bubble_content.manage_link.empty()); 168 EXPECT_FALSE(bubble_content.manage_link.empty());
172 EXPECT_EQ(2U, bubble_content.media_menus.size()); 169 EXPECT_EQ(2U, bubble_content.media_menus.size());
173 } 170 }
174 171
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 new ContentSettingMediaStreamBubbleModel( 510 new ContentSettingMediaStreamBubbleModel(
514 nullptr, web_contents(), profile())); 511 nullptr, web_contents(), profile()));
515 const ContentSettingBubbleModel::BubbleContent& bubble_content = 512 const ContentSettingBubbleModel::BubbleContent& bubble_content =
516 content_setting_bubble_model->bubble_content(); 513 content_setting_bubble_model->bubble_content();
517 EXPECT_EQ(bubble_content.title, 514 EXPECT_EQ(bubble_content.title,
518 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED)); 515 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED));
519 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 516 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
520 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 517 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
521 l10n_util::GetStringFUTF8( 518 l10n_util::GetStringFUTF8(
522 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION, 519 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION,
523 url_formatter::FormatUrlForSecurityDisplay( 520 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
524 security_origin, profile()->GetPrefs()->GetString(
525 prefs::kAcceptLanguages))));
526 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 521 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
527 l10n_util::GetStringUTF8( 522 l10n_util::GetStringUTF8(
528 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK)); 523 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK));
529 EXPECT_EQ(0, bubble_content.radio_group.default_item); 524 EXPECT_EQ(0, bubble_content.radio_group.default_item);
530 EXPECT_TRUE(bubble_content.custom_link.empty()); 525 EXPECT_TRUE(bubble_content.custom_link.empty());
531 EXPECT_FALSE(bubble_content.custom_link_enabled); 526 EXPECT_FALSE(bubble_content.custom_link_enabled);
532 EXPECT_FALSE(bubble_content.manage_link.empty()); 527 EXPECT_FALSE(bubble_content.manage_link.empty());
533 EXPECT_EQ(1U, bubble_content.media_menus.size()); 528 EXPECT_EQ(1U, bubble_content.media_menus.size());
534 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 529 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
535 bubble_content.media_menus.begin()->first); 530 bubble_content.media_menus.begin()->first);
(...skipping 10 matching lines...) Expand all
546 new ContentSettingMediaStreamBubbleModel( 541 new ContentSettingMediaStreamBubbleModel(
547 nullptr, web_contents(), profile())); 542 nullptr, web_contents(), profile()));
548 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 543 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
549 content_setting_bubble_model->bubble_content(); 544 content_setting_bubble_model->bubble_content();
550 EXPECT_EQ(new_bubble_content.title, 545 EXPECT_EQ(new_bubble_content.title,
551 l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED)); 546 l10n_util::GetStringUTF8(IDS_MICROPHONE_BLOCKED));
552 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 547 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
553 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 548 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
554 l10n_util::GetStringFUTF8( 549 l10n_util::GetStringFUTF8(
555 IDS_BLOCKED_MEDIASTREAM_MIC_ASK, 550 IDS_BLOCKED_MEDIASTREAM_MIC_ASK,
556 url_formatter::FormatUrlForSecurityDisplay( 551 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
557 security_origin, profile()->GetPrefs()->GetString(
558 prefs::kAcceptLanguages))));
559 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 552 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
560 l10n_util::GetStringUTF8( 553 l10n_util::GetStringUTF8(
561 IDS_BLOCKED_MEDIASTREAM_MIC_NO_ACTION)); 554 IDS_BLOCKED_MEDIASTREAM_MIC_NO_ACTION));
562 EXPECT_EQ(1, new_bubble_content.radio_group.default_item); 555 EXPECT_EQ(1, new_bubble_content.radio_group.default_item);
563 EXPECT_TRUE(new_bubble_content.custom_link.empty()); 556 EXPECT_TRUE(new_bubble_content.custom_link.empty());
564 EXPECT_FALSE(new_bubble_content.custom_link_enabled); 557 EXPECT_FALSE(new_bubble_content.custom_link_enabled);
565 EXPECT_FALSE(new_bubble_content.manage_link.empty()); 558 EXPECT_FALSE(new_bubble_content.manage_link.empty());
566 EXPECT_EQ(1U, new_bubble_content.media_menus.size()); 559 EXPECT_EQ(1U, new_bubble_content.media_menus.size());
567 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 560 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
568 new_bubble_content.media_menus.begin()->first); 561 new_bubble_content.media_menus.begin()->first);
(...skipping 21 matching lines...) Expand all
590 new ContentSettingMediaStreamBubbleModel( 583 new ContentSettingMediaStreamBubbleModel(
591 nullptr, web_contents(), profile())); 584 nullptr, web_contents(), profile()));
592 const ContentSettingBubbleModel::BubbleContent& bubble_content = 585 const ContentSettingBubbleModel::BubbleContent& bubble_content =
593 content_setting_bubble_model->bubble_content(); 586 content_setting_bubble_model->bubble_content();
594 EXPECT_EQ(bubble_content.title, 587 EXPECT_EQ(bubble_content.title,
595 l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED)); 588 l10n_util::GetStringUTF8(IDS_CAMERA_ACCESSED));
596 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 589 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
597 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 590 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
598 l10n_util::GetStringFUTF8( 591 l10n_util::GetStringFUTF8(
599 IDS_ALLOWED_MEDIASTREAM_CAMERA_NO_ACTION, 592 IDS_ALLOWED_MEDIASTREAM_CAMERA_NO_ACTION,
600 url_formatter::FormatUrlForSecurityDisplay( 593 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
601 security_origin, profile()->GetPrefs()->GetString(
602 prefs::kAcceptLanguages))));
603 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 594 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
604 l10n_util::GetStringUTF8( 595 l10n_util::GetStringUTF8(
605 IDS_ALLOWED_MEDIASTREAM_CAMERA_BLOCK)); 596 IDS_ALLOWED_MEDIASTREAM_CAMERA_BLOCK));
606 EXPECT_EQ(0, bubble_content.radio_group.default_item); 597 EXPECT_EQ(0, bubble_content.radio_group.default_item);
607 EXPECT_TRUE(bubble_content.custom_link.empty()); 598 EXPECT_TRUE(bubble_content.custom_link.empty());
608 EXPECT_FALSE(bubble_content.custom_link_enabled); 599 EXPECT_FALSE(bubble_content.custom_link_enabled);
609 EXPECT_FALSE(bubble_content.manage_link.empty()); 600 EXPECT_FALSE(bubble_content.manage_link.empty());
610 EXPECT_EQ(1U, bubble_content.media_menus.size()); 601 EXPECT_EQ(1U, bubble_content.media_menus.size());
611 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE, 602 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE,
612 bubble_content.media_menus.begin()->first); 603 bubble_content.media_menus.begin()->first);
(...skipping 10 matching lines...) Expand all
623 new ContentSettingMediaStreamBubbleModel( 614 new ContentSettingMediaStreamBubbleModel(
624 nullptr, web_contents(), profile())); 615 nullptr, web_contents(), profile()));
625 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 616 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
626 content_setting_bubble_model->bubble_content(); 617 content_setting_bubble_model->bubble_content();
627 EXPECT_EQ(new_bubble_content.title, 618 EXPECT_EQ(new_bubble_content.title,
628 l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED)); 619 l10n_util::GetStringUTF8(IDS_CAMERA_BLOCKED));
629 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 620 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
630 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 621 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
631 l10n_util::GetStringFUTF8( 622 l10n_util::GetStringFUTF8(
632 IDS_BLOCKED_MEDIASTREAM_CAMERA_ASK, 623 IDS_BLOCKED_MEDIASTREAM_CAMERA_ASK,
633 url_formatter::FormatUrlForSecurityDisplay( 624 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
634 security_origin, profile()->GetPrefs()->GetString(
635 prefs::kAcceptLanguages))));
636 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 625 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
637 l10n_util::GetStringUTF8( 626 l10n_util::GetStringUTF8(
638 IDS_BLOCKED_MEDIASTREAM_CAMERA_NO_ACTION)); 627 IDS_BLOCKED_MEDIASTREAM_CAMERA_NO_ACTION));
639 EXPECT_EQ(1, new_bubble_content.radio_group.default_item); 628 EXPECT_EQ(1, new_bubble_content.radio_group.default_item);
640 EXPECT_TRUE(new_bubble_content.custom_link.empty()); 629 EXPECT_TRUE(new_bubble_content.custom_link.empty());
641 EXPECT_FALSE(new_bubble_content.custom_link_enabled); 630 EXPECT_FALSE(new_bubble_content.custom_link_enabled);
642 EXPECT_FALSE(new_bubble_content.manage_link.empty()); 631 EXPECT_FALSE(new_bubble_content.manage_link.empty());
643 EXPECT_EQ(1U, new_bubble_content.media_menus.size()); 632 EXPECT_EQ(1U, new_bubble_content.media_menus.size());
644 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE, 633 EXPECT_EQ(content::MEDIA_DEVICE_VIDEO_CAPTURE,
645 new_bubble_content.media_menus.begin()->first); 634 new_bubble_content.media_menus.begin()->first);
(...skipping 23 matching lines...) Expand all
669 new ContentSettingMediaStreamBubbleModel( 658 new ContentSettingMediaStreamBubbleModel(
670 nullptr, web_contents(), profile())); 659 nullptr, web_contents(), profile()));
671 const ContentSettingBubbleModel::BubbleContent& bubble_content = 660 const ContentSettingBubbleModel::BubbleContent& bubble_content =
672 content_setting_bubble_model->bubble_content(); 661 content_setting_bubble_model->bubble_content();
673 EXPECT_EQ(bubble_content.title, 662 EXPECT_EQ(bubble_content.title,
674 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED)); 663 l10n_util::GetStringUTF8(IDS_MICROPHONE_ACCESSED));
675 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 664 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
676 EXPECT_EQ(bubble_content.radio_group.radio_items[0], 665 EXPECT_EQ(bubble_content.radio_group.radio_items[0],
677 l10n_util::GetStringFUTF8( 666 l10n_util::GetStringFUTF8(
678 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION, 667 IDS_ALLOWED_MEDIASTREAM_MIC_NO_ACTION,
679 url_formatter::FormatUrlForSecurityDisplay( 668 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
680 security_origin, profile()->GetPrefs()->GetString(
681 prefs::kAcceptLanguages))));
682 EXPECT_EQ(bubble_content.radio_group.radio_items[1], 669 EXPECT_EQ(bubble_content.radio_group.radio_items[1],
683 l10n_util::GetStringUTF8( 670 l10n_util::GetStringUTF8(
684 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK)); 671 IDS_ALLOWED_MEDIASTREAM_MIC_BLOCK));
685 EXPECT_EQ(0, bubble_content.radio_group.default_item); 672 EXPECT_EQ(0, bubble_content.radio_group.default_item);
686 EXPECT_EQ(1U, bubble_content.media_menus.size()); 673 EXPECT_EQ(1U, bubble_content.media_menus.size());
687 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE, 674 EXPECT_EQ(content::MEDIA_DEVICE_AUDIO_CAPTURE,
688 bubble_content.media_menus.begin()->first); 675 bubble_content.media_menus.begin()->first);
689 676
690 // Then add camera access. 677 // Then add camera access.
691 microphone_camera_state |= TabSpecificContentSettings::CAMERA_ACCESSED; 678 microphone_camera_state |= TabSpecificContentSettings::CAMERA_ACCESSED;
692 content_settings->OnMediaStreamPermissionSet(security_origin, 679 content_settings->OnMediaStreamPermissionSet(security_origin,
693 microphone_camera_state, 680 microphone_camera_state,
694 GetDefaultAudioDevice(), 681 GetDefaultAudioDevice(),
695 GetDefaultVideoDevice(), 682 GetDefaultVideoDevice(),
696 std::string(), 683 std::string(),
697 std::string()); 684 std::string());
698 685
699 content_setting_bubble_model.reset( 686 content_setting_bubble_model.reset(
700 new ContentSettingMediaStreamBubbleModel( 687 new ContentSettingMediaStreamBubbleModel(
701 nullptr, web_contents(), profile())); 688 nullptr, web_contents(), profile()));
702 const ContentSettingBubbleModel::BubbleContent& new_bubble_content = 689 const ContentSettingBubbleModel::BubbleContent& new_bubble_content =
703 content_setting_bubble_model->bubble_content(); 690 content_setting_bubble_model->bubble_content();
704 EXPECT_EQ(new_bubble_content.title, 691 EXPECT_EQ(new_bubble_content.title,
705 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED)); 692 l10n_util::GetStringUTF8(IDS_MICROPHONE_CAMERA_ALLOWED));
706 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size()); 693 EXPECT_EQ(2U, new_bubble_content.radio_group.radio_items.size());
707 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0], 694 EXPECT_EQ(new_bubble_content.radio_group.radio_items[0],
708 l10n_util::GetStringFUTF8( 695 l10n_util::GetStringFUTF8(
709 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION, 696 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_NO_ACTION,
710 url_formatter::FormatUrlForSecurityDisplay( 697 url_formatter::FormatUrlForSecurityDisplay(security_origin)));
711 security_origin, profile()->GetPrefs()->GetString(
712 prefs::kAcceptLanguages))));
713 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1], 698 EXPECT_EQ(new_bubble_content.radio_group.radio_items[1],
714 l10n_util::GetStringUTF8( 699 l10n_util::GetStringUTF8(
715 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK)); 700 IDS_ALLOWED_MEDIASTREAM_MIC_AND_CAMERA_BLOCK));
716 EXPECT_EQ(0, new_bubble_content.radio_group.default_item); 701 EXPECT_EQ(0, new_bubble_content.radio_group.default_item);
717 EXPECT_EQ(2U, new_bubble_content.media_menus.size()); 702 EXPECT_EQ(2U, new_bubble_content.media_menus.size());
718 } 703 }
719 704
720 TEST_F(ContentSettingBubbleModelTest, Plugins) { 705 TEST_F(ContentSettingBubbleModelTest, Plugins) {
721 TabSpecificContentSettings* content_settings = 706 TabSpecificContentSettings* content_settings =
722 TabSpecificContentSettings::FromWebContents(web_contents()); 707 TabSpecificContentSettings::FromWebContents(web_contents());
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 { 915 {
931 ProtocolHandler handler = registry.GetHandlerFor("mailto"); 916 ProtocolHandler handler = registry.GetHandlerFor("mailto");
932 ASSERT_FALSE(handler.IsEmpty()); 917 ASSERT_FALSE(handler.IsEmpty());
933 EXPECT_EQ(CONTENT_SETTING_ALLOW, 918 EXPECT_EQ(CONTENT_SETTING_ALLOW,
934 content_settings->pending_protocol_handler_setting()); 919 content_settings->pending_protocol_handler_setting());
935 EXPECT_FALSE(registry.IsIgnored(test_handler)); 920 EXPECT_FALSE(registry.IsIgnored(test_handler));
936 } 921 }
937 922
938 registry.Shutdown(); 923 registry.Shutdown();
939 } 924 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | chrome/browser/ui/login/login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698