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

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: 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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 expected_patterns.ClearPatterns(); 1090 expected_patterns.ClearPatterns();
1091 AddPattern(&expected_patterns, "http://*.google.com/*"); 1091 AddPattern(&expected_patterns, "http://*.google.com/*");
1092 AddPattern(&expected_patterns, "https://*.google.com/*"); 1092 AddPattern(&expected_patterns, "https://*.google.com/*");
1093 EXPECT_EQ(expected_patterns, 1093 EXPECT_EQ(expected_patterns,
1094 extension->GetActivePermissions()->explicit_hosts()); 1094 extension->GetActivePermissions()->explicit_hosts());
1095 1095
1096 EXPECT_EQ(std::string(good1), loaded_[1]->id()); 1096 EXPECT_EQ(std::string(good1), loaded_[1]->id());
1097 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name()); 1097 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name());
1098 EXPECT_EQ(std::string(""), loaded_[1]->description()); 1098 EXPECT_EQ(std::string(""), loaded_[1]->description());
1099 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"), 1099 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"),
1100 loaded_[1]->background_url()); 1100 loaded_[1]->GetBackgroundURL());
1101 EXPECT_EQ(0u, loaded_[1]->content_scripts().size()); 1101 EXPECT_EQ(0u, loaded_[1]->content_scripts().size());
1102 // We don't parse the plugins section on Chrome OS. 1102 // We don't parse the plugins section on Chrome OS.
1103 #if defined(OS_CHROMEOS) 1103 #if defined(OS_CHROMEOS)
1104 EXPECT_EQ(0u, loaded_[1]->plugins().size()); 1104 EXPECT_EQ(0u, loaded_[1]->plugins().size());
1105 #else 1105 #else
1106 ASSERT_EQ(2u, loaded_[1]->plugins().size()); 1106 ASSERT_EQ(2u, loaded_[1]->plugins().size());
1107 EXPECT_EQ(loaded_[1]->path().AppendASCII("content_plugin.dll").value(), 1107 EXPECT_EQ(loaded_[1]->path().AppendASCII("content_plugin.dll").value(),
1108 loaded_[1]->plugins()[0].path.value()); 1108 loaded_[1]->plugins()[0].path.value());
1109 EXPECT_TRUE(loaded_[1]->plugins()[0].is_public); 1109 EXPECT_TRUE(loaded_[1]->plugins()[0].is_public);
1110 EXPECT_EQ(loaded_[1]->path().AppendASCII("extension_plugin.dll").value(), 1110 EXPECT_EQ(loaded_[1]->path().AppendASCII("extension_plugin.dll").value(),
(...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after
4403 ASSERT_FALSE(AddPendingSyncInstall()); 4403 ASSERT_FALSE(AddPendingSyncInstall());
4404 4404
4405 // Wait for the external source to install. 4405 // Wait for the external source to install.
4406 WaitForCrxInstall(crx_path_, INSTALL_NEW); 4406 WaitForCrxInstall(crx_path_, INSTALL_NEW);
4407 ASSERT_TRUE(IsCrxInstalled()); 4407 ASSERT_TRUE(IsCrxInstalled());
4408 4408
4409 // Now that the extension is installed, sync request should fail 4409 // Now that the extension is installed, sync request should fail
4410 // because the extension is already installed. 4410 // because the extension is already installed.
4411 ASSERT_FALSE(AddPendingSyncInstall()); 4411 ASSERT_FALSE(AddPendingSyncInstall());
4412 } 4412 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698