OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <EarlGrey/EarlGrey.h> | 5 #import <EarlGrey/EarlGrey.h> |
6 #import <XCTest/XCTest.h> | 6 #import <XCTest/XCTest.h> |
7 | 7 |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "components/infobars/core/confirm_infobar_delegate.h" | 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
11 #include "components/infobars/core/infobar.h" | 11 #include "components/infobars/core/infobar.h" |
12 #include "components/infobars/core/infobar_manager.h" | 12 #include "components/infobars/core/infobar_manager.h" |
13 #import "ios/chrome/app/main_controller.h" | 13 #import "ios/chrome/app/main_controller.h" |
14 #import "ios/chrome/browser/tabs/tab.h" | 14 #import "ios/chrome/browser/tabs/tab.h" |
15 #import "ios/chrome/browser/tabs/tab_model.h" | 15 #import "ios/chrome/browser/tabs/tab_model.h" |
16 #import "ios/chrome/test/app/chrome_test_util.h" | 16 #import "ios/chrome/test/app/chrome_test_util.h" |
17 #import "ios/chrome/test/app/tab_test_util.h" | 17 #import "ios/chrome/test/app/tab_test_util.h" |
18 #import "ios/chrome/test/earl_grey/chrome_assertions.h" | 18 #import "ios/chrome/test/earl_grey/chrome_assertions.h" |
19 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 19 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
20 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 20 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
21 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 21 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
22 #import "ios/web/public/test/http_server.h" | 22 #import "ios/web/public/test/http_server/http_server.h" |
23 #include "ios/web/public/test/http_server_util.h" | 23 #include "ios/web/public/test/http_server/http_server_util.h" |
24 #include "url/gurl.h" | 24 #include "url/gurl.h" |
25 #include "url/url_constants.h" | 25 #include "url/url_constants.h" |
26 | 26 |
27 #if !defined(__has_feature) || !__has_feature(objc_arc) | 27 #if !defined(__has_feature) || !__has_feature(objc_arc) |
28 #error "This file requires ARC support." | 28 #error "This file requires ARC support." |
29 #endif | 29 #endif |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // The title of the test infobar. | 33 // The title of the test infobar. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 [ChromeEarlGrey loadURL:ponyURL]; | 162 [ChromeEarlGrey loadURL:ponyURL]; |
163 | 163 |
164 // Close the first tab. Verify that there is only one tab remaining and its | 164 // Close the first tab. Verify that there is only one tab remaining and its |
165 // infobar is visible. | 165 // infobar is visible. |
166 chrome_test_util::CloseCurrentTab(); | 166 chrome_test_util::CloseCurrentTab(); |
167 chrome_test_util::AssertMainTabCount(1U); | 167 chrome_test_util::AssertMainTabCount(1U); |
168 VerifyTestInfoBarVisibleForCurrentTab(true); | 168 VerifyTestInfoBarVisibleForCurrentTab(true); |
169 } | 169 } |
170 | 170 |
171 @end | 171 @end |
OLD | NEW |