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

Side by Side Diff: chrome/browser/extensions/extensions_service_unittest.cc

Issue 441008: Many changes to DictionaryValues:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698