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/compiler_specific.h" | 7 #include "base/compiler_specific.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/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
11 #import "base/memory/scoped_nsobject.h" | 11 #import "base/memory/scoped_nsobject.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/sys_string_conversions.h" | 13 #include "base/sys_string_conversions.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #import "chrome/browser/extensions/extension_install_ui.h" | 16 #import "chrome/browser/extensions/extension_install_ui.h" |
17 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 17 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
18 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" | 18 #import "chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.
h" |
19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/extensions/extension.h" | 20 #include "chrome/common/extensions/extension.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #import "testing/gtest_mac.h" | 22 #import "testing/gtest_mac.h" |
23 #include "testing/platform_test.h" | 23 #include "testing/platform_test.h" |
24 #include "third_party/skia/include/core/SkBitmap.h" | 24 #include "third_party/skia/include/core/SkBitmap.h" |
25 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
26 #include "webkit/glue/image_decoder.h" | 26 #include "webkit/glue/image_decoder.h" |
27 | 27 |
| 28 using extensions::Extension; |
28 | 29 |
29 // Base class for our tests. | 30 // Base class for our tests. |
30 class ExtensionInstallDialogControllerTest : public CocoaProfileTest { | 31 class ExtensionInstallDialogControllerTest : public CocoaProfileTest { |
31 public: | 32 public: |
32 ExtensionInstallDialogControllerTest() { | 33 ExtensionInstallDialogControllerTest() { |
33 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 34 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
34 test_data_dir_ = test_data_dir_.AppendASCII("extensions") | 35 test_data_dir_ = test_data_dir_.AppendASCII("extensions") |
35 .AppendASCII("install_prompt"); | 36 .AppendASCII("install_prompt"); |
36 | 37 |
37 LoadIcon(); | 38 LoadIcon(); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 334 |
334 // Though we have no permissions warnings, these should still be hooked up, | 335 // Though we have no permissions warnings, these should still be hooked up, |
335 // just invisible. | 336 // just invisible. |
336 EXPECT_TRUE([controller subtitleField] != nil); | 337 EXPECT_TRUE([controller subtitleField] != nil); |
337 EXPECT_TRUE([[controller subtitleField] isHidden]); | 338 EXPECT_TRUE([[controller subtitleField] isHidden]); |
338 EXPECT_TRUE([controller warningsField] != nil); | 339 EXPECT_TRUE([controller warningsField] != nil); |
339 EXPECT_TRUE([[controller warningsField] isHidden]); | 340 EXPECT_TRUE([[controller warningsField] isHidden]); |
340 EXPECT_TRUE([controller warningsSeparator] != nil); | 341 EXPECT_TRUE([controller warningsSeparator] != nil); |
341 EXPECT_TRUE([[controller warningsSeparator] isHidden]); | 342 EXPECT_TRUE([[controller warningsSeparator] isHidden]); |
342 } | 343 } |
OLD | NEW |