Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: ios/chrome/browser/ui/find_bar/find_in_page_egtest.mm

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: build.gn and rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <XCTest/XCTest.h> 5 #import <XCTest/XCTest.h>
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "components/strings/grit/components_strings.h" 8 #include "components/strings/grit/components_strings.h"
9 #import "ios/chrome/browser/find_in_page/find_in_page_controller.h" 9 #import "ios/chrome/browser/find_in_page/find_in_page_controller.h"
10 #import "ios/chrome/browser/ui/find_bar/find_bar_controller_ios.h" 10 #import "ios/chrome/browser/ui/find_bar/find_bar_controller_ios.h"
(...skipping 11 matching lines...) Expand all
22 #import "ios/web/public/test/http_server_util.h" 22 #import "ios/web/public/test/http_server_util.h"
23 #include "ui/base/l10n/l10n_util_mac.h" 23 #include "ui/base/l10n/l10n_util_mac.h"
24 24
25 namespace { 25 namespace {
26 26
27 // Test web page content. 27 // Test web page content.
28 const std::string kFindInPageResponse = "Find in page. Find in page."; 28 const std::string kFindInPageResponse = "Find in page. Find in page.";
29 29
30 } // namespace 30 } // namespace
31 31
32 using chrome_test_util::buttonWithAccessibilityLabel; 32 using chrome_test_util::WebViewContainingText;
33 using chrome_test_util::webViewContainingText;
34 33
35 // Tests for Find in Page. 34 // Tests for Find in Page.
36 @interface FindInPageTestCase : ChromeTestCase 35 @interface FindInPageTestCase : ChromeTestCase
37 36
38 // URL for a test page with |kFindInPageResponse|. 37 // URL for a test page with |kFindInPageResponse|.
39 @property(nonatomic, assign) GURL testURL; 38 @property(nonatomic, assign) GURL testURL;
40 39
41 // Opens Find in Page. 40 // Opens Find in Page.
42 - (void)openFindInPage; 41 - (void)openFindInPage;
43 // Closes Find in page. 42 // Closes Find in page.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 kFindInPagePreviousButtonId)] 213 kFindInPagePreviousButtonId)]
215 performAction:grey_tap()]; 214 performAction:grey_tap()];
216 } 215 }
217 216
218 - (void)navigateToTestPage { 217 - (void)navigateToTestPage {
219 // Navigate to a page with some text. 218 // Navigate to a page with some text.
220 [ChromeEarlGrey loadURL:self.testURL]; 219 [ChromeEarlGrey loadURL:self.testURL];
221 220
222 // Verify web page finished loading. 221 // Verify web page finished loading.
223 [[EarlGrey 222 [[EarlGrey
224 selectElementWithMatcher:webViewContainingText(kFindInPageResponse)] 223 selectElementWithMatcher:WebViewContainingText(kFindInPageResponse)]
225 assertWithMatcher:grey_notNil()]; 224 assertWithMatcher:grey_notNil()];
226 } 225 }
227 226
228 @end 227 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/error_page_egtest.mm ('k') | ios/chrome/browser/ui/first_run/first_run_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698