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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifest_test.cc

Issue 178253007: Parse manifest file with app.service_worker.script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/extensions/manifest_tests/extension_manifest_test.h" 5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ExtensionManifestTest::Manifest::Manifest(const char* name) 60 ExtensionManifestTest::Manifest::Manifest(const char* name)
61 : name_(name), manifest_(NULL) { 61 : name_(name), manifest_(NULL) {
62 } 62 }
63 63
64 ExtensionManifestTest::Manifest::Manifest(base::DictionaryValue* manifest, 64 ExtensionManifestTest::Manifest::Manifest(base::DictionaryValue* manifest,
65 const char* name) 65 const char* name)
66 : name_(name), manifest_(manifest) { 66 : name_(name), manifest_(manifest) {
67 CHECK(manifest_) << "Manifest NULL"; 67 CHECK(manifest_) << "Manifest NULL";
68 } 68 }
69 69
70 ExtensionManifestTest::Manifest::Manifest(
71 scoped_ptr<base::DictionaryValue> manifest)
72 : manifest_(manifest.get()), manifest_holder_(manifest.Pass()) {
73 CHECK(manifest_) << "Manifest NULL";
74 }
75
70 ExtensionManifestTest::Manifest::Manifest(const Manifest& m) { 76 ExtensionManifestTest::Manifest::Manifest(const Manifest& m) {
71 NOTREACHED(); 77 NOTREACHED();
72 } 78 }
73 79
74 ExtensionManifestTest::Manifest::~Manifest() { 80 ExtensionManifestTest::Manifest::~Manifest() {
75 } 81 }
76 82
77 base::DictionaryValue* ExtensionManifestTest::Manifest::GetManifest( 83 base::DictionaryValue* ExtensionManifestTest::Manifest::GetManifest(
78 char const* test_data_dir, std::string* error) const { 84 char const* test_data_dir, std::string* error) const {
79 if (manifest_) 85 if (manifest_)
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 testcase.location_, 256 testcase.location_,
251 testcase.flags_); 257 testcase.flags_);
252 break; 258 break;
253 case EXPECT_TYPE_SUCCESS: 259 case EXPECT_TYPE_SUCCESS:
254 LoadAndExpectSuccess(testcase.manifest_filename_.c_str(), 260 LoadAndExpectSuccess(testcase.manifest_filename_.c_str(),
255 testcase.location_, 261 testcase.location_,
256 testcase.flags_); 262 testcase.flags_);
257 break; 263 break;
258 } 264 }
259 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698