| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/website_settings/permission_bubble_browser_test_util
.h" | 5 #include "chrome/browser/ui/website_settings/permission_bubble_browser_test_util
.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/permissions/mock_permission_request.h" | 9 #include "chrome/browser/permissions/mock_permission_request.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 "Request 1", l10n_util::GetStringUTF8(IDS_PERMISSION_ALLOW), | 35 "Request 1", l10n_util::GetStringUTF8(IDS_PERMISSION_ALLOW), |
| 36 l10n_util::GetStringUTF8(IDS_PERMISSION_DENY)); | 36 l10n_util::GetStringUTF8(IDS_PERMISSION_DENY)); |
| 37 requests_.push_back(request); | 37 requests_.push_back(request); |
| 38 } | 38 } |
| 39 | 39 |
| 40 Browser* PermissionBubbleBrowserTest::OpenExtensionAppWindow() { | 40 Browser* PermissionBubbleBrowserTest::OpenExtensionAppWindow() { |
| 41 auto* extension = | 41 auto* extension = |
| 42 LoadExtension(test_data_dir_.AppendASCII("app_with_panel_container/")); | 42 LoadExtension(test_data_dir_.AppendASCII("app_with_panel_container/")); |
| 43 CHECK(extension); | 43 CHECK(extension); |
| 44 | 44 |
| 45 AppLaunchParams params(browser()->profile(), extension, | 45 AppLaunchParams params( |
| 46 extensions::LAUNCH_CONTAINER_PANEL, NEW_WINDOW, | 46 browser()->profile(), extension, extensions::LAUNCH_CONTAINER_PANEL, |
| 47 extensions::SOURCE_TEST); | 47 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_TEST); |
| 48 | 48 |
| 49 content::WebContents* app_window = OpenApplication(params); | 49 content::WebContents* app_window = OpenApplication(params); |
| 50 CHECK(app_window); | 50 CHECK(app_window); |
| 51 | 51 |
| 52 Browser* app_browser = chrome::FindBrowserWithWebContents(app_window); | 52 Browser* app_browser = chrome::FindBrowserWithWebContents(app_window); |
| 53 CHECK(app_browser); | 53 CHECK(app_browser); |
| 54 CHECK(app_browser->is_app()); | 54 CHECK(app_browser->is_app()); |
| 55 | 55 |
| 56 return app_browser; | 56 return app_browser; |
| 57 } | 57 } |
| 58 | 58 |
| 59 PermissionBubbleKioskBrowserTest::PermissionBubbleKioskBrowserTest() { | 59 PermissionBubbleKioskBrowserTest::PermissionBubbleKioskBrowserTest() { |
| 60 } | 60 } |
| 61 | 61 |
| 62 PermissionBubbleKioskBrowserTest::~PermissionBubbleKioskBrowserTest() { | 62 PermissionBubbleKioskBrowserTest::~PermissionBubbleKioskBrowserTest() { |
| 63 } | 63 } |
| 64 | 64 |
| 65 void PermissionBubbleKioskBrowserTest::SetUpCommandLine( | 65 void PermissionBubbleKioskBrowserTest::SetUpCommandLine( |
| 66 base::CommandLine* command_line) { | 66 base::CommandLine* command_line) { |
| 67 PermissionBubbleBrowserTest::SetUpCommandLine(command_line); | 67 PermissionBubbleBrowserTest::SetUpCommandLine(command_line); |
| 68 command_line->AppendSwitch(switches::kKioskMode); | 68 command_line->AppendSwitch(switches::kKioskMode); |
| 69 } | 69 } |
| OLD | NEW |