#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/utility/importer/bookmark_html_reader.h"
#include <stddef.h>
#include <string>
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/importer/imported_bookmark_entry.h"
#include "testing/gtest/include/gtest/gtest.h"
ASCIIToUTF16;
UTF16ToWide;
namespace bookmark_html_reader {
TEST(BookmarkHTMLReaderTest, ParseTests) { … }
TEST(BookmarkHTMLReaderTest, CanImportURLAsSearchEngineTest) { … }
namespace {
class BookmarkHTMLReaderTestWithData : public testing::Test { … };
void BookmarkHTMLReaderTestWithData::SetUp() { … }
void BookmarkHTMLReaderTestWithData::ExpectFirstFirefox2Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectSecondFirefox2Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectThirdFirefox2Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectFirstEpiphanyBookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectSecondEpiphanyBookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectFirstFirefox23Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectSecondFirefox23Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectThirdFirefox23Bookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectFirstFirefoxBookmarkWithKeyword(
const importer::SearchEngineInfo& info) { … }
void BookmarkHTMLReaderTestWithData::ExpectSecondFirefoxBookmarkWithKeyword(
const importer::SearchEngineInfo& info) { … }
void BookmarkHTMLReaderTestWithData::ExpectFirstEmptyFolderBookmark(
const ImportedBookmarkEntry& entry) { … }
void BookmarkHTMLReaderTestWithData::ExpectSecondEmptyFolderBookmark(
const ImportedBookmarkEntry& entry) { … }
}
TEST_F(BookmarkHTMLReaderTestWithData, Firefox2BookmarkFileImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData, BookmarkFileWithHrTagImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData, EpiphanyBookmarkFileImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData, FirefoxBookmarkFileWithKeywordImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData, EmptyFolderImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData,
RedditSaverFileImport) { … }
TEST_F(BookmarkHTMLReaderTestWithData,
InternetExplorerBookmarkFileWithoutCharsetImport) { … }
namespace {
class CancelAfterFifteenCalls { … };
}
TEST_F(BookmarkHTMLReaderTestWithData, CancellationCallback) { … }
namespace {
bool IsURLValid(const GURL& url) { … }
}
TEST_F(BookmarkHTMLReaderTestWithData, ValidURLCallback) { … }
}