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

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

Issue 480243003: Implement smoother autosizing of the extension options overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « chrome/renderer/resources/extensions/extension_options_events.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 function optionsPageLoaded() { 5 function optionsPageLoaded() {
6 var hasLoaded = false; 6 var hasLoaded = false;
7 chrome.extension.getViews().forEach(function(view) { 7 chrome.extension.getViews().forEach(function(view) {
8 if (view.document.location.pathname == '/options.html') { 8 if (view.document.location.pathname == '/options.html') {
9 chrome.test.assertEq(false, hasLoaded); 9 chrome.test.assertEq(false, hasLoaded);
10 hasLoaded = view.loaded; 10 hasLoaded = view.loaded;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 var extensionoptions = new ExtensionOptions(); 118 var extensionoptions = new ExtensionOptions();
119 extensionoptions.extension = chrome.runtime.id; 119 extensionoptions.extension = chrome.runtime.id;
120 extensionoptions.autosize = 'on'; 120 extensionoptions.autosize = 'on';
121 extensionoptions.minheight = 499; 121 extensionoptions.minheight = 499;
122 extensionoptions.minwidth = 499; 122 extensionoptions.minwidth = 499;
123 extensionoptions.maxheight = 501; 123 extensionoptions.maxheight = 501;
124 extensionoptions.maxwidth = 501; 124 extensionoptions.maxwidth = 501;
125 125
126 extensionoptions.onsizechanged = function(evt) { 126 extensionoptions.onsizechanged = function(evt) {
127 try { 127 try {
128 chrome.test.assertTrue(evt.width >= 499); 128 chrome.test.assertTrue(evt.newWidth >= 499);
129 chrome.test.assertTrue(evt.height >= 499); 129 chrome.test.assertTrue(evt.newHeight >= 499);
130 chrome.test.assertTrue(evt.width <= 501); 130 chrome.test.assertTrue(evt.newWidth <= 501);
131 chrome.test.assertTrue(evt.height <= 501); 131 chrome.test.assertTrue(evt.newHeight <= 501);
132 done(); 132 done();
133 } finally { 133 } finally {
134 document.body.removeChild(extensionoptions); 134 document.body.removeChild(extensionoptions);
135 } 135 }
136 }; 136 };
137 137
138 document.body.appendChild(extensionoptions); 138 document.body.appendChild(extensionoptions);
139 }, 139 },
140 140
141 function externalLinksOpenInNewTab() { 141 function externalLinksOpenInNewTab() {
(...skipping 12 matching lines...) Expand all
154 document.body.removeChild(extensionoptions); 154 document.body.removeChild(extensionoptions);
155 } 155 }
156 } 156 }
157 }); 157 });
158 158
159 var extensionoptions = document.createElement('extensionoptions'); 159 var extensionoptions = document.createElement('extensionoptions');
160 extensionoptions.setAttribute('extension', chrome.runtime.id); 160 extensionoptions.setAttribute('extension', chrome.runtime.id);
161 document.body.appendChild(extensionoptions); 161 document.body.appendChild(extensionoptions);
162 } 162 }
163 ]); 163 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/extension_options_events.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698