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

Unified Diff: content/browser/web_contents/navigation_controller_impl_unittest.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 8116fab874294bf0be1538f7652ef1ee30e5c35d..736d98308342a221046c4f9fec2da0442008a42a 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -3593,7 +3593,7 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
screenshot_manager->TakeScreenshotFor(entry);
- EXPECT_TRUE(entry->screenshot());
+ EXPECT_TRUE(entry->screenshot().get());
}
NavigateAndCommit(GURL("https://foo/"));
@@ -3605,13 +3605,14 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < 2; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
}
for (int i = 2; i < controller.GetEntryCount() - 1; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_TRUE(entry->screenshot()) << "Screenshot not found for " << i;
+ EXPECT_TRUE(entry->screenshot().get()) << "Screenshot not found for " << i;
}
// Navigate to index 5 and then try to assign screenshot to all entries.
@@ -3627,7 +3628,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 10; i <= 12; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
screenshot_manager->TakeScreenshotFor(entry);
}
@@ -3644,7 +3646,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < 2; ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not purged";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not purged";
}
// Clear all screenshots.
@@ -3655,7 +3658,8 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
for (int i = 0; i < controller.GetEntryCount(); ++i) {
entry = NavigationEntryImpl::FromNavigationEntry(
controller.GetEntryAtIndex(i));
- EXPECT_FALSE(entry->screenshot()) << "Screenshot " << i << " not cleared";
+ EXPECT_FALSE(entry->screenshot().get()) << "Screenshot " << i
+ << " not cleared";
}
}
« no previous file with comments | « content/browser/streams/stream_handle_impl.cc ('k') | content/browser/web_contents/web_contents_screenshot_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698