OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 history_count_(0), | 137 history_count_(0), |
138 password_count_(0), | 138 password_count_(0), |
139 keyword_count_(0), | 139 keyword_count_(0), |
140 use_keyword_in_json_(use_keyword_in_json) {} | 140 use_keyword_in_json_(use_keyword_in_json) {} |
141 | 141 |
142 // importer::ImporterProgressObserver: | 142 // importer::ImporterProgressObserver: |
143 void ImportStarted() override {} | 143 void ImportStarted() override {} |
144 void ImportItemStarted(importer::ImportItem item) override {} | 144 void ImportItemStarted(importer::ImportItem item) override {} |
145 void ImportItemEnded(importer::ImportItem item) override {} | 145 void ImportItemEnded(importer::ImportItem item) override {} |
146 void ImportEnded() override { | 146 void ImportEnded() override { |
147 base::MessageLoop::current()->Quit(); | 147 base::MessageLoop::current()->QuitWhenIdle(); |
148 EXPECT_EQ(arraysize(kFirefoxBookmarks), bookmark_count_); | 148 EXPECT_EQ(arraysize(kFirefoxBookmarks), bookmark_count_); |
149 EXPECT_EQ(1U, history_count_); | 149 EXPECT_EQ(1U, history_count_); |
150 EXPECT_EQ(arraysize(kFirefoxPasswords), password_count_); | 150 EXPECT_EQ(arraysize(kFirefoxPasswords), password_count_); |
151 // The following test case from |kFirefoxKeywords| won't be imported: | 151 // The following test case from |kFirefoxKeywords| won't be imported: |
152 // "http://%x.example.{searchTerms}.com/"}. | 152 // "http://%x.example.{searchTerms}.com/"}. |
153 // Hence, value of |keyword_count_| should be lower than size of | 153 // Hence, value of |keyword_count_| should be lower than size of |
154 // |kFirefoxKeywords| by 1. | 154 // |kFirefoxKeywords| by 1. |
155 EXPECT_EQ(arraysize(kFirefoxKeywords) - 1, keyword_count_); | 155 EXPECT_EQ(arraysize(kFirefoxKeywords) - 1, keyword_count_); |
156 } | 156 } |
157 | 157 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); | 350 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); |
351 FirefoxImporterBrowserTest("firefox_profile", observer.get(), observer.get()); | 351 FirefoxImporterBrowserTest("firefox_profile", observer.get(), observer.get()); |
352 } | 352 } |
353 | 353 |
354 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, | 354 IN_PROC_BROWSER_TEST_F(FirefoxProfileImporterBrowserTest, |
355 MAYBE_IMPORTER(Firefox320Importer)) { | 355 MAYBE_IMPORTER(Firefox320Importer)) { |
356 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); | 356 scoped_refptr<FirefoxObserver> observer(new FirefoxObserver(true)); |
357 FirefoxImporterBrowserTest("firefox320_profile", observer.get(), | 357 FirefoxImporterBrowserTest("firefox320_profile", observer.get(), |
358 observer.get()); | 358 observer.get()); |
359 } | 359 } |
OLD | NEW |