| OLD | NEW |
| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 namespace keys = extensions::manifest_keys; | 48 namespace keys = extensions::manifest_keys; |
| 49 | 49 |
| 50 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest { | 50 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest { |
| 51 | 51 |
| 52 public: | 52 public: |
| 53 virtual void SetUp() { | 53 virtual void SetUp() { |
| 54 CocoaProfileTest::SetUp(); | 54 CocoaProfileTest::SetUp(); |
| 55 ASSERT_TRUE(browser()); | 55 ASSERT_TRUE(browser()); |
| 56 window_ = browser()->window()->GetNativeWindow(); | 56 window_ = browser()->window()->GetNativeWindow(); |
| 57 icon_ = LoadTestIcon(); | 57 icon_ = LoadTestIcon(); |
| 58 CommandLine command_line(CommandLine::NO_PROGRAM); | 58 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
| 59 extension_service_ = static_cast<extensions::TestExtensionSystem*>( | 59 extension_service_ = static_cast<extensions::TestExtensionSystem*>( |
| 60 extensions::ExtensionSystem::Get(profile()))->CreateExtensionService( | 60 extensions::ExtensionSystem::Get(profile()))->CreateExtensionService( |
| 61 &command_line, base::FilePath(), false); | 61 &command_line, base::FilePath(), false); |
| 62 } | 62 } |
| 63 | 63 |
| 64 // Load test icon from extension test directory. | 64 // Load test icon from extension test directory. |
| 65 SkBitmap LoadTestIcon() { | 65 SkBitmap LoadTestIcon() { |
| 66 base::FilePath path; | 66 base::FilePath path; |
| 67 PathService::Get(chrome::DIR_TEST_DATA, &path); | 67 PathService::Get(chrome::DIR_TEST_DATA, &path); |
| 68 path = path.AppendASCII("extensions").AppendASCII("icon1.png"); | 68 path = path.AppendASCII("extensions").AppendASCII("icon1.png"); |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 int minHeight = extension_installed_bubble::kIconSize + | 302 int minHeight = extension_installed_bubble::kIconSize + |
| 303 (2 * extension_installed_bubble::kOuterVerticalMargin); | 303 (2 * extension_installed_bubble::kOuterVerticalMargin); |
| 304 EXPECT_GT(height, minHeight); | 304 EXPECT_GT(height, minHeight); |
| 305 | 305 |
| 306 // Make sure the "show me" link is visible. | 306 // Make sure the "show me" link is visible. |
| 307 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]); | 307 EXPECT_FALSE([[controller appInstalledShortcutLink] isHidden]); |
| 308 | 308 |
| 309 [controller close]; | 309 [controller close]; |
| 310 } | 310 } |
| 311 | 311 |
| OLD | NEW |