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

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

Issue 316016: Move the json-related files into a separate json directory. This hopefully al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months 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) 2006-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_reader.h" 10 #include "base/json/json_reader.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "chrome/browser/extensions/extension_creator.h" 14 #include "chrome/browser/extensions/extension_creator.h"
15 #include "chrome/browser/extensions/extensions_service.h" 15 #include "chrome/browser/extensions/extensions_service.h"
16 #include "chrome/browser/extensions/external_extension_provider.h" 16 #include "chrome/browser/extensions/external_extension_provider.h"
17 #include "chrome/browser/extensions/external_pref_extension_provider.h" 17 #include "chrome/browser/extensions/external_pref_extension_provider.h"
18 #include "chrome/common/extensions/extension.h" 18 #include "chrome/common/extensions/extension.h"
19 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/common/extensions/extension_constants.h"
20 #include "chrome/common/extensions/url_pattern.h" 20 #include "chrome/common/extensions/url_pattern.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 InitializeInstalledExtensionsService(pref_path, source_install_dir); 606 InitializeInstalledExtensionsService(pref_path, source_install_dir);
607 607
608 service_->Init(); 608 service_->Init();
609 loop_.RunAllPending(); 609 loop_.RunAllPending();
610 610
611 ASSERT_EQ(4u, GetErrors().size()); 611 ASSERT_EQ(4u, GetErrors().size());
612 ASSERT_EQ(0u, loaded_.size()); 612 ASSERT_EQ(0u, loaded_.size());
613 613
614 EXPECT_TRUE(MatchPattern(GetErrors()[0], 614 EXPECT_TRUE(MatchPattern(GetErrors()[0],
615 std::string("Could not load extension from '*'. * ") + 615 std::string("Could not load extension from '*'. * ") +
616 JSONReader::kBadRootElementType)) << GetErrors()[0]; 616 base::JSONReader::kBadRootElementType)) << GetErrors()[0];
617 617
618 EXPECT_TRUE(MatchPattern(GetErrors()[1], 618 EXPECT_TRUE(MatchPattern(GetErrors()[1],
619 std::string("Could not load extension from '*'. ") + 619 std::string("Could not load extension from '*'. ") +
620 extension_manifest_errors::kManifestUnreadable)) << GetErrors()[1]; 620 extension_manifest_errors::kManifestUnreadable)) << GetErrors()[1];
621 621
622 EXPECT_TRUE(MatchPattern(GetErrors()[2], 622 EXPECT_TRUE(MatchPattern(GetErrors()[2],
623 std::string("Could not load extension from '*'. ") + 623 std::string("Could not load extension from '*'. ") +
624 extension_manifest_errors::kMissingFile)) << GetErrors()[2]; 624 extension_manifest_errors::kMissingFile)) << GetErrors()[2];
625 625
626 EXPECT_TRUE(MatchPattern(GetErrors()[3], 626 EXPECT_TRUE(MatchPattern(GetErrors()[3],
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 1562
1563 recorder.set_ready(false); 1563 recorder.set_ready(false);
1564 command_line.reset(new CommandLine(L"")); 1564 command_line.reset(new CommandLine(L""));
1565 service = new ExtensionsService(&profile, command_line.get(), 1565 service = new ExtensionsService(&profile, command_line.get(),
1566 profile.GetPrefs(), install_dir, &loop, &loop, false); 1566 profile.GetPrefs(), install_dir, &loop, &loop, false);
1567 EXPECT_FALSE(service->extensions_enabled()); 1567 EXPECT_FALSE(service->extensions_enabled());
1568 service->Init(); 1568 service->Init();
1569 loop.RunAllPending(); 1569 loop.RunAllPending();
1570 EXPECT_TRUE(recorder.ready()); 1570 EXPECT_TRUE(recorder.ready());
1571 } 1571 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_uitest.cc ('k') | chrome/browser/history/starred_url_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698