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

Side by Side Diff: chrome/test/data/extensions/webui/can_embed_extension_options.js

Issue 655143003: Don't try to create extensionoptions for extensions that don't exist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 // out/Debug/browser_tests 5 // out/Debug/browser_tests
6 // --gtest_filter=ExtensionWebUITest.CanEmbedExtensionOptions 6 // --gtest_filter=ExtensionWebUITest.CanEmbedExtensionOptions
7 //
8 // also used by:
9 //
10 // out/Debug/browser_tests
11 // --gtest_filter=ExtensionWebUITest.CannotEmbedDisabledExtension
7 if (!chrome || !chrome.test || !chrome.test.sendMessage) { 12 if (!chrome || !chrome.test || !chrome.test.sendMessage) {
8 console.error('chrome.test.sendMessage is unavailable on ' + 13 console.error('chrome.test.sendMessage is unavailable on ' +
9 document.location.href); 14 document.location.href);
10 domAutomationController.send(false); 15 domAutomationController.send(false);
11 return; 16 return;
12 } 17 }
13 18
14 chrome.test.sendMessage('ready', function(reply) { 19 chrome.test.sendMessage('ready', function(reply) {
15 var extensionoptions = document.createElement('extensionoptions'); 20 var extensionoptions = document.createElement('extensionoptions');
16 extensionoptions.addEventListener('load', function() { 21 extensionoptions.addEventListener('load', function() {
17 chrome.test.sendMessage('guest loaded'); 22 chrome.test.sendMessage('load');
23 });
24 extensionoptions.addEventListener('createfailed', function() {
25 chrome.test.sendMessage('createfailed');
18 }); 26 });
19 extensionoptions.setAttribute('extension', reply); 27 extensionoptions.setAttribute('extension', reply);
20 document.body.appendChild(extensionoptions); 28 document.body.appendChild(extensionoptions);
21 }); 29 });
22 30
23 domAutomationController.send(true); 31 domAutomationController.send(true);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698