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

Side by Side Diff: ios/chrome/browser/ui/browser_view_controller_egtest.mm

Issue 2685703004: [ObjC ARC] Converts ios/chrome/browser/ui:eg_tests to ARC. (Closed)
Patch Set: 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
« no previous file with comments | « ios/chrome/browser/ui/BUILD.gn ('k') | ios/chrome/browser/ui/error_page_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 #include <map> 5 #include <map>
6 6
7 #import <EarlGrey/EarlGrey.h> 7 #import <EarlGrey/EarlGrey.h>
8 #import <WebKit/WebKit.h> 8 #import <WebKit/WebKit.h>
9 #import <XCTest/XCTest.h> 9 #import <XCTest/XCTest.h>
10 10
11 #include "base/ios/ios_util.h" 11 #include "base/ios/ios_util.h"
12 #include "base/strings/sys_string_conversions.h" 12 #include "base/strings/sys_string_conversions.h"
13 #include "components/strings/grit/components_strings.h" 13 #include "components/strings/grit/components_strings.h"
14 #include "ios/chrome/browser/ui/ui_util.h" 14 #include "ios/chrome/browser/ui/ui_util.h"
15 #import "ios/chrome/test/app/chrome_test_util.h" 15 #import "ios/chrome/test/app/chrome_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_matchers.h" 17 #import "ios/chrome/test/earl_grey/chrome_matchers.h"
18 #import "ios/chrome/test/earl_grey/chrome_test_case.h" 18 #import "ios/chrome/test/earl_grey/chrome_test_case.h"
19 #import "ios/web/public/test/http_server.h" 19 #import "ios/web/public/test/http_server.h"
20 #include "ios/web/public/test/http_server_util.h" 20 #include "ios/web/public/test/http_server_util.h"
21 #include "ios/web/public/test/response_providers/html_response_provider.h" 21 #include "ios/web/public/test/response_providers/html_response_provider.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 23
24 #if !defined(__has_feature) || !__has_feature(objc_arc)
25 #error "This file requires ARC support."
26 #endif
27
24 // This test suite only tests javascript in the omnibox. Nothing to do with BVC 28 // This test suite only tests javascript in the omnibox. Nothing to do with BVC
25 // really, the name is a bit misleading. 29 // really, the name is a bit misleading.
26 @interface BrowserViewControllerTestCase : ChromeTestCase 30 @interface BrowserViewControllerTestCase : ChromeTestCase
27 @end 31 @end
28 32
29 @implementation BrowserViewControllerTestCase 33 @implementation BrowserViewControllerTestCase
30 34
31 // Tests that evaluating JavaScript in the omnibox (e.g, a bookmarklet) works. 35 // Tests that evaluating JavaScript in the omnibox (e.g, a bookmarklet) works.
32 - (void)testJavaScriptInOmnibox { 36 - (void)testJavaScriptInOmnibox {
33 // TODO(crbug.com/640220): Keyboard entry inside the omnibox fails only on 37 // TODO(crbug.com/640220): Keyboard entry inside the omnibox fails only on
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 @"Did not navigate to the destination url."); 81 @"Did not navigate to the destination url.");
78 82
79 // Verifies that the destination page is shown. 83 // Verifies that the destination page is shown.
80 id<GREYMatcher> navigationMatcher = 84 id<GREYMatcher> navigationMatcher =
81 chrome_test_util::WebViewContainingText(responses[destinationURL]); 85 chrome_test_util::WebViewContainingText(responses[destinationURL]);
82 [[EarlGrey selectElementWithMatcher:grey_kindOfClass([WKWebView class])] 86 [[EarlGrey selectElementWithMatcher:grey_kindOfClass([WKWebView class])]
83 assertWithMatcher:navigationMatcher]; 87 assertWithMatcher:navigationMatcher];
84 } 88 }
85 89
86 @end 90 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/BUILD.gn ('k') | ios/chrome/browser/ui/error_page_egtest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698