- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / webstore_private / incorrect_manifest1.js
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var manifestObj = JSON.parse(getManifest());
6
7 // Change the version to be N+1.
8 manifestObj["version"] =
9     (parseFloat(manifestObj["version"]) + 1).toString();
10 var manifest = JSON.stringify(manifestObj);
11
12 // Now cause the install to happen - it should succeed even though the version
13 // we passed in is different from what is in the .crx file, because the
14 // effective permissions have not changed.
15 chrome.webstorePrivate.beginInstallWithManifest3(
16     { 'id': extensionId, 'manifest': manifest },
17     function(result) {
18   assertNoLastError();
19   assertEq("", result);
20
21   var expectedError = "Manifest file is invalid.";
22   chrome.webstorePrivate.completeInstall(extensionId,
23                                          callbackPass());
24 });