| 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/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 @end | 42 @end |
| 43 | 43 |
| 44 namespace keys = extension_manifest_keys; | 44 namespace keys = extension_manifest_keys; |
| 45 | 45 |
| 46 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest { | 46 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest { |
| 47 | 47 |
| 48 public: | 48 public: |
| 49 virtual void SetUp() { | 49 virtual void SetUp() { |
| 50 CocoaProfileTest::SetUp(); | 50 CocoaProfileTest::SetUp(); |
| 51 ASSERT_TRUE(browser()); | 51 ASSERT_TRUE(browser()); |
| 52 window_ = CreateBrowserWindow()->GetNativeHandle(); | 52 window_ = CreateBrowserWindow()->GetNativeWindow(); |
| 53 icon_ = LoadTestIcon(); | 53 icon_ = LoadTestIcon(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // Load test icon from extension test directory. | 56 // Load test icon from extension test directory. |
| 57 SkBitmap LoadTestIcon() { | 57 SkBitmap LoadTestIcon() { |
| 58 FilePath path; | 58 FilePath path; |
| 59 PathService::Get(chrome::DIR_TEST_DATA, &path); | 59 PathService::Get(chrome::DIR_TEST_DATA, &path); |
| 60 path = path.AppendASCII("extensions").AppendASCII("icon1.png"); | 60 path = path.AppendASCII("extensions").AppendASCII("icon1.png"); |
| 61 | 61 |
| 62 std::string file_contents; | 62 std::string file_contents; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // The bubble window goes from visible to not-visible. | 223 // The bubble window goes from visible to not-visible. |
| 224 EXPECT_TRUE([bubbleWindow isVisible]); | 224 EXPECT_TRUE([bubbleWindow isVisible]); |
| 225 [window_ close]; | 225 [window_ close]; |
| 226 EXPECT_FALSE([bubbleWindow isVisible]); | 226 EXPECT_FALSE([bubbleWindow isVisible]); |
| 227 | 227 |
| 228 [[NSNotificationCenter defaultCenter] removeObserver:observer]; | 228 [[NSNotificationCenter defaultCenter] removeObserver:observer]; |
| 229 | 229 |
| 230 // Check that the appropriate notification was received. | 230 // Check that the appropriate notification was received. |
| 231 EXPECT_OCMOCK_VERIFY(observer); | 231 EXPECT_OCMOCK_VERIFY(observer); |
| 232 } | 232 } |
| OLD | NEW |