| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/compose/compose_session.h" |
| 6 | |
| 7 | #include "base/test/scoped_feature_list.h" |
| 8 | #include "chrome/app/chrome_command_ids.h" |
| 9 | #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h" |
| 10 | #include "chrome/browser/ui/browser.h" |
| 11 | #include "chrome/browser/ui/tabs/tab_enums.h" |
| 12 | #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| Trevor Perrier | 230b7f2 | 2023-12-02 01:33:47 | [diff] [blame] | 13 | #include "chrome/browser/ui/webui/feedback/feedback_dialog.h" |
| Anthony Cui | aa990bb9 | 2023-11-29 21:05:33 | [diff] [blame] | 14 | #include "chrome/common/pref_names.h" |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 15 | #include "chrome/test/base/in_process_browser_test.h" |
| 16 | #include "chrome/test/base/ui_test_utils.h" |
| Trevor Perrier | 230b7f2 | 2023-12-02 01:33:47 | [diff] [blame] | 17 | #include "chrome/test/interaction/interactive_browser_test.h" |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 18 | #include "components/compose/core/browser/compose_features.h" |
| 19 | #include "components/optimization_guide/core/optimization_guide_features.h" |
| Anthony Cui | aa990bb9 | 2023-11-29 21:05:33 | [diff] [blame] | 20 | #include "components/prefs/pref_service.h" |
| 21 | #include "components/unified_consent/pref_names.h" |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 22 | #include "content/public/browser/web_contents.h" |
| 23 | #include "content/public/test/browser_test.h" |
| 24 | #include "content/public/test/browser_test_utils.h" |
| 25 | #include "ui/gfx/geometry/point_conversions.h" |
| Trevor Perrier | 230b7f2 | 2023-12-02 01:33:47 | [diff] [blame] | 26 | #include "ui/views/interaction/interaction_test_util_views.h" |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 27 | |
| Anthony Cui | aa990bb9 | 2023-11-29 21:05:33 | [diff] [blame] | 28 | using ComposeClientPrefsBrowserTest = InProcessBrowserTest; |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 29 | |
| Anthony Cui | aa990bb9 | 2023-11-29 21:05:33 | [diff] [blame] | 30 | namespace compose { |
| Rakina Zata Amni | 833b431 | 2023-11-29 06:13:52 | [diff] [blame] | 31 | |
| Trevor Perrier | 230b7f2 | 2023-12-02 01:33:47 | [diff] [blame] | 32 | class ComposeSessionBrowserTest : public InteractiveBrowserTest { |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 33 | public: |
| 34 | void SetUp() override { |
| 35 | feature_list()->InitWithFeatures( |
| 36 | {compose::features::kEnableCompose, |
| 37 | optimization_guide::features::kOptimizationGuideModelExecution}, |
| 38 | {}); |
| Justin DeWitt | cf1b2c8 | 2023-12-22 02:01:13 | [diff] [blame] | 39 | InteractiveBrowserTest::SetUp(); |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 40 | } |
| 41 | |
| Carlos Knippschild | b20a5d7 | 2024-01-04 01:06:56 | [diff] [blame^] | 42 | void TearDown() override { ComposeEnabling::SetEnabledForTesting(false); } |
| 43 | |
| Justin DeWitt | eda1c0c | 2023-11-14 20:01:00 | [diff] [blame] | 44 | base::test::ScopedFeatureList* feature_list() { return &feature_list_; } |
| 45 | |
| 46 | protected: |
| 47 | base::test::ScopedFeatureList feature_list_; |
| 48 | }; |
| 49 | |
| Justin DeWitt |
|