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

Side by Side Diff: chrome/test/data/extensions/api_test/browser_action/popup/popup.html

Issue 8729014: Move a bunch of extension API tests to manifest_version 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 <!--
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the
4 * LICENSE file.
5 -->
1 <head> 6 <head>
2 <script> 7 <script src="popup.js"></script>
3 function notify_pass() {
4 // We should be done. Let the test harness know.
5 chrome.test.notifyPass();
6 }
7
8 function run_tests() {
9 // Compute the size of the popup.
10 var width = 0;
11 var height = 0;
12 if (localStorage.height) {
13 height = parseInt(localStorage.height);
14 }
15 if (localStorage.width) {
16 width = parseInt(localStorage.width);
17 }
18
19 // Set the div's size.
20 var test = document.getElementById("test");
21 test.style.width = width + "px";
22 test.style.height = height + "px";
23 chrome.test.log("height: " + test.offsetHeight);
24 chrome.test.log("width: " + test.offsetWidth);
25
26 height += 500;
27 width += 500;
28 localStorage.height = JSON.stringify(height);
29 localStorage.width = JSON.stringify(width);
30
31 // Allow for the pop-up resize to happen (asynchronously)
32 // before saying that the test is done.
33 window.setTimeout(notify_pass, 0);
34 }
35 </script>
36 <style> 8 <style>
37 body { 9 body {
38 padding: 0px; 10 padding: 0px;
39 margin: 0px; 11 margin: 0px;
40 } 12 }
41 div { 13 div {
42 padding: 0px; 14 padding: 0px;
43 margin: 0px; 15 margin: 0px;
44 } 16 }
45 </style> 17 </style>
46 </head> 18 </head>
47 <body onload="window.setTimeout(run_tests, 0)"> 19 <body>
48 <div id="test">A</div> 20 <div id="test">A</div>
49 </body> 21 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698