| Index: chrome/test/data/extensions/api_test/extension_options/embed_invalid/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/extension_options/embed_invalid/test.js b/chrome/test/data/extensions/api_test/extension_options/embed_invalid/test.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fcf8f7dd037d126bff7bc5acc775ca3a8ece26c9
|
| --- /dev/null
|
| +++ b/chrome/test/data/extensions/api_test/extension_options/embed_invalid/test.js
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +function testCannotEmbedExtension(id) {
|
| + var done = chrome.test.callbackAdded();
|
| + var extensionoptions = document.createElement('extensionoptions');
|
| + extensionoptions.addEventListener('createfailed', function() {
|
| + document.body.removeChild(extensionoptions);
|
| + done();
|
| + });
|
| + extensionoptions.addEventListener('load', function () {
|
| + document.body.removeChild(extensionoptions);
|
| + chrome.test.fail();
|
| + });
|
| + extensionoptions.setAttribute('extension', id);
|
| + document.body.appendChild(extensionoptions);
|
| +}
|
| +
|
| +chrome.test.runTests([
|
| + function cannotEmbedInvalidExtensionId() {
|
| + testCannotEmbedExtension('thisisprobablynotrealextensionid');
|
| + },
|
| +
|
| + function cannotEmbedSelfIfNoOptionsPage() {
|
| + testCannotEmbedExtension(chrome.runtime.id);
|
| + }
|
| +]);
|
|
|