blob: 8863f2025238386d955e6a0b22214621947587ab [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_APP_INTERFACE_H_
#define IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_APP_INTERFACE_H_
#import <Foundation/Foundation.h>
// Contains the app-side implementation of helpers.
@interface OmniboxAppInterface : NSObject
// Rewrite google URLs to localhost so they can be loaded by the test server.
+ (void)rewriteGoogleURLToLocalhost;
// Forces a variation to be used on the current HTTP header provider. Returns
// YES if the forcing was successful.
+ (BOOL)forceVariationID:(int)variationID;
// Blocks `URL` from most visited sites.
+ (void)blockURLFromTopSites:(NSString*)URL;
// Set up a service that serves custom search suggestions in the omnibox. These
// replace suggestions provided by the suggest server. Fake suggestions are
// loaded from `filename` (json) and the file must be in
// ios/test/chrome/data/omnibox/. Fake suggestions can be generated with
// chrome://suggest-internals available on Desktop. The service must be teared
// down with `tearDownFakeSuggestionsService`.
+ (void)setUpFakeSuggestionsService:(NSString*)filename;
// Tear down test fake suggestions service.
+ (void)tearDownFakeSuggestionsService;
@end
#endif // IOS_CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_APP_INTERFACE_H_