OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/translate/core/browser/translate_manager.h" | 5 #include "components/translate/core/browser/translate_manager.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/prefs/session_startup_pref.h" | 9 #include "chrome/browser/prefs/session_startup_pref.h" |
10 #include "chrome/browser/translate/chrome_translate_client.h" | 10 #include "chrome/browser/translate/chrome_translate_client.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 #endif | 65 #endif |
66 IN_PROC_BROWSER_TEST_F(TranslateManagerBrowserTest, | 66 IN_PROC_BROWSER_TEST_F(TranslateManagerBrowserTest, |
67 MAYBE_TranslateSessionRestore) { | 67 MAYBE_TranslateSessionRestore) { |
68 scoped_ptr<test::CldDataHarness> cld_data_harness = | 68 scoped_ptr<test::CldDataHarness> cld_data_harness = |
69 test::CldDataHarnessFactory::Get()->CreateCldDataHarness(); | 69 test::CldDataHarnessFactory::Get()->CreateCldDataHarness(); |
70 ASSERT_NO_FATAL_FAILURE(cld_data_harness->Init()); | 70 ASSERT_NO_FATAL_FAILURE(cld_data_harness->Init()); |
71 content::WebContents* current_web_contents = | 71 content::WebContents* current_web_contents = |
72 browser()->tab_strip_model()->GetActiveWebContents(); | 72 browser()->tab_strip_model()->GetActiveWebContents(); |
73 content::Source<content::WebContents> source(current_web_contents); | 73 content::Source<content::WebContents> source(current_web_contents); |
74 | 74 |
75 // LOG(INFO) << "About to set up the fr_language_detected_signal"; | |
76 | |
dglazkov
2015/10/09 23:22:22
Would love your insight here. After this change, t
jochen (gone - plz use gerrit)
2015/10/12 11:23:50
I think the browser test harness is created before
dglazkov
2015/10/17 00:29:24
The problem here is that the observer needs to hav
| |
75 ui_test_utils::WindowedNotificationObserverWithDetails< | 77 ui_test_utils::WindowedNotificationObserverWithDetails< |
76 translate::LanguageDetectionDetails> | 78 translate::LanguageDetectionDetails> |
77 fr_language_detected_signal(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED, | 79 fr_language_detected_signal(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED, |
78 source); | 80 source); |
79 fr_language_detected_signal.Wait(); | 81 fr_language_detected_signal.Wait(); |
80 } | 82 } |
OLD | NEW |