Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/browser_process_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "apps/launcher.h" 9 #include "apps/launcher.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "extensions/browser/event_router.h" 49 #include "extensions/browser/event_router.h"
50 #include "extensions/browser/extension_prefs.h" 50 #include "extensions/browser/extension_prefs.h"
51 #include "extensions/browser/extension_registry.h" 51 #include "extensions/browser/extension_registry.h"
52 #include "extensions/browser/extension_registry_observer.h" 52 #include "extensions/browser/extension_registry_observer.h"
53 #include "extensions/browser/pref_names.h" 53 #include "extensions/browser/pref_names.h"
54 #include "extensions/common/api/app_runtime.h" 54 #include "extensions/common/api/app_runtime.h"
55 #include "extensions/common/constants.h" 55 #include "extensions/common/constants.h"
56 #include "extensions/test/extension_test_message_listener.h" 56 #include "extensions/test/extension_test_message_listener.h"
57 #include "extensions/test/result_catcher.h" 57 #include "extensions/test/result_catcher.h"
58 #include "net/test/embedded_test_server/embedded_test_server.h" 58 #include "net/test/embedded_test_server/embedded_test_server.h"
59 #include "printing/features/features.h"
59 #include "ui/base/window_open_disposition.h" 60 #include "ui/base/window_open_disposition.h"
60 #include "url/gurl.h" 61 #include "url/gurl.h"
61 62
62 #if defined(OS_CHROMEOS) 63 #if defined(OS_CHROMEOS)
63 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" 64 #include "chrome/browser/chromeos/login/users/mock_user_manager.h"
64 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" 65 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
65 #include "chromeos/dbus/dbus_thread_manager.h" 66 #include "chromeos/dbus/dbus_thread_manager.h"
66 #include "chromeos/dbus/fake_power_manager_client.h" 67 #include "chromeos/dbus/fake_power_manager_client.h"
67 #endif 68 #endif
68 69
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 113
113 const std::vector<content::WebContents*>& tabs() { return observed_tabs_; } 114 const std::vector<content::WebContents*>& tabs() { return observed_tabs_; }
114 115
115 private: 116 private:
116 size_t observations_; 117 size_t observations_;
117 std::vector<content::WebContents*> observed_tabs_; 118 std::vector<content::WebContents*> observed_tabs_;
118 119
119 DISALLOW_COPY_AND_ASSIGN(TabsAddedNotificationObserver); 120 DISALLOW_COPY_AND_ASSIGN(TabsAddedNotificationObserver);
120 }; 121 };
121 122
122 #if defined(ENABLE_PRINT_PREVIEW) 123 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
123 class ScopedPreviewTestingDelegate : PrintPreviewUI::TestingDelegate { 124 class ScopedPreviewTestingDelegate : PrintPreviewUI::TestingDelegate {
124 public: 125 public:
125 explicit ScopedPreviewTestingDelegate(bool auto_cancel) 126 explicit ScopedPreviewTestingDelegate(bool auto_cancel)
126 : auto_cancel_(auto_cancel), 127 : auto_cancel_(auto_cancel),
127 total_page_count_(1), 128 total_page_count_(1),
128 rendered_page_count_(0) { 129 rendered_page_count_(0) {
129 PrintPreviewUI::SetDelegateForTesting(this); 130 PrintPreviewUI::SetDelegateForTesting(this);
130 } 131 }
131 132
132 ~ScopedPreviewTestingDelegate() { 133 ~ScopedPreviewTestingDelegate() {
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DISABLED_WebContentsHasFocus) { 1133 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DISABLED_WebContentsHasFocus) {
1133 LoadAndLaunchPlatformApp("minimal", "Launched"); 1134 LoadAndLaunchPlatformApp("minimal", "Launched");
1134 1135
1135 EXPECT_EQ(1LU, GetAppWindowCount()); 1136 EXPECT_EQ(1LU, GetAppWindowCount());
1136 EXPECT_TRUE(GetFirstAppWindow() 1137 EXPECT_TRUE(GetFirstAppWindow()
1137 ->web_contents() 1138 ->web_contents()
1138 ->GetRenderWidgetHostView() 1139 ->GetRenderWidgetHostView()
1139 ->HasFocus()); 1140 ->HasFocus());
1140 } 1141 }
1141 1142
1142 #if defined(ENABLE_PRINT_PREVIEW) 1143 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
1143 1144
1144 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) 1145 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
1145 #define MAYBE_WindowDotPrintShouldBringUpPrintPreview \ 1146 #define MAYBE_WindowDotPrintShouldBringUpPrintPreview \
1146 DISABLED_WindowDotPrintShouldBringUpPrintPreview 1147 DISABLED_WindowDotPrintShouldBringUpPrintPreview
1147 #else 1148 #else
1148 #define MAYBE_WindowDotPrintShouldBringUpPrintPreview \ 1149 #define MAYBE_WindowDotPrintShouldBringUpPrintPreview \
1149 WindowDotPrintShouldBringUpPrintPreview 1150 WindowDotPrintShouldBringUpPrintPreview
1150 #endif 1151 #endif
1151 1152
1152 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 1153 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 // https://crbug.com/620194. 1383 // https://crbug.com/620194.
1383 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe 1384 #define MAYBE_AppWindowIframe DISABLED_AppWindowIframe
1384 // Sends chrome.test.sendMessage from chrome.app.window.create's callback. 1385 // Sends chrome.test.sendMessage from chrome.app.window.create's callback.
1385 // The app window also adds an <iframe> to the page during window.onload. 1386 // The app window also adds an <iframe> to the page during window.onload.
1386 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) { 1387 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_AppWindowIframe) {
1387 LoadAndLaunchPlatformApp("app_window_send_message", 1388 LoadAndLaunchPlatformApp("app_window_send_message",
1388 "APP_WINDOW_CREATE_CALLBACK"); 1389 "APP_WINDOW_CREATE_CALLBACK");
1389 } 1390 }
1390 1391
1391 } // namespace extensions 1392 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/browser_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698