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

Side by Side Diff: ios/chrome/browser/web/js_print_egtest.mm

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: build.gn and rebase Created 3 years, 11 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
« no previous file with comments | « ios/chrome/browser/web/http_auth_egtest.mm ('k') | ios/chrome/browser/web/navigation_egtest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <EarlGrey/EarlGrey.h> 5 #import <EarlGrey/EarlGrey.h>
6 #import <XCTest/XCTest.h> 6 #import <XCTest/XCTest.h>
7 #include <map> 7 #include <map>
8 8
9 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h" 9 #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
10 #import "ios/chrome/test/earl_grey/chrome_matchers.h" 10 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
11 #import "ios/chrome/test/earl_grey/chrome_test_case.h" 11 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
12 #import "ios/web/public/test/http_server.h" 12 #import "ios/web/public/test/http_server.h"
13 #import "ios/web/public/test/http_server_util.h" 13 #import "ios/web/public/test/http_server_util.h"
14 14
15 using chrome_test_util::webViewContainingText;
16
17 // Test case for bringing up the print dialog when a web site's JavaScript runs 15 // Test case for bringing up the print dialog when a web site's JavaScript runs
18 // "window.print". 16 // "window.print".
19 @interface JSPrintTestCase : ChromeTestCase 17 @interface JSPrintTestCase : ChromeTestCase
20 @end 18 @end
21 19
22 @implementation JSPrintTestCase 20 @implementation JSPrintTestCase
23 21
24 // Tests that tapping a button with onclick='window.print' brings up the 22 // Tests that tapping a button with onclick='window.print' brings up the
25 // print dialog. 23 // print dialog.
26 - (void)testWebPrintButton { 24 - (void)testWebPrintButton {
(...skipping 20 matching lines...) Expand all
47 assertWithMatcher:grey_sufficientlyVisible()]; 45 assertWithMatcher:grey_sufficientlyVisible()];
48 46
49 // Clean up and close print dialog. 47 // Clean up and close print dialog.
50 id<GREYMatcher> cancelButton = 48 id<GREYMatcher> cancelButton =
51 grey_allOf(grey_accessibilityLabel(@"Cancel"), 49 grey_allOf(grey_accessibilityLabel(@"Cancel"),
52 grey_accessibilityTrait(UIAccessibilityTraitButton), nil); 50 grey_accessibilityTrait(UIAccessibilityTraitButton), nil);
53 [[EarlGrey selectElementWithMatcher:cancelButton] performAction:grey_tap()]; 51 [[EarlGrey selectElementWithMatcher:cancelButton] performAction:grey_tap()];
54 } 52 }
55 53
56 @end 54 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/http_auth_egtest.mm ('k') | ios/chrome/browser/web/navigation_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698