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

Side by Side Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 9452008: Allow platform apps to specify a maximum size for the shell container. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file Created 8 years, 9 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 | Annotate | Revision Log
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 "chrome/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 keys::kLaunchMinHeight)); 451 keys::kLaunchMinHeight));
452 LoadAndExpectError("launch_min_height_negative.json", 452 LoadAndExpectError("launch_min_height_negative.json",
453 ExtensionErrorUtils::FormatErrorMessage( 453 ExtensionErrorUtils::FormatErrorMessage(
454 errors::kInvalidLaunchValue, 454 errors::kInvalidLaunchValue,
455 keys::kLaunchMinHeight)); 455 keys::kLaunchMinHeight));
456 456
457 LoadAndExpectError("launch_container_missing_size_for_platform.json", 457 LoadAndExpectError("launch_container_missing_size_for_platform.json",
458 ExtensionErrorUtils::FormatErrorMessage( 458 ExtensionErrorUtils::FormatErrorMessage(
459 errors::kInvalidLaunchValue, 459 errors::kInvalidLaunchValue,
460 keys::kLaunchWidth)); 460 keys::kLaunchWidth));
461 LoadAndExpectError("launch_container_invalid_size_constraints.json",
462 ExtensionErrorUtils::FormatErrorMessage(
463 errors::kInvalidLaunchValue,
464 keys::kLaunchMaxWidth));
461 } 465 }
462 466
463 TEST_F(ExtensionManifestTest, PlatformAppLaunchContainer) { 467 TEST_F(ExtensionManifestTest, PlatformAppLaunchContainer) {
464 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps); 468 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);
465 469
466 LoadAndExpectError("launch_container_invalid_type_for_platform.json", 470 LoadAndExpectError("launch_container_invalid_type_for_platform.json",
467 errors::kInvalidLaunchContainerForPlatform); 471 errors::kInvalidLaunchContainerForPlatform);
468 } 472 }
469 473
470 TEST_F(ExtensionManifestTest, AppLaunchURL) { 474 TEST_F(ExtensionManifestTest, AppLaunchURL) {
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 EXPECT_EQ("", extension->page_action()->id()); 1086 EXPECT_EQ("", extension->page_action()->id());
1083 EXPECT_EQ(0u, extension->page_action()->icon_paths()->size()); 1087 EXPECT_EQ(0u, extension->page_action()->icon_paths()->size());
1084 EXPECT_EQ("", extension->page_action()->GetTitle( 1088 EXPECT_EQ("", extension->page_action()->GetTitle(
1085 ExtensionAction::kDefaultTabId)); 1089 ExtensionAction::kDefaultTabId));
1086 EXPECT_FALSE(extension->page_action()->HasPopup( 1090 EXPECT_FALSE(extension->page_action()->HasPopup(
1087 ExtensionAction::kDefaultTabId)); 1091 ExtensionAction::kDefaultTabId));
1088 1092
1089 LoadAndExpectError("page_action_manifest_version_2b.json", 1093 LoadAndExpectError("page_action_manifest_version_2b.json",
1090 errors::kInvalidPageActionPopup); 1094 errors::kInvalidPageActionPopup);
1091 } 1095 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698