#include "content/browser/renderer_host/navigation_entry_impl.h"
#include <memory>
#include <string>
#include <utility>
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_file_util.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/navigation_entry_restore_context_impl.h"
#include "content/browser/site_instance_impl.h"
#include "content/public/browser/ssl_status.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/page_state/page_state_serialization.h"
ASCIIToUTF16;
namespace content {
namespace {
blink::PageState CreateTestPageState() { … }
}
class NavigationEntryTest : public testing::Test { … };
TEST_F(NavigationEntryTest, NavigationEntryUniqueIDs) { … }
TEST_F(NavigationEntryTest, NavigationEntryURLs) { … }
TEST_F(NavigationEntryTest, NavigationEntryFavicons) { … }
TEST_F(NavigationEntryTest, NavigationEntrySSLStatus) { … }
TEST_F(NavigationEntryTest, NavigationEntryAccessors) { … }
TEST_F(NavigationEntryTest, NavigationEntryClone) { … }
TEST_F(NavigationEntryTest, NavigationEntryTimestamps) { … }
TEST_F(NavigationEntryTest, SetPageStateWithCorruptedSequenceNumbers) { … }
TEST_F(NavigationEntryTest, SetPageStateWithDefaultSequenceNumbers) { … }
#if BUILDFLAG(IS_ANDROID)
TEST_F(NavigationEntryTest, DISABLED_NavigationEntryContentUri) {
base::FilePath image_path;
EXPECT_TRUE(
base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &image_path));
image_path = image_path.Append(FILE_PATH_LITERAL("content"));
image_path = image_path.Append(FILE_PATH_LITERAL("test"));
image_path = image_path.Append(FILE_PATH_LITERAL("data"));
image_path = image_path.Append(FILE_PATH_LITERAL("blank.jpg"));
EXPECT_TRUE(base::PathExists(image_path));
base::FilePath content_uri = base::InsertImageIntoMediaStore(image_path);
entry1_->SetURL(GURL(content_uri.value()));
EXPECT_EQ(u"blank.jpg", entry1_->GetTitleForDisplay());
}
#endif
}