blob: 5fb56f6a4c6f54ef5ca548b083ca440e91e60409 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_URL_LOADING_TEST_SCENE_URL_LOADING_SERVICE_H_
#define IOS_CHROME_BROWSER_URL_LOADING_TEST_SCENE_URL_LOADING_SERVICE_H_
#include "ios/chrome/browser/url_loading/scene_url_loading_service.h"
#import "ios/chrome/browser/url_loading/url_loading_params.h"
class Browser;
// Service used to manage url loading at application level.
class TestSceneUrlLoadingService : public SceneUrlLoadingService {
public:
TestSceneUrlLoadingService();
~TestSceneUrlLoadingService() override {}
// Opens a url based on |command| in a new tab.
void LoadUrlInNewTab(const UrlLoadParams& params) override;
// Returns the current browser.
Browser* GetCurrentBrowser() override;
// These are the last parameters passed to |LoadUrlInNewTab|.
UrlLoadParams last_params_;
int load_new_tab_call_count_ = 0;
// This can be set by the test.
Browser* current_browser_;
};
#endif // IOS_CHROME_BROWSER_URL_LOADING_TEST_SCENE_URL_LOADING_SERVICE_H_