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

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 9021032: Redo r113722 - Add Pass(), which implements move semantics, to scoped_ptr, scoped_array.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 3394fada2c03b735d15418e378dad9f937b8eee4..0a50397f17168df48644f0d17e4977d7a95e3338 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -74,6 +74,19 @@ class ExtensionManifestTest : public testing::Test {
Manifest(DictionaryValue* manifest, const char* name)
: name_(name), manifest_(manifest) {
}
+ Manifest(const Manifest& m) {
+ // C++98 requires the copy constructor for a type to be visiable if you
+ // take a const-ref of a temporary for that type. Since Manifest
+ // contains a scoped_ptr, its implicit copy constructor is declared
+ // Manifest(Manifest&) according to spec 12.8.5. This breaks the first
+ // requirement and thus you cannot use it with LoadAndExpectError() or
+ // LoadAndExpectSuccess() easily.
+ //
+ // To get around this spec pedantry, we declare the copy constructor
+ // explicitly. It will never get invoked.
+ NOTREACHED();
+ }
+
const std::string& name() const { return name_; }
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698