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 <AVFoundation/AVFoundation.h> | 5 #import <AVFoundation/AVFoundation.h> |
6 #import <EarlGrey/EarlGrey.h> | 6 #import <EarlGrey/EarlGrey.h> |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view.h" | 21 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view.h" |
22 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.h" | 22 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.h" |
23 #include "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 23 #include "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
24 #include "ios/chrome/grit/ios_chromium_strings.h" | 24 #include "ios/chrome/grit/ios_chromium_strings.h" |
25 #include "ios/chrome/grit/ios_strings.h" | 25 #include "ios/chrome/grit/ios_strings.h" |
26 #import "ios/chrome/test/app/chrome_test_util.h" | 26 #import "ios/chrome/test/app/chrome_test_util.h" |
27 #import "ios/chrome/test/base/scoped_block_swizzler.h" | 27 #import "ios/chrome/test/base/scoped_block_swizzler.h" |
28 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 28 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
29 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 29 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
30 #include "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h" | 30 #include "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h" |
31 #include "ios/web/public/test/http_server.h" | 31 #import "ios/web/public/test/http_server/http_server.h" |
32 #include "ios/web/public/test/http_server_util.h" | 32 #include "ios/web/public/test/http_server/http_server_util.h" |
33 #import "third_party/ocmock/OCMock/OCMock.h" | 33 #import "third_party/ocmock/OCMock/OCMock.h" |
34 #import "ui/base/l10n/l10n_util.h" | 34 #import "ui/base/l10n/l10n_util.h" |
35 #import "ui/base/l10n/l10n_util_mac.h" | 35 #import "ui/base/l10n/l10n_util_mac.h" |
36 | 36 |
37 using namespace chrome_test_util; | 37 using namespace chrome_test_util; |
38 using namespace qr_scanner; | 38 using namespace qr_scanner; |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 char kTestURL[] = "http://testurl"; | 42 char kTestURL[] = "http://testurl"; |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 // Test that the correct page is loaded if the scanner result is a search query | 818 // Test that the correct page is loaded if the scanner result is a search query |
819 // which is then manually edited. | 819 // which is then manually edited. |
820 - (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery { | 820 - (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery { |
821 [self swizzleWebToolbarControllerLoadGURLFromLocationBar:_testQueryEdited]; | 821 [self swizzleWebToolbarControllerLoadGURLFromLocationBar:_testQueryEdited]; |
822 [self doTestReceivingResult:kTestQuery | 822 [self doTestReceivingResult:kTestQuery |
823 response:kTestQueryEditedResponse | 823 response:kTestQueryEditedResponse |
824 edit:@"\bedited"]; | 824 edit:@"\bedited"]; |
825 } | 825 } |
826 | 826 |
827 @end | 827 @end |
OLD | NEW |