OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/mac/scoped_nsobject.h" | |
8 #import "ios/chrome/browser/ui/page_not_available_controller.h" | 7 #import "ios/chrome/browser/ui/page_not_available_controller.h" |
9 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
10 namespace { | 13 namespace { |
11 | 14 |
12 TEST(PageNotAvailableControllerTest, TestInitWithURL) { | 15 TEST(PageNotAvailableControllerTest, TestInitWithURL) { |
13 GURL url = GURL("http://foo.bar.com"); | 16 GURL url = GURL("http://foo.bar.com"); |
14 base::scoped_nsobject<PageNotAvailableController> controller( | 17 PageNotAvailableController* controller = |
15 [[PageNotAvailableController alloc] initWithUrl:url]); | 18 [[PageNotAvailableController alloc] initWithUrl:url]; |
16 EXPECT_EQ(url, controller.get().url); | 19 EXPECT_EQ(url, controller.url); |
17 EXPECT_TRUE(controller.get().view); | 20 EXPECT_TRUE(controller.view); |
18 } | 21 } |
19 | 22 |
20 } // namespace | 23 } // namespace |
OLD | NEW |