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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/mac/bind_objc_block.h" | 8 #include "base/mac/bind_objc_block.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( | 629 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( |
630 IDS_TRANSLATE_INFOBAR_DENY)] | 630 IDS_TRANSLATE_INFOBAR_DENY)] |
631 performAction:grey_tap()]; | 631 performAction:grey_tap()]; |
632 [[EarlGrey | 632 [[EarlGrey |
633 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel( | 633 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabel( |
634 kPickedLanguage)] | 634 kPickedLanguage)] |
635 assertWithMatcher:grey_nil()]; | 635 assertWithMatcher:grey_nil()]; |
636 } | 636 } |
637 | 637 |
638 // Tests that the Translate infobar is displayed after translation. | 638 // Tests that the Translate infobar is displayed after translation. |
639 - (void)testTranslateInfobar { | 639 - (void)DISABLED_testTranslateInfobar { |
640 const GURL URL = | 640 const GURL URL = |
641 web::test::HttpServer::MakeUrl("http://scenarioTranslateInfobar"); | 641 web::test::HttpServer::MakeUrl("http://scenarioTranslateInfobar"); |
642 std::map<GURL, std::string> responses; | 642 std::map<GURL, std::string> responses; |
643 // A page with some text. | 643 // A page with some text. |
644 responses[URL] = "<html><body>Hello world!</body></html>"; | 644 responses[URL] = "<html><body>Hello world!</body></html>"; |
645 web::test::SetUpSimpleHttpServer(responses); | 645 web::test::SetUpSimpleHttpServer(responses); |
646 | 646 |
647 // Reset translate prefs to default. | 647 // Reset translate prefs to default. |
648 std::unique_ptr<translate::TranslatePrefs> translatePrefs( | 648 std::unique_ptr<translate::TranslatePrefs> translatePrefs( |
649 ChromeIOSTranslateClient::CreateTranslatePrefs( | 649 ChromeIOSTranslateClient::CreateTranslatePrefs( |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 [[EarlGrey | 841 [[EarlGrey |
842 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( | 842 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( |
843 IDS_TRANSLATE_INFOBAR_REVERT)] | 843 IDS_TRANSLATE_INFOBAR_REVERT)] |
844 assertWithMatcher:grey_notNil()]; | 844 assertWithMatcher:grey_notNil()]; |
845 [[EarlGrey | 845 [[EarlGrey |
846 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( | 846 selectElementWithMatcher:chrome_test_util::ButtonWithAccessibilityLabelId( |
847 IDS_CLOSE)] assertWithMatcher:grey_notNil()]; | 847 IDS_CLOSE)] assertWithMatcher:grey_notNil()]; |
848 } | 848 } |
849 | 849 |
850 @end | 850 @end |
OLD | NEW |