#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h"
#include <unordered_map>
#include <vector>
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory_test_util.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/infobars/content/content_infobar_manager.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_data.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/test/test_url_loader_factory.h"
#include "services/network/test/test_utils.h"
TestURLLoaderFactory;
class ChromeOmniboxNavigationObserverTest
: public ChromeRenderViewHostTestHarness { … };
void ChromeOmniboxNavigationObserverTest::SetUp() { … }
namespace {
scoped_refptr<net::HttpResponseHeaders> GetHeadersForResponseCode(int code) { … }
void WriteMojoMessage(const mojo::ScopedDataPipeProducerHandle& handle,
std::string message) { … }
}
TEST_F(ChromeOmniboxNavigationObserverTest, DeleteBrokenCustomSearchEngines) { … }
TEST_F(ChromeOmniboxNavigationObserverTest, AlternateNavInfoBar) { … }