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

Side by Side Diff: chrome/browser/translate/translate_manager_render_view_host_unittest.cc

Issue 2714773002: Disable TranslateManagerRenderViewHostTest.NormalTranslate with PlzNavigate. (Closed)
Patch Set: just disable Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "components/translate/core/browser/translate_prefs.h" 45 #include "components/translate/core/browser/translate_prefs.h"
46 #include "components/translate/core/browser/translate_script.h" 46 #include "components/translate/core/browser/translate_script.h"
47 #include "components/translate/core/browser/translate_ui_delegate.h" 47 #include "components/translate/core/browser/translate_ui_delegate.h"
48 #include "components/translate/core/common/language_detection_details.h" 48 #include "components/translate/core/common/language_detection_details.h"
49 #include "components/translate/core/common/translate_pref_names.h" 49 #include "components/translate/core/common/translate_pref_names.h"
50 #include "content/public/browser/navigation_details.h" 50 #include "content/public/browser/navigation_details.h"
51 #include "content/public/browser/navigation_entry.h" 51 #include "content/public/browser/navigation_entry.h"
52 #include "content/public/browser/notification_details.h" 52 #include "content/public/browser/notification_details.h"
53 #include "content/public/browser/notification_registrar.h" 53 #include "content/public/browser/notification_registrar.h"
54 #include "content/public/browser/web_contents.h" 54 #include "content/public/browser/web_contents.h"
55 #include "content/public/common/browser_side_navigation_policy.h"
55 #include "content/public/common/url_constants.h" 56 #include "content/public/common/url_constants.h"
56 #include "content/public/test/test_renderer_host.h" 57 #include "content/public/test/test_renderer_host.h"
57 #include "mojo/public/cpp/bindings/binding.h" 58 #include "mojo/public/cpp/bindings/binding.h"
58 #include "net/base/net_errors.h" 59 #include "net/base/net_errors.h"
59 #include "net/url_request/test_url_fetcher_factory.h" 60 #include "net/url_request/test_url_fetcher_factory.h"
60 #include "net/url_request/url_fetcher_delegate.h" 61 #include "net/url_request/url_fetcher_delegate.h"
61 #include "net/url_request/url_request_status.h" 62 #include "net/url_request/url_request_status.h"
62 #include "testing/gmock/include/gmock/gmock.h" 63 #include "testing/gmock/include/gmock/gmock.h"
63 #include "third_party/WebKit/public/web/WebContextMenuData.h" 64 #include "third_party/WebKit/public/web/WebContextMenuData.h"
64 #include "url/gurl.h" 65 #include "url/gurl.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 679
679 // The rest of the tests in this file depend on the translate infobar. They 680 // The rest of the tests in this file depend on the translate infobar. They
680 // should be ported to use the translate bubble. On Aura there is no infobar 681 // should be ported to use the translate bubble. On Aura there is no infobar
681 // so the tests are not compiled. 682 // so the tests are not compiled.
682 #if !defined(USE_AURA) 683 #if !defined(USE_AURA)
683 TEST_F(TranslateManagerRenderViewHostTest, NormalTranslate) { 684 TEST_F(TranslateManagerRenderViewHostTest, NormalTranslate) {
684 // See BubbleNormalTranslate for corresponding bubble UX testing. 685 // See BubbleNormalTranslate for corresponding bubble UX testing.
685 if (TranslateService::IsTranslateBubbleEnabled()) 686 if (TranslateService::IsTranslateBubbleEnabled())
686 return; 687 return;
687 688
689 // http://crbug.com/695624
690 if (content::IsBrowserSideNavigationEnabled())
691 return;
692
688 SimulateNavigation(GURL("http://www.google.fr"), "fr", true); 693 SimulateNavigation(GURL("http://www.google.fr"), "fr", true);
689 694
690 // We should have an infobar. 695 // We should have an infobar.
691 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); 696 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar();
692 ASSERT_TRUE(infobar != NULL); 697 ASSERT_TRUE(infobar != NULL);
693 EXPECT_EQ(translate::TRANSLATE_STEP_BEFORE_TRANSLATE, 698 EXPECT_EQ(translate::TRANSLATE_STEP_BEFORE_TRANSLATE,
694 infobar->translate_step()); 699 infobar->translate_step());
695 700
696 // Simulate clicking translate. 701 // Simulate clicking translate.
697 infobar->Translate(); 702 infobar->Translate();
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 1816
1812 // Check the bubble exists instead of the infobar. 1817 // Check the bubble exists instead of the infobar.
1813 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar(); 1818 translate::TranslateInfoBarDelegate* infobar = GetTranslateInfoBar();
1814 ASSERT_TRUE(infobar == NULL); 1819 ASSERT_TRUE(infobar == NULL);
1815 TranslateBubbleModel* bubble = factory->model(); 1820 TranslateBubbleModel* bubble = factory->model();
1816 ASSERT_TRUE(bubble != NULL); 1821 ASSERT_TRUE(bubble != NULL);
1817 EXPECT_EQ(TranslateBubbleModel::VIEW_STATE_TRANSLATING, 1822 EXPECT_EQ(TranslateBubbleModel::VIEW_STATE_TRANSLATING,
1818 bubble->GetViewState()); 1823 bubble->GetViewState());
1819 } 1824 }
1820 #endif // defined(USE_AURA) 1825 #endif // defined(USE_AURA)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698