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

Side by Side Diff: chrome/browser/extensions/api/management/management_apitest.cc

Issue 1299823002: Disable new bookmark apps on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer feedback Created 5 years, 4 months 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 | « no previous file | chrome/browser/extensions/extension_util.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 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 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 <map> 5 #include <map>
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_util.h" 10 #include "chrome/browser/extensions/extension_util.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 309
310 std::string app_id_new; 310 std::string app_id_new;
311 LoadAndWaitForLaunch("management/launch_app_tab", &app_id_new); 311 LoadAndWaitForLaunch("management/launch_app_tab", &app_id_new);
312 ASSERT_FALSE(HasFatalFailure()); 312 ASSERT_FALSE(HasFatalFailure());
313 313
314 // If the ID changed, then the pref will not apply to the app. 314 // If the ID changed, then the pref will not apply to the app.
315 ASSERT_EQ(app_id, app_id_new); 315 ASSERT_EQ(app_id, app_id_new);
316 316
317 unsigned expected_browser_count = 2; 317 unsigned expected_browser_count = 2;
318 #if defined(OS_MACOSX) 318 #if defined(OS_MACOSX)
319 // With the new Bookmark Apps, Mac currently has standalone browser 319 // Without the new Bookmark Apps, Mac has no way of making standalone browser
320 // windows disabled for apps, so it will add to the tabstrip instead. 320 // windows for apps, so it will add to the tabstrip instead.
321 EXPECT_TRUE(extensions::util::IsNewBookmarkAppsEnabled()); 321 EXPECT_FALSE(extensions::util::IsNewBookmarkAppsEnabled());
322 expected_browser_count = 1; 322 expected_browser_count = 1;
323 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 323 ASSERT_EQ(2, browser()->tab_strip_model()->count());
324 #endif 324 #endif
325 // Find the app's browser. Opening in a new window will create 325 // Find the app's browser. Opening in a new window will create
326 // a new browser. 326 // a new browser.
327 ASSERT_EQ(expected_browser_count, 327 ASSERT_EQ(expected_browser_count,
328 chrome::GetBrowserCount(browser()->profile(), 328 chrome::GetBrowserCount(browser()->profile(),
329 browser()->host_desktop_type())); 329 browser()->host_desktop_type()));
330 if (expected_browser_count == 2) { 330 if (expected_browser_count == 2) {
331 Browser* app_browser = FindOtherBrowser(browser()); 331 Browser* app_browser = FindOtherBrowser(browser());
332 ASSERT_TRUE(app_browser->is_app()); 332 ASSERT_TRUE(app_browser->is_app());
333 } 333 }
334 } 334 }
335 335
336 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { 336 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) {
337 LoadExtensions(); 337 LoadExtensions();
338 base::FilePath basedir = test_data_dir_.AppendASCII("management"); 338 base::FilePath basedir = test_data_dir_.AppendASCII("management");
339 LoadNamedExtension(basedir, "packaged_app"); 339 LoadNamedExtension(basedir, "packaged_app");
340 340
341 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html")); 341 ASSERT_TRUE(RunExtensionSubtest("management/test", "launchType.html"));
342 } 342 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698