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 "base/path_service.h" | 5 #include "base/path_service.h" |
6 #include "base/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 8 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
9 #include "chrome/browser/spellchecker/spellcheck_service.h" | 9 #include "chrome/browser/spellchecker/spellcheck_service.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // The SpellCheckHost object will send a BDICT_CORRUPTED event. | 71 // The SpellCheckHost object will send a BDICT_CORRUPTED event. |
72 SpellcheckServiceFactory::GetForProfile(GetProfile()); | 72 SpellcheckServiceFactory::GetForProfile(GetProfile()); |
73 | 73 |
74 // Check the received event. Also we check if Chrome has successfully deleted | 74 // Check the received event. Also we check if Chrome has successfully deleted |
75 // the corrupted dictionary. We delete the corrupted dictionary to avoid | 75 // the corrupted dictionary. We delete the corrupted dictionary to avoid |
76 // leaking it when this test fails. | 76 // leaking it when this test fails. |
77 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); | 77 content::RunAllPendingInMessageLoop(content::BrowserThread::FILE); |
78 content::RunAllPendingInMessageLoop(content::BrowserThread::UI); | 78 content::RunAllPendingInMessageLoop(content::BrowserThread::UI); |
79 EXPECT_EQ(SpellcheckService::BDICT_CORRUPTED, | 79 EXPECT_EQ(SpellcheckService::BDICT_CORRUPTED, |
80 SpellcheckService::GetStatusEvent()); | 80 SpellcheckService::GetStatusEvent()); |
81 if (file_util::PathExists(bdict_path)) { | 81 if (base::PathExists(bdict_path)) { |
82 ADD_FAILURE(); | 82 ADD_FAILURE(); |
83 EXPECT_TRUE(base::Delete(bdict_path, true)); | 83 EXPECT_TRUE(base::Delete(bdict_path, true)); |
84 } | 84 } |
85 } | 85 } |
OLD | NEW |