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 #import <map> | 8 #import <map> |
9 #import <string> | 9 #import <string> |
10 | 10 |
11 #include "components/strings/grit/components_strings.h" | 11 #include "components/strings/grit/components_strings.h" |
12 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" | 12 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h" |
13 #include "ios/chrome/browser/ui/ui_util.h" | 13 #include "ios/chrome/browser/ui/ui_util.h" |
14 #include "ios/chrome/grit/ios_strings.h" | 14 #include "ios/chrome/grit/ios_strings.h" |
15 #import "ios/chrome/test/app/tab_test_util.h" | 15 #import "ios/chrome/test/app/tab_test_util.h" |
16 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" | 16 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" |
17 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" | 17 #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" |
18 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 18 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
19 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 19 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
20 #import "ios/web/public/test/http_server.h" | 20 #import "ios/web/public/test/http_server/http_server.h" |
21 #include "ios/web/public/test/http_server_util.h" | 21 #include "ios/web/public/test/http_server/http_server_util.h" |
22 | 22 |
23 #if !defined(__has_feature) || !__has_feature(objc_arc) | 23 #if !defined(__has_feature) || !__has_feature(objc_arc) |
24 #error "This file requires ARC support." | 24 #error "This file requires ARC support." |
25 #endif | 25 #endif |
26 | 26 |
27 namespace { | 27 namespace { |
28 const char kURLOfTestPage[] = "http://testPage"; | 28 const char kURLOfTestPage[] = "http://testPage"; |
29 const char kHTMLOfTestPage[] = | 29 const char kHTMLOfTestPage[] = |
30 "<head><title>TestPageTitle</title></head><body>hello</body>"; | 30 "<head><title>TestPageTitle</title></head><body>hello</body>"; |
31 NSString* const kTitleOfTestPage = @"TestPageTitle"; | 31 NSString* const kTitleOfTestPage = @"TestPageTitle"; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Tap on the entry for the test page in the Recent Tabs panel and check that | 144 // Tap on the entry for the test page in the Recent Tabs panel and check that |
145 // a tab containing the test page was opened. | 145 // a tab containing the test page was opened. |
146 [[EarlGrey selectElementWithMatcher:TitleOfTestPage()] | 146 [[EarlGrey selectElementWithMatcher:TitleOfTestPage()] |
147 performAction:grey_tap()]; | 147 performAction:grey_tap()]; |
148 [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] | 148 [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] |
149 assertWithMatcher:chrome_test_util::OmniboxText( | 149 assertWithMatcher:chrome_test_util::OmniboxText( |
150 testPageURL.GetContent())]; | 150 testPageURL.GetContent())]; |
151 } | 151 } |
152 | 152 |
153 @end | 153 @end |
OLD | NEW |