| 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 <XCTest/XCTest.h> | 5 #import <XCTest/XCTest.h> |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
| 9 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" | 9 #import "ios/chrome/browser/ui/browser_view_controller_dependency_factory.h" |
| 10 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 10 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 // Earl grey integration tests for Activity Service Controller. | 50 // Earl grey integration tests for Activity Service Controller. |
| 51 @interface ActivityServiceControllerTestCase : ChromeTestCase | 51 @interface ActivityServiceControllerTestCase : ChromeTestCase |
| 52 @end | 52 @end |
| 53 | 53 |
| 54 @implementation ActivityServiceControllerTestCase | 54 @implementation ActivityServiceControllerTestCase |
| 55 | 55 |
| 56 // Test that when trying to print a page redirected to an unprintable page, a | 56 // Test that when trying to print a page redirected to an unprintable page, a |
| 57 // snackbar explaining that the page cannot be printed is displayed. | 57 // snackbar explaining that the page cannot be printed is displayed. |
| 58 - (void)testActivityServiceControllerPrintAfterRedirectionToUnprintablePage { | 58 // TODO(crbug.com/684987): Re-enable this test. |
| 59 - (void) |
| 60 DISABLED_testActivityServiceControllerPrintAfterRedirectionToUnprintablePage
{ |
| 59 std::map<GURL, std::string> responses; | 61 std::map<GURL, std::string> responses; |
| 60 const GURL regularPageURL = web::test::HttpServer::MakeUrl("http://choux"); | 62 const GURL regularPageURL = web::test::HttpServer::MakeUrl("http://choux"); |
| 61 responses[regularPageURL] = "fleur"; | 63 responses[regularPageURL] = "fleur"; |
| 62 web::test::SetUpHttpServer( | 64 web::test::SetUpHttpServer( |
| 63 base::MakeUnique<ErrorPageResponseProvider>(responses)); | 65 base::MakeUnique<ErrorPageResponseProvider>(responses)); |
| 64 | 66 |
| 65 // Open a regular page and verify that you can share. | 67 // Open a regular page and verify that you can share. |
| 66 [ChromeEarlGrey loadURL:regularPageURL]; | 68 [ChromeEarlGrey loadURL:regularPageURL]; |
| 67 [ChromeEarlGreyUI openShareMenu]; | 69 [ChromeEarlGreyUI openShareMenu]; |
| 68 AssertActivityServiceVisible(); | 70 AssertActivityServiceVisible(); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 assertWithMatcher:grey_interactable()]; | 140 assertWithMatcher:grey_interactable()]; |
| 139 | 141 |
| 140 // Start the Copy action and verify that the share menu gets dismissed. | 142 // Start the Copy action and verify that the share menu gets dismissed. |
| 141 [[EarlGrey | 143 [[EarlGrey |
| 142 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel( | 144 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel( |
| 143 @"Copy")] performAction:grey_tap()]; | 145 @"Copy")] performAction:grey_tap()]; |
| 144 AssertActivityServiceNotVisible(); | 146 AssertActivityServiceNotVisible(); |
| 145 } | 147 } |
| 146 | 148 |
| 147 @end | 149 @end |
| OLD | NEW |