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

Side by Side Diff: chrome/browser/subresource_filter/subresource_filter_browsertest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 years, 4 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
« no previous file with comments | « chrome/browser/site_details.cc ('k') | chrome/browser/ui/android/bluetooth_chooser_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 "var data_url = 'data:text/html,<script src=\"%s\"></script>';" 844 "var data_url = 'data:text/html,<script src=\"%s\"></script>';"
845 "window.frames[0][0].location.href = data_url;", 845 "window.frames[0][0].location.href = data_url;",
846 included_url.spec().c_str()))); 846 included_url.spec().c_str())));
847 navigation_observer.Wait(); 847 navigation_observer.Wait();
848 848
849 content::RenderFrameHost* target = content::FrameMatchingPredicate( 849 content::RenderFrameHost* target = content::FrameMatchingPredicate(
850 web_contents(), base::Bind([](content::RenderFrameHost* rfh) { 850 web_contents(), base::Bind([](content::RenderFrameHost* rfh) {
851 return rfh->GetLastCommittedURL().scheme_piece() == url::kDataScheme; 851 return rfh->GetLastCommittedURL().scheme_piece() == url::kDataScheme;
852 })); 852 }));
853 ASSERT_NE(target, nullptr); 853 ASSERT_NE(target, nullptr);
854 EXPECT_TRUE(target->GetLastCommittedOrigin().unique()); 854 EXPECT_TRUE(target->GetLastCommittedOrigin().opaque());
855 855
856 EXPECT_EQ(content::AreAllSitesIsolatedForTesting(), 856 EXPECT_EQ(content::AreAllSitesIsolatedForTesting(),
857 WasParsedScriptElementLoaded(target)); 857 WasParsedScriptElementLoaded(target));
858 } 858 }
859 859
860 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, 860 IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest,
861 HistoryNavigationActivation) { 861 HistoryNavigationActivation) {
862 content::ConsoleObserverDelegate console_observer(web_contents(), 862 content::ConsoleObserverDelegate console_observer(web_contents(),
863 kActivationConsoleMessage); 863 kActivationConsoleMessage);
864 web_contents()->SetDelegate(&console_observer); 864 web_contents()->SetDelegate(&console_observer);
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 std::string(kSubresourceFilterOnlySuffix), 1948 std::string(kSubresourceFilterOnlySuffix),
1949 false, 1); 1949 false, 1);
1950 1950
1951 tester.ExpectUniqueSample(std::string(kMatchesPatternHistogramName) + 1951 tester.ExpectUniqueSample(std::string(kMatchesPatternHistogramName) +
1952 std::string(kPhishingInterstitialSuffix), 1952 std::string(kPhishingInterstitialSuffix),
1953 false, 1); 1953 false, 1);
1954 } 1954 }
1955 #endif 1955 #endif
1956 1956
1957 } // namespace subresource_filter 1957 } // namespace subresource_filter
OLDNEW
« no previous file with comments | « chrome/browser/site_details.cc ('k') | chrome/browser/ui/android/bluetooth_chooser_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698