OLD | NEW |
---|---|
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 <stdint.h> | 5 #include <stdint.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 | 150 |
151 void TestRenderViewTerminated(base::TerminationStatus status, | 151 void TestRenderViewTerminated(base::TerminationStatus status, |
152 int error_code) { | 152 int error_code) { |
153 RenderViewTerminated(GetMainFrame()->GetRenderViewHost(), status, | 153 RenderViewTerminated(GetMainFrame()->GetRenderViewHost(), status, |
154 error_code); | 154 error_code); |
155 } | 155 } |
156 | 156 |
157 bool is_showing() const { | 157 bool is_showing() const { |
158 return static_cast<TestRenderWidgetHostView*>( | 158 return static_cast<TestRenderWidgetHostView*>( |
159 GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()) | 159 GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()) |
160 ->is_showing(); | 160 ->IsShowing(); |
161 } | 161 } |
162 | 162 |
163 void ClearStates() { | 163 void ClearStates() { |
164 state_ = nullptr; | 164 state_ = nullptr; |
165 deleted_ = nullptr; | 165 deleted_ = nullptr; |
166 delegate_ = nullptr; | 166 delegate_ = nullptr; |
167 } | 167 } |
168 | 168 |
169 void CommandReceived() { | 169 void CommandReceived() { |
170 command_received_count_++; | 170 command_received_count_++; |
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1689 TestInterstitialPage::InterstitialState state = | 1689 TestInterstitialPage::InterstitialState state = |
1690 TestInterstitialPage::INVALID; | 1690 TestInterstitialPage::INVALID; |
1691 bool deleted = false; | 1691 bool deleted = false; |
1692 GURL url2("http://interstitial"); | 1692 GURL url2("http://interstitial"); |
1693 TestInterstitialPage* interstitial = | 1693 TestInterstitialPage* interstitial = |
1694 new TestInterstitialPage(contents(), true, url2, &state, &deleted); | 1694 new TestInterstitialPage(contents(), true, url2, &state, &deleted); |
1695 TestInterstitialPageStateGuard state_guard(interstitial); | 1695 TestInterstitialPageStateGuard state_guard(interstitial); |
1696 interstitial->Show(); | 1696 interstitial->Show(); |
1697 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); | 1697 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); |
1698 // The interstitial should not show until its navigation has committed. | 1698 // The interstitial should not show until its navigation has committed. |
1699 EXPECT_FALSE(interstitial->is_showing()); | 1699 EXPECT_TRUE(interstitial->is_showing()); |
no sievers
2016/02/18 21:22:09
Agreed that this was hardcoding the wrong expectat
no sievers
2016/02/18 21:29:43
Btw feel free to file a separate bug for someone v
johnme
2016/08/11 14:11:44
I've filed https://crbug.com/636953 to ask someone
| |
1700 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1700 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1701 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1701 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1702 // Let's commit the interstitial navigation. | 1702 // Let's commit the interstitial navigation. |
1703 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); | 1703 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); |
1704 EXPECT_TRUE(interstitial->is_showing()); | 1704 EXPECT_TRUE(interstitial->is_showing()); |
1705 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1705 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1706 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1706 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1707 entry = controller().GetVisibleEntry(); | 1707 entry = controller().GetVisibleEntry(); |
1708 ASSERT_NE(nullptr, entry); | 1708 ASSERT_NE(nullptr, entry); |
1709 EXPECT_TRUE(entry->GetURL() == url2); | 1709 EXPECT_TRUE(entry->GetURL() == url2); |
(...skipping 27 matching lines...) Expand all Loading... | |
1737 TestInterstitialPage::InterstitialState state = | 1737 TestInterstitialPage::InterstitialState state = |
1738 TestInterstitialPage::INVALID; | 1738 TestInterstitialPage::INVALID; |
1739 bool deleted = false; | 1739 bool deleted = false; |
1740 GURL url2("http://interstitial"); | 1740 GURL url2("http://interstitial"); |
1741 TestInterstitialPage* interstitial = | 1741 TestInterstitialPage* interstitial = |
1742 new TestInterstitialPage(contents(), true, url2, &state, &deleted); | 1742 new TestInterstitialPage(contents(), true, url2, &state, &deleted); |
1743 TestInterstitialPageStateGuard state_guard(interstitial); | 1743 TestInterstitialPageStateGuard state_guard(interstitial); |
1744 interstitial->Show(); | 1744 interstitial->Show(); |
1745 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); | 1745 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); |
1746 // The interstitial should not show until its navigation has committed. | 1746 // The interstitial should not show until its navigation has committed. |
1747 EXPECT_FALSE(interstitial->is_showing()); | 1747 EXPECT_TRUE(interstitial->is_showing()); |
1748 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1748 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1749 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1749 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1750 // Let's commit the interstitial navigation. | 1750 // Let's commit the interstitial navigation. |
1751 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); | 1751 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); |
1752 EXPECT_TRUE(interstitial->is_showing()); | 1752 EXPECT_TRUE(interstitial->is_showing()); |
1753 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1753 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1754 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1754 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1755 NavigationEntry* entry = controller().GetVisibleEntry(); | 1755 NavigationEntry* entry = controller().GetVisibleEntry(); |
1756 ASSERT_NE(nullptr, entry); | 1756 ASSERT_NE(nullptr, entry); |
1757 EXPECT_TRUE(entry->GetURL() == url2); | 1757 EXPECT_TRUE(entry->GetURL() == url2); |
(...skipping 24 matching lines...) Expand all Loading... | |
1782 // Show an interstitial. | 1782 // Show an interstitial. |
1783 TestInterstitialPage::InterstitialState state = | 1783 TestInterstitialPage::InterstitialState state = |
1784 TestInterstitialPage::INVALID; | 1784 TestInterstitialPage::INVALID; |
1785 bool deleted = false; | 1785 bool deleted = false; |
1786 GURL url2("http://interstitial"); | 1786 GURL url2("http://interstitial"); |
1787 TestInterstitialPage* interstitial = | 1787 TestInterstitialPage* interstitial = |
1788 new TestInterstitialPage(contents(), false, url2, &state, &deleted); | 1788 new TestInterstitialPage(contents(), false, url2, &state, &deleted); |
1789 TestInterstitialPageStateGuard state_guard(interstitial); | 1789 TestInterstitialPageStateGuard state_guard(interstitial); |
1790 interstitial->Show(); | 1790 interstitial->Show(); |
1791 // The interstitial should not show until its navigation has committed. | 1791 // The interstitial should not show until its navigation has committed. |
1792 EXPECT_FALSE(interstitial->is_showing()); | 1792 EXPECT_TRUE(interstitial->is_showing()); |
1793 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1793 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1794 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1794 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1795 // Let's commit the interstitial navigation. | 1795 // Let's commit the interstitial navigation. |
1796 interstitial->TestDidNavigate(1, 0, true, url2); | 1796 interstitial->TestDidNavigate(1, 0, true, url2); |
1797 EXPECT_TRUE(interstitial->is_showing()); | 1797 EXPECT_TRUE(interstitial->is_showing()); |
1798 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1798 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1799 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1799 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1800 NavigationEntry* entry = controller().GetVisibleEntry(); | 1800 NavigationEntry* entry = controller().GetVisibleEntry(); |
1801 ASSERT_NE(nullptr, entry); | 1801 ASSERT_NE(nullptr, entry); |
1802 // The URL specified to the interstitial should have been ignored. | 1802 // The URL specified to the interstitial should have been ignored. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1834 TestInterstitialPage::InterstitialState state = | 1834 TestInterstitialPage::InterstitialState state = |
1835 TestInterstitialPage::INVALID; | 1835 TestInterstitialPage::INVALID; |
1836 bool deleted = false; | 1836 bool deleted = false; |
1837 GURL url2("http://interstitial"); | 1837 GURL url2("http://interstitial"); |
1838 TestInterstitialPage* interstitial = | 1838 TestInterstitialPage* interstitial = |
1839 new TestInterstitialPage(contents(), true, url2, &state, &deleted); | 1839 new TestInterstitialPage(contents(), true, url2, &state, &deleted); |
1840 TestInterstitialPageStateGuard state_guard(interstitial); | 1840 TestInterstitialPageStateGuard state_guard(interstitial); |
1841 interstitial->Show(); | 1841 interstitial->Show(); |
1842 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); | 1842 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); |
1843 // The interstitial should not show until its navigation has committed. | 1843 // The interstitial should not show until its navigation has committed. |
1844 EXPECT_FALSE(interstitial->is_showing()); | 1844 EXPECT_TRUE(interstitial->is_showing()); |
1845 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1845 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1846 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1846 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1847 // Let's commit the interstitial navigation. | 1847 // Let's commit the interstitial navigation. |
1848 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); | 1848 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); |
1849 EXPECT_TRUE(interstitial->is_showing()); | 1849 EXPECT_TRUE(interstitial->is_showing()); |
1850 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1850 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1851 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1851 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1852 NavigationEntry* entry = controller().GetVisibleEntry(); | 1852 NavigationEntry* entry = controller().GetVisibleEntry(); |
1853 ASSERT_NE(nullptr, entry); | 1853 ASSERT_NE(nullptr, entry); |
1854 EXPECT_TRUE(entry->GetURL() == url2); | 1854 EXPECT_TRUE(entry->GetURL() == url2); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1894 TestInterstitialPage::InterstitialState state = | 1894 TestInterstitialPage::InterstitialState state = |
1895 TestInterstitialPage::INVALID; | 1895 TestInterstitialPage::INVALID; |
1896 bool deleted = false; | 1896 bool deleted = false; |
1897 GURL url2("http://interstitial"); | 1897 GURL url2("http://interstitial"); |
1898 TestInterstitialPage* interstitial = | 1898 TestInterstitialPage* interstitial = |
1899 new TestInterstitialPage(contents(), true, url2, &state, &deleted); | 1899 new TestInterstitialPage(contents(), true, url2, &state, &deleted); |
1900 TestInterstitialPageStateGuard state_guard(interstitial); | 1900 TestInterstitialPageStateGuard state_guard(interstitial); |
1901 interstitial->Show(); | 1901 interstitial->Show(); |
1902 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); | 1902 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); |
1903 // The interstitial should not show until its navigation has committed. | 1903 // The interstitial should not show until its navigation has committed. |
1904 EXPECT_FALSE(interstitial->is_showing()); | 1904 EXPECT_TRUE(interstitial->is_showing()); |
1905 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1905 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1906 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1906 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1907 // Let's commit the interstitial navigation. | 1907 // Let's commit the interstitial navigation. |
1908 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); | 1908 interstitial->TestDidNavigate(1, interstitial_entry_id, true, url2); |
1909 EXPECT_TRUE(interstitial->is_showing()); | 1909 EXPECT_TRUE(interstitial->is_showing()); |
1910 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1910 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1911 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1911 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1912 NavigationEntry* entry = controller().GetVisibleEntry(); | 1912 NavigationEntry* entry = controller().GetVisibleEntry(); |
1913 ASSERT_NE(nullptr, entry); | 1913 ASSERT_NE(nullptr, entry); |
1914 EXPECT_TRUE(entry->GetURL() == url2); | 1914 EXPECT_TRUE(entry->GetURL() == url2); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1951 // Show an interstitial. | 1951 // Show an interstitial. |
1952 TestInterstitialPage::InterstitialState state = | 1952 TestInterstitialPage::InterstitialState state = |
1953 TestInterstitialPage::INVALID; | 1953 TestInterstitialPage::INVALID; |
1954 bool deleted = false; | 1954 bool deleted = false; |
1955 GURL url2("http://interstitial"); | 1955 GURL url2("http://interstitial"); |
1956 TestInterstitialPage* interstitial = | 1956 TestInterstitialPage* interstitial = |
1957 new TestInterstitialPage(contents(), false, url2, &state, &deleted); | 1957 new TestInterstitialPage(contents(), false, url2, &state, &deleted); |
1958 TestInterstitialPageStateGuard state_guard(interstitial); | 1958 TestInterstitialPageStateGuard state_guard(interstitial); |
1959 interstitial->Show(); | 1959 interstitial->Show(); |
1960 // The interstitial should not show until its navigation has committed. | 1960 // The interstitial should not show until its navigation has committed. |
1961 EXPECT_FALSE(interstitial->is_showing()); | 1961 EXPECT_TRUE(interstitial->is_showing()); |
1962 EXPECT_FALSE(contents()->ShowingInterstitialPage()); | 1962 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
1963 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); | 1963 EXPECT_EQ(nullptr, contents()->GetInterstitialPage()); |
1964 // Let's commit the interstitial navigation. | 1964 // Let's commit the interstitial navigation. |
1965 interstitial->TestDidNavigate(1, 0, true, url2); | 1965 interstitial->TestDidNavigate(1, 0, true, url2); |
1966 EXPECT_TRUE(interstitial->is_showing()); | 1966 EXPECT_TRUE(interstitial->is_showing()); |
1967 EXPECT_TRUE(contents()->ShowingInterstitialPage()); | 1967 EXPECT_TRUE(contents()->ShowingInterstitialPage()); |
1968 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); | 1968 EXPECT_TRUE(contents()->GetInterstitialPage() == interstitial); |
1969 NavigationEntry* entry = controller().GetVisibleEntry(); | 1969 NavigationEntry* entry = controller().GetVisibleEntry(); |
1970 ASSERT_NE(nullptr, entry); | 1970 ASSERT_NE(nullptr, entry); |
1971 // The URL specified to the interstitial should have been ignored. | 1971 // The URL specified to the interstitial should have been ignored. |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2336 &state, &deleted); | 2336 &state, &deleted); |
2337 TestInterstitialPageStateGuard state_guard(interstitial); | 2337 TestInterstitialPageStateGuard state_guard(interstitial); |
2338 interstitial->Show(); | 2338 interstitial->Show(); |
2339 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); | 2339 int interstitial_entry_id = controller().GetTransientEntry()->GetUniqueID(); |
2340 | 2340 |
2341 // Let's simulate a navigation initiated from the browser before the | 2341 // Let's simulate a navigation initiated from the browser before the |
2342 // interstitial finishes loading. | 2342 // interstitial finishes loading. |
2343 const GURL url("http://www.google.com"); | 2343 const GURL url("http://www.google.com"); |
2344 controller().LoadURL( | 2344 controller().LoadURL( |
2345 url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); | 2345 url, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
2346 EXPECT_FALSE(interstitial->is_showing()); | 2346 EXPECT_FALSE(contents()->ShowingInterstitialPage()); |
2347 RunAllPendingInMessageLoop(); | 2347 RunAllPendingInMessageLoop(); |
2348 ASSERT_FALSE(deleted); | 2348 ASSERT_FALSE(deleted); |
2349 | 2349 |
2350 // Now let's make the interstitial navigation commit. | 2350 // Now let's make the interstitial navigation commit. |
2351 interstitial->TestDidNavigate(1, interstitial_entry_id, true, | 2351 interstitial->TestDidNavigate(1, interstitial_entry_id, true, |
2352 interstitial_url); | 2352 interstitial_url); |
2353 | 2353 |
2354 // After it loaded the interstitial should be gone. | 2354 // After it loaded the interstitial should be gone. |
2355 EXPECT_EQ(TestInterstitialPage::CANCELED, state); | 2355 EXPECT_EQ(TestInterstitialPage::CANCELED, state); |
2356 | 2356 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2689 | 2689 |
2690 TEST_F(WebContentsImplTest, CapturerPreventsHiding) { | 2690 TEST_F(WebContentsImplTest, CapturerPreventsHiding) { |
2691 const gfx::Size original_preferred_size(1024, 768); | 2691 const gfx::Size original_preferred_size(1024, 768); |
2692 contents()->UpdatePreferredSize(original_preferred_size); | 2692 contents()->UpdatePreferredSize(original_preferred_size); |
2693 | 2693 |
2694 TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( | 2694 TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( |
2695 contents()->GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()); | 2695 contents()->GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()); |
2696 | 2696 |
2697 // With no capturers, setting and un-setting occlusion should change the | 2697 // With no capturers, setting and un-setting occlusion should change the |
2698 // view's occlusion state. | 2698 // view's occlusion state. |
2699 EXPECT_FALSE(view->is_showing()); | 2699 EXPECT_TRUE(view->IsShowing()); |
2700 contents()->WasHidden(); | |
2701 EXPECT_FALSE(view->IsShowing()); | |
2700 contents()->WasShown(); | 2702 contents()->WasShown(); |
2701 EXPECT_TRUE(view->is_showing()); | 2703 EXPECT_TRUE(view->IsShowing()); |
2702 contents()->WasHidden(); | |
2703 EXPECT_FALSE(view->is_showing()); | |
2704 contents()->WasShown(); | |
2705 EXPECT_TRUE(view->is_showing()); | |
2706 | 2704 |
2707 // Add a capturer and try to hide the contents. The view will remain visible. | 2705 // Add a capturer and try to hide the contents. The view will remain visible. |
2708 contents()->IncrementCapturerCount(gfx::Size()); | 2706 contents()->IncrementCapturerCount(gfx::Size()); |
2709 contents()->WasHidden(); | 2707 contents()->WasHidden(); |
2710 EXPECT_TRUE(view->is_showing()); | 2708 EXPECT_TRUE(view->IsShowing()); |
2711 | 2709 |
2712 // Remove the capturer, and the WasHidden should take effect. | 2710 // Remove the capturer, and the WasHidden should take effect. |
2713 contents()->DecrementCapturerCount(); | 2711 contents()->DecrementCapturerCount(); |
2714 EXPECT_FALSE(view->is_showing()); | 2712 EXPECT_FALSE(view->IsShowing()); |
2715 } | 2713 } |
2716 | 2714 |
2717 TEST_F(WebContentsImplTest, CapturerPreventsOcclusion) { | 2715 TEST_F(WebContentsImplTest, CapturerPreventsOcclusion) { |
2718 const gfx::Size original_preferred_size(1024, 768); | 2716 const gfx::Size original_preferred_size(1024, 768); |
2719 contents()->UpdatePreferredSize(original_preferred_size); | 2717 contents()->UpdatePreferredSize(original_preferred_size); |
2720 | 2718 |
2721 TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( | 2719 TestRenderWidgetHostView* view = static_cast<TestRenderWidgetHostView*>( |
2722 contents()->GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()); | 2720 contents()->GetMainFrame()->GetRenderViewHost()->GetWidget()->GetView()); |
2723 | 2721 |
2724 // With no capturers, setting and un-setting occlusion should change the | 2722 // With no capturers, setting and un-setting occlusion should change the |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3377 backend->AllowCertForHost(*cert, test_url.host(), 1); | 3375 backend->AllowCertForHost(*cert, test_url.host(), 1); |
3378 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3376 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
3379 | 3377 |
3380 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", | 3378 contents()->OnDidLoadResourceFromMemoryCache(test_url, "", "GET", "mime type", |
3381 RESOURCE_TYPE_MAIN_FRAME); | 3379 RESOURCE_TYPE_MAIN_FRAME); |
3382 | 3380 |
3383 EXPECT_TRUE(backend->HasAllowException(test_url.host())); | 3381 EXPECT_TRUE(backend->HasAllowException(test_url.host())); |
3384 } | 3382 } |
3385 | 3383 |
3386 } // namespace content | 3384 } // namespace content |
OLD | NEW |