| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_BROWSERTEST_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_BROWSERTEST_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/test/scoped_feature_list.h" | |
| 12 #include "chrome/test/base/in_process_browser_test.h" | |
| 13 | |
| 14 namespace content { | |
| 15 class RenderFrameHost; | |
| 16 } | |
| 17 | |
| 18 namespace options { | |
| 19 | |
| 20 class OptionsUIBrowserTest : public InProcessBrowserTest { | |
| 21 public: | |
| 22 OptionsUIBrowserTest(); | |
| 23 | |
| 24 void SetUpInProcessBrowserTestFixture() override; | |
| 25 | |
| 26 // Navigate to the Uber/Settings page and block until it has loaded. | |
| 27 void NavigateToSettings(); | |
| 28 | |
| 29 // Navigate to a certain subpage in the Uber/Settings page and block until it | |
| 30 // has loaded. | |
| 31 void NavigateToSettingsSubpage(const std::string& sub_page); | |
| 32 | |
| 33 // Navigate to the Settings frame and block until complete. | |
| 34 void NavigateToSettingsFrame(); | |
| 35 | |
| 36 // Check navbar's existence. | |
| 37 void VerifyNavbar(); | |
| 38 | |
| 39 // Verify that the page title is correct. | |
| 40 // The only guarantee we can make about the title of a settings tab is that | |
| 41 // it should contain IDS_SETTINGS_TITLE somewhere. | |
| 42 void VerifyTitle(); | |
| 43 | |
| 44 protected: | |
| 45 // Returns the RenderFrameHost associated with the Settings frame inside the | |
| 46 // Uber UI page (which must be already loaded). | |
| 47 content::RenderFrameHost* GetSettingsFrame(); | |
| 48 | |
| 49 private: | |
| 50 base::test::ScopedFeatureList disable_md_settings_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(OptionsUIBrowserTest); | |
| 53 }; | |
| 54 | |
| 55 } // namespace options | |
| 56 | |
| 57 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_UI_BROWSERTEST_H_ | |
| OLD | NEW |