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

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

Issue 2642193012: Make EarlGrey matchers compliant with Chromium style. (Closed)
Patch Set: mistake 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
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; 15 using chrome_test_util::WebViewContainingText;
Eugene But (OOO till 7-30) 2017/01/23 19:39:04 Do you need this?
baxley 2017/01/24 22:18:49 Done.
16 16
17 // Test case for bringing up the print dialog when a web site's JavaScript runs 17 // Test case for bringing up the print dialog when a web site's JavaScript runs
18 // "window.print". 18 // "window.print".
19 @interface JSPrintTestCase : ChromeTestCase 19 @interface JSPrintTestCase : ChromeTestCase
20 @end 20 @end
21 21
22 @implementation JSPrintTestCase 22 @implementation JSPrintTestCase
23 23
24 // Tests that tapping a button with onclick='window.print' brings up the 24 // Tests that tapping a button with onclick='window.print' brings up the
25 // print dialog. 25 // print dialog.
(...skipping 21 matching lines...) Expand all
47 assertWithMatcher:grey_sufficientlyVisible()]; 47 assertWithMatcher:grey_sufficientlyVisible()];
48 48
49 // Clean up and close print dialog. 49 // Clean up and close print dialog.
50 id<GREYMatcher> cancelButton = 50 id<GREYMatcher> cancelButton =
51 grey_allOf(grey_accessibilityLabel(@"Cancel"), 51 grey_allOf(grey_accessibilityLabel(@"Cancel"),
52 grey_accessibilityTrait(UIAccessibilityTraitButton), nil); 52 grey_accessibilityTrait(UIAccessibilityTraitButton), nil);
53 [[EarlGrey selectElementWithMatcher:cancelButton] performAction:grey_tap()]; 53 [[EarlGrey selectElementWithMatcher:cancelButton] performAction:grey_tap()];
54 } 54 }
55 55
56 @end 56 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698