| 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" |
| 11 #include "components/strings/grit/components_strings.h" | 11 #include "components/strings/grit/components_strings.h" |
| 12 #include "components/version_info/version_info.h" | 12 #include "components/version_info/version_info.h" |
| 13 #import "ios/chrome/app/main_controller.h" | 13 #import "ios/chrome/app/main_controller.h" |
| 14 #include "ios/chrome/browser/chrome_switches.h" | 14 #include "ios/chrome/browser/chrome_switches.h" |
| 15 #import "ios/chrome/browser/ui/browser_view_controller.h" | 15 #import "ios/chrome/browser/ui/browser_view_controller.h" |
| 16 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" | 16 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h" |
| 17 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" | 17 #include "ios/chrome/browser/ui/commands/ios_command_ids.h" |
| 18 #include "ios/chrome/browser/ui/icons/chrome_icon.h" | 18 #include "ios/chrome/browser/ui/icons/chrome_icon.h" |
| 19 #include "ios/chrome/browser/ui/qr_scanner/camera_controller.h" | 19 #include "ios/chrome/browser/ui/qr_scanner/camera_controller.h" |
| 20 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view.h" | 20 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view.h" |
| 21 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.h" | 21 #include "ios/chrome/browser/ui/qr_scanner/qr_scanner_view_controller.h" |
| 22 #include "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 22 #include "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
| 23 #include "ios/chrome/grit/ios_chromium_strings.h" | 23 #include "ios/chrome/grit/ios_chromium_strings.h" |
| 24 #include "ios/chrome/grit/ios_strings.h" | 24 #include "ios/chrome/grit/ios_strings.h" |
| 25 #import "ios/chrome/test/app/chrome_test_util.h" | 25 #import "ios/chrome/test/app/chrome_test_util.h" |
| 26 #import "ios/chrome/test/base/scoped_block_swizzler.h" | 26 #import "ios/chrome/test/base/scoped_block_swizzler.h" |
| 27 #import "ios/chrome/test/earl_grey/chrome_matchers.h" | 27 #import "ios/chrome/test/earl_grey/chrome_matchers.h" |
| 28 #import "ios/chrome/test/earl_grey/chrome_test_case.h" | 28 #import "ios/chrome/test/earl_grey/chrome_test_case.h" |
| 29 #import "ios/testing/earl_grey/disabled_test_macros.h" | |
| 30 #include "ios/web/public/test/http_server.h" | 29 #include "ios/web/public/test/http_server.h" |
| 31 #include "ios/web/public/test/http_server_util.h" | 30 #include "ios/web/public/test/http_server_util.h" |
| 32 #import "third_party/ocmock/OCMock/OCMock.h" | 31 #import "third_party/ocmock/OCMock/OCMock.h" |
| 33 #import "ui/base/l10n/l10n_util.h" | 32 #import "ui/base/l10n/l10n_util.h" |
| 34 #import "ui/base/l10n/l10n_util_mac.h" | 33 #import "ui/base/l10n/l10n_util_mac.h" |
| 35 | 34 |
| 36 using namespace chrome_test_util; | 35 using namespace chrome_test_util; |
| 37 using namespace qr_scanner; | 36 using namespace qr_scanner; |
| 38 | 37 |
| 39 namespace { | 38 namespace { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 // Test that the correct page is loaded if the scanner result is a search query | 816 // Test that the correct page is loaded if the scanner result is a search query |
| 818 // which is then manually edited. | 817 // which is then manually edited. |
| 819 - (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery { | 818 - (void)testReceivingQRScannerSearchQueryResultAndEditingTheQuery { |
| 820 [self swizzleWebToolbarControllerLoadGURLFromLocationBar:_testQueryEdited]; | 819 [self swizzleWebToolbarControllerLoadGURLFromLocationBar:_testQueryEdited]; |
| 821 [self doTestReceivingResult:kTestQuery | 820 [self doTestReceivingResult:kTestQuery |
| 822 response:kTestQueryEditedResponse | 821 response:kTestQueryEditedResponse |
| 823 edit:@"\bedited"]; | 822 edit:@"\bedited"]; |
| 824 } | 823 } |
| 825 | 824 |
| 826 @end | 825 @end |
| OLD | NEW |