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

Side by Side Diff: chrome/test/data/extensions/api_test/extension_options/embed_invalid/test.js

Issue 429763002: Implement createfailed event for <extensionoptions> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove self hack Created 6 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2014 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 function testCannotEmbedExtension(id) {
6 var done = chrome.test.callbackAdded();
7 var extensionoptions = document.createElement('extensionoptions');
8 extensionoptions.addEventListener('createfailed', function() {
9 document.body.removeChild(extensionoptions);
10 done();
11 });
12 extensionoptions.addEventListener('load', function () {
13 document.body.removeChild(extensionoptions);
14 chrome.test.fail();
15 });
16 extensionoptions.setAttribute('extension', id);
17 document.body.appendChild(extensionoptions);
18 }
19
20 chrome.test.runTests([
21 function cannotEmbedInvalidExtensionId() {
22 testCannotEmbedExtension('thisisprobablynotrealextensionid');
23 },
24
25 function cannotEmbedSelfIfNoOptionsPage() {
26 testCannotEmbedExtension(chrome.runtime.id);
27 }
28 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698