OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 } | 379 } |
380 | 380 |
381 // Update() should delete the temporary input file. | 381 // Update() should delete the temporary input file. |
382 EXPECT_FALSE(file_util::PathExists(path)); | 382 EXPECT_FALSE(file_util::PathExists(path)); |
383 } | 383 } |
384 | 384 |
385 void ValidatePrefKeyCount(size_t count) { | 385 void ValidatePrefKeyCount(size_t count) { |
386 DictionaryValue* dict = | 386 DictionaryValue* dict = |
387 prefs_->GetMutableDictionary(L"extensions.settings"); | 387 prefs_->GetMutableDictionary(L"extensions.settings"); |
388 ASSERT_TRUE(dict != NULL); | 388 ASSERT_TRUE(dict != NULL); |
389 EXPECT_EQ(count, dict->GetSize()); | 389 EXPECT_EQ(count, dict->size()); |
390 } | 390 } |
391 | 391 |
392 void ValidateBooleanPref(const std::string& extension_id, | 392 void ValidateBooleanPref(const std::string& extension_id, |
393 const std::wstring& pref_path, | 393 const std::wstring& pref_path, |
394 bool must_equal) { | 394 bool must_equal) { |
395 std::wstring msg = L" while checking: "; | 395 std::wstring msg = L" while checking: "; |
396 msg += ASCIIToWide(extension_id); | 396 msg += ASCIIToWide(extension_id); |
397 msg += L" "; | 397 msg += L" "; |
398 msg += pref_path; | 398 msg += pref_path; |
399 msg += L" == "; | 399 msg += L" == "; |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 | 1592 |
1593 recorder.set_ready(false); | 1593 recorder.set_ready(false); |
1594 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); | 1594 command_line.reset(new CommandLine(CommandLine::ARGUMENTS_ONLY)); |
1595 service = new ExtensionsService(&profile, command_line.get(), | 1595 service = new ExtensionsService(&profile, command_line.get(), |
1596 profile.GetPrefs(), install_dir, false); | 1596 profile.GetPrefs(), install_dir, false); |
1597 EXPECT_FALSE(service->extensions_enabled()); | 1597 EXPECT_FALSE(service->extensions_enabled()); |
1598 service->Init(); | 1598 service->Init(); |
1599 loop.RunAllPending(); | 1599 loop.RunAllPending(); |
1600 EXPECT_TRUE(recorder.ready()); | 1600 EXPECT_TRUE(recorder.ready()); |
1601 } | 1601 } |
OLD | NEW |