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

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

Issue 9150008: Introduce background.scripts feature for extension manifests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready to land Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 expected_patterns.ClearPatterns(); 1093 expected_patterns.ClearPatterns();
1094 AddPattern(&expected_patterns, "http://*.google.com/*"); 1094 AddPattern(&expected_patterns, "http://*.google.com/*");
1095 AddPattern(&expected_patterns, "https://*.google.com/*"); 1095 AddPattern(&expected_patterns, "https://*.google.com/*");
1096 EXPECT_EQ(expected_patterns, 1096 EXPECT_EQ(expected_patterns,
1097 extension->GetActivePermissions()->explicit_hosts()); 1097 extension->GetActivePermissions()->explicit_hosts());
1098 1098
1099 EXPECT_EQ(std::string(good1), loaded_[1]->id()); 1099 EXPECT_EQ(std::string(good1), loaded_[1]->id());
1100 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name()); 1100 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name());
1101 EXPECT_EQ(std::string(""), loaded_[1]->description()); 1101 EXPECT_EQ(std::string(""), loaded_[1]->description());
1102 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"), 1102 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"),
1103 loaded_[1]->background_url()); 1103 loaded_[1]->GetBackgroundURL());
1104 EXPECT_EQ(0u, loaded_[1]->content_scripts().size()); 1104 EXPECT_EQ(0u, loaded_[1]->content_scripts().size());
1105 // We don't parse the plugins section on Chrome OS. 1105 // We don't parse the plugins section on Chrome OS.
1106 #if defined(OS_CHROMEOS) 1106 #if defined(OS_CHROMEOS)
1107 EXPECT_EQ(0u, loaded_[1]->plugins().size()); 1107 EXPECT_EQ(0u, loaded_[1]->plugins().size());
1108 #else 1108 #else
1109 ASSERT_EQ(2u, loaded_[1]->plugins().size()); 1109 ASSERT_EQ(2u, loaded_[1]->plugins().size());
1110 EXPECT_EQ(loaded_[1]->path().AppendASCII("content_plugin.dll").value(), 1110 EXPECT_EQ(loaded_[1]->path().AppendASCII("content_plugin.dll").value(),
1111 loaded_[1]->plugins()[0].path.value()); 1111 loaded_[1]->plugins()[0].path.value());
1112 EXPECT_TRUE(loaded_[1]->plugins()[0].is_public); 1112 EXPECT_TRUE(loaded_[1]->plugins()[0].is_public);
1113 EXPECT_EQ(loaded_[1]->path().AppendASCII("extension_plugin.dll").value(), 1113 EXPECT_EQ(loaded_[1]->path().AppendASCII("extension_plugin.dll").value(),
(...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
4407 ASSERT_FALSE(AddPendingSyncInstall()); 4407 ASSERT_FALSE(AddPendingSyncInstall());
4408 4408
4409 // Wait for the external source to install. 4409 // Wait for the external source to install.
4410 WaitForCrxInstall(crx_path_, INSTALL_NEW); 4410 WaitForCrxInstall(crx_path_, INSTALL_NEW);
4411 ASSERT_TRUE(IsCrxInstalled()); 4411 ASSERT_TRUE(IsCrxInstalled());
4412 4412
4413 // Now that the extension is installed, sync request should fail 4413 // Now that the extension is installed, sync request should fail
4414 // because the extension is already installed. 4414 // because the extension is already installed.
4415 ASSERT_FALSE(AddPendingSyncInstall()); 4415 ASSERT_FALSE(AddPendingSyncInstall());
4416 } 4416 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/network_delay_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698